Interact with Salesforce data using SOQL queries, SOSL searches, and CRUD operations via a TypeScript MCP server.
A TypeScript implementation of a Model Context Protocol (MCP) server for Salesforce integration, allowing LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and CRUD operations.
authenticate_password
- Authenticate using username/password with OAuthrun_soql_query
- Execute SOQL queriesrun_sosl_search
- Execute SOSL searchesget_object_fields
- Get metadata for Salesforce objectsget_record
- Retrieve specific records by IDcreate_record
- Create new recordsupdate_record
- Update existing recordsdelete_record
- Delete recordstooling_execute
- Execute Tooling API requestsapex_execute
- Execute Apex REST requestsrestful
- Make direct REST API callsCreate a Connected App in Salesforce:
http://localhost:8080/callback
(required but not used)Get your Security Token:
Pull and run the latest Docker image:
# Pull the image
docker pull steffensbola/salesforce-mcp-ts:latest
# Run with your credentials
docker run -p 3000:3000 \
-e SALESFORCE_CLIENT_ID=your_consumer_key \
-e SALESFORCE_CLIENT_SECRET=your_consumer_secret \
-e SALESFORCE_USERNAME=your_username@domain.com \
-e SALESFORCE_PASSWORD=your_password \
-e SALESFORCE_SECURITY_TOKEN=your_security_token \
-e SALESFORCE_SANDBOX=true \
steffensbola/salesforce-mcp-ts:latest
Add to your .vscode/mcp.json
:
{
"servers": {
"salesforce": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "SALESFORCE_CLIENT_ID=your_consumer_key",
"-e", "SALESFORCE_CLIENT_SECRET=your_consumer_secret",
"-e", "SALESFORCE_USERNAME=your_username@domain.com",
"-e", "SALESFORCE_PASSWORD=your_password",
"-e", "SALESFORCE_SECURITY_TOKEN=your_token",
"-e", "SALESFORCE_SANDBOX=true",
"steffensbola/salesforce-mcp-ts:latest"
]
}
}
}
You can also use volumes to mount a config file instead of passing environment variables:
{
"servers": {
"salesforce": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v", "${workspaceFolder}/.env:/app/.env",
"steffensbola/salesforce-mcp-ts:latest"
]
}
}
}
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"salesforce": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "SALESFORCE_CLIENT_ID=your_consumer_key",
"-e", "SALESFORCE_CLIENT_SECRET=your_consumer_secret",
"-e", "SALESFORCE_USERNAME=your_username@domain.com",
"-e", "SALESFORCE_PASSWORD=your_password",
"-e", "SALESFORCE_SECURITY_TOKEN=your_token",
"-e", "SALESFORCE_SANDBOX=true",
"steffensbola/salesforce-mcp-ts:latest"
]
}
}
}
The server requires the following environment variables:
SALESFORCE_CLIENT_ID
- Consumer Key from your Connected AppSALESFORCE_CLIENT_SECRET
- Consumer Secret from your Connected AppSALESFORCE_USERNAME
- Your Salesforce usernameSALESFORCE_PASSWORD
- Your Salesforce passwordSALESFORCE_SECURITY_TOKEN
- Your Salesforce security tokenSALESFORCE_SANDBOX
- Set to "true"
for sandbox, "false"
for production (default: "false"
)Instead of username/password, you can use:
SALESFORCE_ACCESS_TOKEN
- Direct access tokenSALESFORCE_INSTANCE_URL
- Salesforce instance URL (e.g., https://your-instance.my.salesforce.com
)The server also supports alternative variable names:
SF_CONSUMER_KEY
/ SF_CONSUMER_SECRET
SF_USERNAME
/ SF_PASSWORD
/ SF_SECURITY_TOKEN
.env
file with your environment variables:SALESFORCE_CLIENT_ID=your_consumer_key
SALESFORCE_CLIENT_SECRET=your_consumer_secret
SALESFORCE_USERNAME=your_username@domain.com
SALESFORCE_PASSWORD=your_password
SALESFORCE_SECURITY_TOKEN=your_token
SALESFORCE_SANDBOX=true
DOCKER_HUB_USERNAME=steffensbola
docker-compose up -d
Once connected, you can use the tools through your MCP client:
Authentication:
Please authenticate with Salesforce using my credentials
Query Data:
Run this SOQL query: SELECT Id, Name, Industry FROM Account WHERE Industry = 'Technology' LIMIT 10
Search:
Search for contacts named "John" using SOSL
Get Metadata:
Get all the fields for the Contact object
Create Record:
Create a new Account with Name "Test Company" and Industry "Technology"
Authentication Failed
Container Won't Start
Network Errors
For verbose logging, add the debug environment variable:
docker run -e DEBUG=true \
-e SALESFORCE_CLIENT_ID=... \
# ... other variables
steffensbola/salesforce-mcp-ts:latest
See CONTRIBUTING.md for information about:
MIT License - see LICENSE file for details.
Interact with the Domino Data Lab platform to execute and check the status of Domino jobs.
Provides safe, read-only access to Kubernetes cluster resources for debugging and inspection.
An MCP server for Zuora, powered by the CData JDBC Driver. Requires a separate driver and configuration file for connection.
An MCP server for interacting with the CoSense collaborative sensemaking platform, supporting public and private projects.
A Python MCP server for Microsoft Entra ID (Azure AD) directory, user, group, device, sign-in, and security operations via Microsoft Graph.
Interact with your Shopify store's data using the GraphQL API.
Interact with the Meta Ads API to access, analyze, and manage advertising campaigns.
Interact with Bigeye's data quality monitoring platform via its Datawatch API. Supports dynamic API key authentication.
Send emails using AWS Simple Email Service (SES). Supports plain text, HTML, CC, BCC, reply-to, and email scheduling.
A remote, authentication-free MCP server deployable on Cloudflare Workers or locally via npm.