Get the FREE Ultimate OpenClaw Setup Guide →

mcp -salesforce

An MCP (Model Context Protocol) server implementation that integrates Claude with Salesforce, enabling natural language interactions with your Salesforce data and metadata. This server allows Claude to query, modify, and manage your Salesforce objects and records using everyday language.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio surajadsul-mcp-server-salesforce npx -y @surajadsul02/mcp-server-salesforce \
  --env SALESFORCE_TOKEN="your_security_token" \
  --env SALESFORCE_PASSWORD="your_password" \
  --env SALESFORCE_USERNAME="your_username@example.com" \
  --env SALESFORCE_INSTANCE_URL="https://login.salesforce.com"

How to use

This Salesforce MCP Server enables Claude to interact with your Salesforce data and metadata using natural language. It supports object and field management, smart object searches, detailed schema information, flexible data queries with relationship handling, and data manipulation operations such as insert, update, delete, and upsert. It also provides cross-object search capabilities (SOSL) and Salesforce-specific error details to help you troubleshoot quickly. You can query objects, describe schemas, create or modify custom objects and fields, run complex data queries across related objects, and manage records using everyday language. The server is designed to be integrated with clients like Cursor IDE or Claude Desktop to enable seamless natural-language control over Salesforce data.

How to install

Prerequisites:

  • Node.js (LTS version) and npm installed on your system
  • Basic knowledge of configuring environment variables for Salesforce authentication

Installation steps:

  1. Install the MCP server package globally
npm install -g @surajadsul02/mcp-server-salesforce
  1. Ensure you have Salesforce credentials ready (Username/Password with Security Token or OAuth2 credentials) and determine your Salesforce instance URL (default https://login.salesforce.com)
  2. Run the MCP server (example using npx via the configuration approach):
npx -y @surajadsul02/mcp-server-salesforce
  1. If integrating with editors or IDEs, configure the mcp.json in the respective tool to point to the Salesforce MCP server, including necessary environment variables as shown in the configuration example.

Additional notes

Tips and considerations:

  • Always secure your Salesforce credentials. Use environment variables or secret management when deploying.
  • If you switch between Username/Password and OAuth2, update the environment variables accordingly (USERNAME, PASSWORD, TOKEN vs CONSUMER_KEY/CONSUMER_SECRET).
  • When testing, ensure the Salesforce API permissions for your user are adequate (API enabled, proper object access, and field-level security).
  • For Cursor IDE integration, you can either pass credentials through env variables or use an OAuth2 flow as demonstrated in the example JSON snippets.
  • If you encounter authentication errors, double-check the instance URL and token accuracy and ensure there are no trailing spaces in env values.
  • Regularly update the MCP server package to benefit from fixes and improvements.

Related MCP Servers

Sponsor this space

Reach thousands of developers