- Home
- MCP servers
- Salesforce
Salesforce
- typescript
15
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"surajadsul-mcp-server-salesforce": {
"command": "env",
"args": [
"SALESFORCE_USERNAME=your.actual.email@example.com",
"SALESFORCE_PASSWORD=YourActualPassword123",
"SALESFORCE_TOKEN=YourActualSecurityToken123",
"SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
"npx",
"-y",
"@surajadsul02/mcp-server-salesforce"
],
"env": {
"SALESFORCE_TOKEN": "YourActualSecurityToken123",
"SALESFORCE_PASSWORD": "YourActualPassword123",
"SALESFORCE_USERNAME": "your.actual.email@example.com",
"SALESFORCE_CONSUMER_KEY": "YourConsumerKey",
"SALESFORCE_INSTANCE_URL": "https://login.salesforce.com",
"SALESFORCE_CONSUMER_SECRET": "YourConsumerSecret"
}
}
}
}This Salesforce MCP Server lets you talk to Salesforce using natural language through an MCP client. It translates your questions and commands into Salesforce data queries and updates, enabling you to search objects, view schemas, run queries, and manipulate records with everyday language.
How to use
You interact with Salesforce data and metadata by connecting an MCP client to the Salesforce MCP Server. You can ask for object information, query records, create or update fields, and perform cross-object searches. Start by authenticating, then issue natural language requests such as finding objects by partial names, describing object schemas, querying accounts or cases, and applying changes to records. The server handles Salesforce-specific details and returns clear results and error information when something goes wrong.
How to install
Prerequisites you need before installing are Node.js and npm. Ensure you have a supported environment where you can install global npm packages and run commands from your shell.
# Install the MCP server package globally
npm install -g @surajadsul02/mcp-server-salesforce
Additional configuration and usage notes
To connect the MCP server, you must provide Salesforce credentials and instance details. You can authenticate with either Username/Password or OAuth2. The following examples show how to run the MCP server as a local stdio process with environment variables set for authentication.
Configuration examples for practical runs
# Example 1: Username/Password authentication via stdio (Cursor-like setup)
# Run the server with environment variables set, then start the MCP server
SALESFORCE_USERNAME=your.actual.email@example.com \
SALESFORCE_PASSWORD=YourActualPassword123 \
SALESFORCE_TOKEN=YourActualSecurityToken123 \
SALESFORCE_INSTANCE_URL=https://login.salesforce.com \
SALESFORCE_CONSUMER_KEY=YourConsumerKey \
SALESFORCE_CONSUMER_SECRET=YourConsumerSecret \
npx -y @surajadsul02/mcp-server-salesforce
# Example 2: OAuth2 authentication via stdio (Cursor/Desktop setup)
SALESFORCE_USERNAME=your.actual.email@example.com \
SALESFORCE_PASSWORD=YourActualPassword123 \
SALESFORCE_CONSUMER_KEY=YourConsumerKey \
SALESFORCE_CONSUMER_SECRET=YourConsumerSecret \
SALESFORCE_INSTANCE_URL=https://login.salesforce.com \
npx -y @surajadsul02/mcp-server-salesforce
Notes on IDE and desktop integrations
Cursor IDE and Claude Desktop integrations provide straightforward ways to connect your Salesforce MCP Server. In Cursor, you configure the MCP server to run with an env command that sets the Salesforce credentials and then launches the MCP server with npx. In Claude Desktop, you add a configuration that runs the MCP server via npx with the required environment variables.
# Cursor example snippet (env command)
{
"mcpServers": {
"salesforce": {
"command": "env",
"args": [
"SALESFORCE_USERNAME=your.actual.email@example.com",
"SALESFORCE_PASSWORD=YourActualPassword123",
"SALESFORCE_TOKEN=YourActualSecurityToken123",
"SALESFORCE_INSTANCE_URL=https://login.salesforce.com",
"npx",
"-y",
"@surajadsul02/mcp-server-salesforce"
]
}
}
}
# Claude Desktop example snippet (env command)
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@surajadsul02/mcp-server-salesforce"],
"env": {
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "https://login.salesforce.com"
}
}
}
}
Troubleshooting tips
If authentication fails, verify credentials and tokens. For OAuth2, confirm the consumer key and secret. If you run into connection issues, check the Salesforce instance URL and network access. When integrating with tools like Cursor or Claude Desktop, restart the client after configuration changes and ensure the MCP server package is installed globally.
Development and contribution
If you want to contribute, set up your development environment by installing dependencies and building the project. Then run the server locally to verify changes.
# Build steps (example flow)
git clone https://github.com/surajadsul02/mcp-server-salesforce.git
cd mcp-server-salesforce
npm install
npm run build
Available tools
searchObjects
Find Salesforce objects using partial name matches or keywords, returning relevant objects and metadata.
describeObjectSchema
Retrieve detailed schema information for a given object, including fields and relationships.
queryRecords
Execute flexible queries against Salesforce data, with support for relationships and filters.
manipulateRecords
Insert, update, delete, or upsert records across objects.
crossObjectSearch
Perform searches across multiple objects, leveraging SOSL when needed.
describeErrors
Provide Salesforce-specific error details and guidance when operations fail.