@mindstone/mcp-server-salesforce
v0.1.3
Published
Salesforce CRM MCP server — accounts, contacts, opportunities, leads, tasks, and custom objects via Salesforce API
Downloads
356
Readme
@mindstone/mcp-server-salesforce
Salesforce CRM MCP server — accounts, contacts, opportunities, leads, tasks, users, and custom objects via the Salesforce API.
Best when an MCP host needs a local, install-and-run CRM connector for everyday sales work rather than a Salesforce-hosted endpoint.
Status
- Version: 0.1.2 · npm
- Auth: OAuth (local 127.0.0.1 callback) or static access token (
SALESFORCE_CLIENT_SECRET,SALESFORCE_ACCESS_TOKEN) - Tools: 26 (accounts, contacts, opportunities, leads, tasks, query)
- Surface: cloud-api
- Machine-readable:
STATUS.json
Why this exists
Salesforce's own MCP options are the right starting point for many teams. This package is for teams that want a normal npm MCP server they can run locally in any stdio host.
It gives an assistant focused access to the CRM work people actually ask for: finding accounts and contacts, updating leads, creating opportunities and tasks, running CRM searches, and working with custom objects. The benefit is a short path from a natural-language sales request to the right Salesforce records, with write actions kept visible to the host.
Example interaction
"Find Acme Corp in Salesforce, create a Q3 expansion opportunity for $75,000, and add a follow-up task for next Friday."
Tools the host calls:
salesforce_get_accounts— searches accounts by name and returns the matching account ID.salesforce_create_opportunity— creates the opportunity against that account.salesforce_create_task— adds a follow-up task related to the new opportunity.
Response (trimmed):
{
"account": { "id": "001xx000003DGbYAAW", "name": "Acme Corp" },
"opportunity": {
"id": "006xx000004TmiYAAS",
"name": "Q3 expansion",
"amount": 75000,
"stage": "Prospecting"
},
"task": {
"id": "00Txx000006rYxDEAU",
"subject": "Follow up on Q3 expansion"
}
}Requirements
- Node.js 20+
- npm
- A Salesforce Connected App for the OAuth path, or a valid access token plus instance URL for manual-token mode.
One-click install
After clicking the button, your host will prompt you to fill: SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_ACCESS_TOKEN, SALESFORCE_CONFIG_DIR, SALESFORCE_OAUTH_PORT.
{
"mcpServers": {
"Salesforce": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-salesforce"
],
"env": {
"SALESFORCE_CLIENT_ID": "",
"SALESFORCE_CLIENT_SECRET": "",
"SALESFORCE_ACCESS_TOKEN": "",
"SALESFORCE_CONFIG_DIR": "~/.mcp/salesforce",
"SALESFORCE_OAUTH_PORT": "0"
}
}
}
}Quick Start
Install & build
cd <path-to-repo>/connectors/salesforce
npm install
npm run buildnpx
npx -y @mindstone/mcp-server-salesforceLocal
node dist/index.jsConfiguration
OAuth (Recommended)
Set these environment variables:
SALESFORCE_CLIENT_ID— Your Salesforce Connected App client IDSALESFORCE_CLIENT_SECRET— Your Salesforce Connected App client secretSALESFORCE_SANDBOX— Set to"true"for sandbox environments (optional)
Then call salesforce_connect_account to start the OAuth flow.
Manual Token
SALESFORCE_ACCESS_TOKEN— A valid Salesforce access tokenSALESFORCE_INSTANCE_URL— Your Salesforce instance URL (e.g.,https://mycompany.my.salesforce.com)
Additional Options
SALESFORCE_CONFIG_DIR— Custom config directory (default:~/.mcp/salesforce)SALESFORCE_OAUTH_PORT— OAuth callback port (0= OS-assigned; default:0)SALESFORCE_OAUTH_SCOPES— Space-separated OAuth scopes. Leave unset to use the connector default.
Available Tools (26)
Account Management
salesforce_connect_account— Connect a Salesforce account via OAuthsalesforce_list_connected_accounts— List connected accountssalesforce_disconnect_account— Disconnect an account
CRM Accounts
salesforce_get_accounts— Get CRM accounts with filterssalesforce_create_account— Create a CRM accountsalesforce_update_account— Update a CRM account
Contacts
salesforce_get_contacts— Get contacts with filterssalesforce_create_contact— Create a contactsalesforce_update_contact— Update a contact
Opportunities
salesforce_get_opportunities— Get opportunities with filterssalesforce_create_opportunity— Create an opportunitysalesforce_update_opportunity— Update an opportunity
Leads
salesforce_get_leads— Get leads with filterssalesforce_create_lead— Create a leadsalesforce_convert_lead— Convert a lead to Account + Contactsalesforce_update_lead— Update a lead
Tasks
salesforce_get_tasks— Get tasks with filterssalesforce_create_task— Create a tasksalesforce_update_task— Update a task
Users
salesforce_get_users— Get Salesforce users
Query & Schema
salesforce_query— Execute raw SOQL queriessalesforce_describe_object— Get object metadata and fieldssalesforce_list_objects— List available Salesforce objects
Generic CRUD
salesforce_create_record— Create any Salesforce recordsalesforce_update_record— Update any Salesforce recordsalesforce_get_records— Query any Salesforce object
Security notes
- The standalone OAuth callback server binds to
127.0.0.1; it does not honour environment overrides that would expose the callback beyond loopback. - OAuth credentials are stored under
SALESFORCE_CONFIG_DIR(default~/.mcp/salesforce) with restrictive directory and file permissions. - Write and disconnect tools are marked so capable hosts can ask for confirmation before changing Salesforce data.
- SOQL helper paths escape string and
LIKEvalues, strip comments quote-safely before applying the query limit cap, and enforce a maximum of 200 records for raw SOQL queries.
Licence
FSL-1.1-MIT — Functional Source License, Version 1.1, with MIT future licence. The software converts to MIT licence on 2030-04-08.
