home / mcp / mcp salesforce connector mcp server
MCP Salesforce connector
Configuration
View docs{
"mcpServers": {
"smn2gnt-mcp-salesforce": {
"command": "uvx",
"args": [
"--from",
"mcp-salesforce-connector",
"salesforce"
],
"env": {
"SALESFORCE_DOMAIN": "SALESFORCE_DOMAIN",
"SALESFORCE_ACCESS_TOKEN": "SALESFORCE_ACCESS_TOKEN",
"SALESFORCE_INSTANCE_URL": "SALESFORCE_INSTANCE_URL"
}
}
}
}You can connect to Salesforce through an MCP server that lets you run SOQL queries, perform SOSL searches, and manage Salesforce data via standard CRUD operations, tooling endpoints, Apex REST, and direct REST calls. This MCP server makes it possible for large language models and automation to interact with Salesforce data in a controlled, scalable way.
You start by provisioning the MCP Salesforce Connector as a local or remote server that your MCP client can reach. The server supports two authentication methods: OAuth with an access token and instance URL, or a legacy username/password flow with a security token.
To connect, provide the credentials through environment variables. When using OAuth, supply SALESFORCE_ACCESS_TOKEN and SALESFORCE_INSTANCE_URL. If you prefer the legacy method, you can omit the access token and instead set SALESFORCE_USERNAME, SALESFORCE_PASSWORD, and SALESFORCE_SECURITY_TOKEN.
You configure the MCP client to load the Salesforce connector using the standard MCP stdio approach. The following command configuration illustrates how the server is wired so your MCP client can start it and communicate with Salesforce.
Make sure to set SALESFORCE_DOMAIN to test if you want to connect to a Salesforce sandbox; leave it empty or unset to use production.
Prerequisites: install Node.js and npm on your machine or build machine where you will run the MCP server.
Clone the Salesforce MCP connector repository and install dependencies.
Clone the repository using the repository slug and URL you have access to.
Navigate to the project directory and install dependencies.
Run the MCP Salesforce Connector using the stdio command specified in the configuration to start listening for requests from your MCP client.
The MCP Salesforce Connector is configured to be started as a stdio server with a defined command, arguments, and environment variables. The concrete configuration shown here demonstrates how to wire the server into your MCP client and how credentials are passed.
{
"mcpServers": {
"salesforce": {
"command": "uvx",
"args": [
"--from",
"mcp-salesforce-connector",
"salesforce"
],
"env": {
"SALESFORCE_ACCESS_TOKEN": "SALESFORCE_ACCESS_TOKEN",
"SALESFORCE_INSTANCE_URL": "SALESFORCE_INSTANCE_URL",
"SALESFORCE_DOMAIN": "SALESFORCE_DOMAIN"
}
}
}
}Run Salesforce SOQL queries to retrieve data from Salesforce objects.
Perform SOSL searches across Salesforce objects to find records matching text across multiple objects.
Retrieve metadata for Salesforce objects, including fields, labels, and types.
Create, read, update, and delete Salesforce records.
Execute Tooling API requests for development and metadata operations.
Execute Apex REST requests for custom Apex REST endpoints.
Make direct REST API calls to Salesforce for custom actions.