home / mcp / salesforce mcp server
An MCP server that enables Claude to query, modify, and manage Salesforce data and metadata using natural language.
Configuration
View docs{
"mcpServers": {
"simonl77-mcp-server-salesforce": {
"command": "npx",
"args": [
"-y",
"@tsmztech/mcp-server-salesforce"
],
"env": {
"SALESFORCE_TOKEN": "your_token",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_USERNAME": "[email protected]",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_CONNECTION_TYPE": "Salesforce_CLI"
}
}
}
}You can run a Salesforce MCP Server that lets Claude interact with Salesforce data and metadata using natural language. It supports querying, creating, updating, and managing Salesforce objects and records across multiple orgs, and works with Claude Desktop for easy local use.
You use the MCP server by launching it locally (via an MCP client) or running it through your development workflow, then asking Claude to perform actions against Salesforce. Common use cases include searching for objects, inspecting object schemas, querying records with relationships, performing data manipulation (insert, update, delete, upsert), running SOSL or aggregate queries, and managing Apex code and debug logs. Start by ensuring your MCP server is running, then instruct Claude with natural language prompts like: “Show me the fields on the Account object,” or “Update the status of the Lead opportunity.” The server translates your requests into Salesforce API calls and returns results with Salesforce-specific details when errors occur.
Prerequisites: you need Node.js and npm installed on your machine.
Install the MCP server globally with npm.
# Install the MCP server globally
npm install -g @tsmztech/mcp-server-salesforce
# Start the server locally through your MCP client (using stdio/CLI flow)
npx -y @tsmztech/mcp-server-salesforce
```} ,{If you use Claude Desktop, you can configure the Salesforce MCP server in Claude Desktop with pre-bundled or manual settings. You can configure the server to use Salesforce CLI authentication, Username/Password authentication, or OAuth 2.0 Client Credentials.
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@tsmztech/mcp-server-salesforce"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "Salesforce_CLI"
}
}
}
}{
"mcpServers": {
"salesforce": {
"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
}
}
}
}{
"mcpServers": {
"salesforce": {
"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
}
}
}
}Search for standard and custom Salesforce objects by partial name matches, covering both standard and custom objects.
Get detailed schema information for an object, including fields, relationships, and picklist values.
Query records with support for parent-child and child-parent relationships and complex filters.
Execute aggregate queries with GROUP BY, HAVING, and date/time grouping.
Insert, update, delete, or upsert records, including using external IDs for upserts.
Create or modify custom objects and their properties, including sharing settings.
Add or modify custom fields and relationships, with default Field Level Security for System Administrator.
Manage Field Level Security for profiles, including granting or revoking access.
SOSL-based search across multiple objects with field snippets.
Read Apex classes and related metadata, with wildcard support in name patterns.
Create or update Apex classes with API version control.
Read Apex triggers and their metadata with pattern matching.
Create or update Apex triggers for specified objects and events.
Execute anonymous Apex code and view debug logs and results.
Enable, disable, and view debug logs and set log levels for users.