home / mcp / salesforce mcp server
Provides a Salesforce MCP Server enabling Claude to query, modify, and manage Salesforce data and metadata via natural language.
Configuration
View docs{
"mcpServers": {
"usama-dtc-salesforce_mcp": {
"command": "env",
"args": [
"[email protected]",
"SALESFORCE_PASSWORD=YourActualPassword123",
"SALESFORCE_TOKEN=YourActualSecurityToken123",
"SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
"npx",
"-y",
"@surajadsul02/mcp-server-salesforce"
],
"env": {
"SALESFORCE_TOKEN": "YourActualSecurityToken123",
"SALESFORCE_PASSWORD": "YourActualPassword123",
"SALESFORCE_USERNAME": "[email protected]",
"SALESFORCE_CONSUMER_KEY": "YourConsumerKey",
"SALESFORCE_INSTANCE_URL": "https://login.salesforce.com",
"SALESFORCE_CONSUMER_SECRET": "YourConsumerSecret"
}
}
}
}You can run a Salesforce MCP Server to let Claude interact with your Salesforce data and metadata using natural language. This server enables querying, creating, updating, and managing Salesforce objects and records in an intuitive way, making it easier to work with complex data stories without writing SOQL or DML statements.
To use the Salesforce MCP Server, run it in a local MCP client configuration or connect via an environment-configured runner. You can authenticate with Salesforce using either username/password plus a security token or OAuth2 with a connected app. Once running, you can ask Claude to search for objects, inspect schemas, query records with filters and relationships, and perform data manipulation tasks like insert, update, delete, or upsert. You can also perform cross-object searches across multiple Salesforce objects.
Prerequisites: you need Node.js and npm installed on your machine.
Install the Salesforce MCP Server package globally.
npm install -g @surajadsul02/mcp-server-salesforceTwo authentication methods are supported. Use username/password with a security token, or use OAuth2 with a Connected App.
Environment variables toggle how you connect to Salesforce. The following variables are used in the provided examples.
Cursor IDE integration uses a stdio MCP configuration that launches the MCP server via an environment command. In this setup you pass Salesforce credentials and the server package to run.
{
"mcpServers": {
"salesforce": {
"command": "env",
"args": [
"[email protected]",
"SALESFORCE_PASSWORD=YourActualPassword123",
"SALESFORCE_TOKEN=YourActualSecurityToken123",
"SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
"npx",
"-y",
"@surajadsul02/mcp-server-salesforce"
]
}
}
}If you use Claude Desktop, you can run the MCP server with npx and expose Salesforce credentials via environment variables.
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@surajadsul02/mcp-server-salesforce"],
"env": {
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "https://login.salesforce.com"
}
}
}
}OAuth2 authentication uses a connected app’s consumer key and secret. Include these values along with your Salesforce instance URL in the environment when starting the MCP server.
{
"mcpServers": {
"salesforce": {
"command": "env",
"args": [
"[email protected]",
"SALESFORCE_PASSWORD=YourActualPassword123",
"SALESFORCE_TOKEN=YourActualSecurityToken123",
"SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
"SALESFORCE_CONSUMER_KEY=YourConsumerKey",
"SALESFORCE_CONSUMER_SECRET=YourConsumerSecret",
"npx",
"-y",
"@surajadsul02/mcp-server-salesforce"
]
}
}
}For Username/Password authentication you need: SALESFORCE_USERNAME, SALESFORCE_PASSWORD, SALESFORCE_TOKEN, and optionally SALESFORCE_INSTANCE_URL (default: https://login.salesforce.com). For OAuth2 authentication you need: SALESFORCE_USERNAME, SALESFORCE_PASSWORD, SALESFORCE_CONSUMER_KEY, SALESFORCE_CONSUMER_SECRET, and SALESFORCE_INSTANCE_URL (default: https://login.salesforce.com). These variables are shown in the example configurations above.