Salesforce MCP Server
Enables Claude to query, create, update, and delete Salesforce records directly using SOQL and SOSL, with tools for metadata exploration and bulk operations.
README
Salesforce MCP Server
An MCP (Model Context Protocol) server that lets Claude query, create, update, and delete Salesforce records directly — using the Simple Salesforce Python package.
Quickstart
1. Install dependencies
pip3 install mcp simple-salesforce
2. Get your Salesforce credentials
See .env.example for the required variables. The server reads these from environment variables passed via the Claude config below.
| Variable | Where to find it |
|---|---|
SF_USERNAME |
Your Salesforce login email |
SF_PASSWORD |
Your Salesforce password |
SF_SECURITY_TOKEN |
Salesforce > Settings > Reset My Security Token (docs) |
SF_DOMAIN |
Your My Domain prefix, e.g. mycompany.my (from your Salesforce URL https://mycompany.my.salesforce.com) |
3. Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"salesforce": {
"command": "python3",
"args": ["/absolute/path/to/salesforce-mcp-server/server.py"],
"env": {
"SF_USERNAME": "your.name@company.com",
"SF_PASSWORD": "your-password",
"SF_SECURITY_TOKEN": "your-token",
"SF_DOMAIN": "your-org.my"
}
}
}
}
Restart Claude Desktop. The Salesforce tools should appear in the tool picker.
3b. Add to Claude Code (alternative)
Add to ~/.claude.json or a project-level .mcp.json:
{
"mcpServers": {
"salesforce": {
"command": "python3",
"args": ["/absolute/path/to/salesforce-mcp-server/server.py"],
"env": {
"SF_USERNAME": "your.name@company.com",
"SF_PASSWORD": "your-password",
"SF_SECURITY_TOKEN": "your-token",
"SF_DOMAIN": "your-org.my"
}
}
}
}
Available Tools
Metadata
| Tool | Parameters | Description |
|---|---|---|
sf_list_objects |
— | List all queryable objects in the org |
sf_describe_object |
object_name |
Get all fields, types, and labels for an object |
Query
| Tool | Parameters | Description |
|---|---|---|
sf_query |
soql |
Run a SOQL query (up to 2000 records) |
sf_query_all |
soql |
Run a SOQL query with auto-pagination (up to 10k records) |
sf_search |
sosl |
Run a SOSL search across multiple objects |
sf_count |
object_name, where_clause (optional) |
Quick record count |
Create / Update / Delete
| Tool | Parameters | Description |
|---|---|---|
sf_create_record |
object_name, data (JSON string) |
Create a new record |
sf_update_record |
object_name, record_id, data (JSON string) |
Update a record |
sf_delete_record |
object_name, record_id |
Delete a record |
sf_upsert_record |
object_name, external_id_field, external_id, data (JSON string) |
Upsert by external ID |
Example prompts
Once connected, you can ask Claude things like:
- "How many Accounts do we have?"
- "Show me all Contacts created this month"
- "What fields does the Opportunity object have?"
- "Create a new Contact with name Jane Doe and email jane@example.com"
- "Find all Accounts in the Technology industry with revenue over 1M"
Troubleshooting
ModuleNotFoundError: No module named 'mcp'
Run pip3 install mcp simple-salesforce (you may need --break-system-packages on macOS with Homebrew Python).
Authentication failed
Double-check your security token — it resets whenever you change your password. Get a new one from Salesforce Settings > Reset My Security Token.
SF_DOMAIN format
Use just the My Domain prefix without .salesforce.com. For https://mycompany.my.salesforce.com, use mycompany.my.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.