home / mcp / salesforce mcp server
Enables Claude to query, modify, and manage Salesforce data and metadata via natural language
Configuration
View docs{
"mcpServers": {
"dayal-arnav05-salesforce-mcp-ts": {
"command": "npx",
"args": [
"-y",
"@tsmztech/mcp-server-salesforce"
],
"env": {
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_INSTANCE_URL": "org_url",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_CONNECTION_TYPE": "User_Password"
}
}
}
}You can interact with Salesforce data and metadata through Claude by running a dedicated MCP server that translates natural language requests into Salesforce actions. This server lets you query, modify, and manage Salesforce objects, fields, Apex code, and debug logs using everyday language, giving you a direct and intuitive way to work with your Salesforce environment.
To use the Salesforce MCP Server, start the server locally and connect your Claude client to it. You can ask for object discovery, describe schemas, run complex queries with relationships, manipulate records, manage Apex code and triggers, and query or adjust debug logs. Use natural language prompts like: “Show me all Accounts with related Contacts” or “Create a new custom object for Customer Feedback.” The server supports cross-object searches, SOSL, and detailed error feedback that highlights Salesforce-specific issues so you can quickly correct your requests.
Install the Salesforce MCP Server globally so you can run it from any directory.
npm install -g @tsmztech/mcp-server-salesforceSetup covers two authentication options for Salesforce integration. You can use Username/Password authentication or OAuth 2.0 Client Credentials Flow. Follow the environment-variable examples below to configure your MCP client with Claude.
Use these MCP server configurations to connect Claude Desktop to the Salesforce MCP Server. Each block runs the MCP server using npm/npx and passes the required environment variables for authentication.
{
"mcpServers": {
"salesforce_pwd": {
"command": "npx",
"args": ["-y", "@tsmztech/mcp-server-salesforce"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "org_url" // Optional. Default value: https://login.salesforce.com
}
},
"salesforce_oauth": {
"command": "npx",
"args": ["-y", "@tsmztech/mcp-server-salesforce"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "OAuth_2.0_Client_Credentials",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com" // REQUIRED: Must be your exact Salesforce instance URL
}
}
}
}For OAuth 2.0 Client Credentials Flow, ensure the instance URL is exact and the token endpoint will be constructed from that URL. For Username/Password authentication, provide your Salesforce username, password, and security token. You can start either configuration with the same base command: npx -y @tsmztech/mcp-server-salesforce.
Search for standard and custom Salesforce objects by partial name matches, returning both standard and custom objects.
Get detailed object schema information, including field definitions, relationships, and picklist values.
Query records with relationship support and complex WHERE conditions, including parent-child and child-parent scenarios.
Execute GROUP BY and aggregate functions on Salesforce data, with HAVING support and date/time grouping.
Perform DML operations: insert, update, delete, and upsert (including external IDs).
Create and modify custom objects and their sharing settings.
Add or modify custom fields and relationships, with default Field Level Security handling.
Manage Field Level Security for specific profiles and view current permissions.
SOSL-based search across multiple objects with field snippets.
Read Apex classes and metadata, including wildcard name matching.
Create or update Apex classes with API version control.
Read Apex triggers and metadata with wildcard name matching.
Create or update Apex triggers with API version and event handling.
Execute anonymous Apex code and view results and debug logs.
Manage debug logs, including enabling, disabling, and log level configuration.