salesforce-mcp
Provides tools for searching objects, describing object schemas, executing SOQL queries with relationship traversal, performing aggregate queries (GROUP BY, COUNT, SUM, AVG, MIN, MAX), performing DML operations (insert, update, delete, upsert), and running cross-object SOSL searches on Salesforce CRM data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@salesforce-mcpsearch for contacts matching 'john'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
salesforce-mcp
MCP (Model Context Protocol) server for Salesforce CRM, scoped to the WYRE Gateway BYOC use case.
A focused HTTP MCP server that exposes a Salesforce org's CRM data surface to Claude (and other MCP clients) through the WYRE MCP Gateway. Built for the multi-tenant gateway pattern: credentials are injected per-request via HTTP headers, no startup secrets are baked into the container.
Scope discipline
This package intentionally ships a narrow tool surface — six CRM data tools — and deliberately omits the Apex code-management / custom-object-creation / EXECUTE_ANONYMOUS surfaces that broader Salesforce MCP servers include. The use case is read/write access to standard CRM objects (Accounts, Contacts, Opportunities, Leads, Cases). Customers who need DX or admin tooling should use the official @salesforce/mcp package instead.
Related MCP server: sf-mcp
Tools
Tool | Purpose |
| Find standard + custom objects by partial name. |
| Full schema (fields, picklists, relationships) for an object. |
| Execute SOQL with relationship traversal. |
| SOQL GROUP BY / COUNT / SUM / AVG / MIN / MAX. |
| Insert / update / delete / upsert records. |
| Cross-object SOSL search. |
Run modes
http(default): listens on:8080, exposes/mcp(JSON-RPC) +/health. Per-request credentials fromX-Salesforce-*headers. This is the gateway deployment shape. HTTP refuses to start unlessCONDUIT_S2S_SECRETis a real secret.stdio: traditional MCP client transport (Claude Desktop / Cursor). Credentials read once from env. The stdio transport does not useCONDUIT_S2S_SECRET.
Copy .env.example and set the variables below. Leave CONDUIT_S2S_SECRET empty in that file.
Variable | Required | Description |
| For stdio and | Client Credentials flow. |
| For username-password | Used when |
| No |
|
| No |
|
| Yes for HTTP | Service-to-service secret. HTTP logs an error and exits non-zero when this is empty or a known placeholder ( |
| No | Set to exactly |
| No | Bind address when a usable |
| No | HTTP port. Defaults to |
| No | Fallback bind address when |
/health stays unauthenticated and does not read credentials.
# HTTP mode (exits unless CONDUIT_S2S_SECRET is a real secret)
CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" PORT=8080 MCP_TRANSPORT=http AUTH_MODE=gateway npm start
# Local HTTP only, without a service-to-service secret (always binds 127.0.0.1)
MCP_ALLOW_INSECURE_DEV=1 MCP_TRANSPORT=http npm start
# stdio mode (env-baked, local testing; no S2S secret)
MCP_TRANSPORT=stdio \
SALESFORCE_AUTH_FLOW=client_credentials \
SALESFORCE_CLIENT_ID=... SALESFORCE_CLIENT_SECRET=... \
SALESFORCE_INSTANCE_URL=https://yourorg.my.salesforce.com \
node dist/entry.jsHeader contract (gateway mode)
Every /mcp request must include a valid X-Gateway-S2S header when CONDUIT_S2S_SECRET is set. Gateway mode also requires the credential headers for the chosen flow. A request missing them returns 401 and does not fall back to SALESFORCE_* in the process environment.
Header | Required? | Notes |
| Yes when the S2S secret is set |
|
| optional |
|
| for client_credentials | Connected App consumer key. |
| for client_credentials | Connected App consumer secret. |
| for client_credentials | Customer's My Domain URL (e.g. |
| for username_password | Salesforce user. |
| for username_password | Salesforce password. |
| for username_password | Security token (required unless IP allowlisted). |
Per-request authentication means the same container instance can service many customers without restart — each MCP tools/call builds a fresh jsforce.Connection from the headers on that request.
X-Gateway-S2S signing
v1 is HMAC-SHA256, hex-encoded, of the ASCII string t=<unix seconds> (the same t= prefix that starts the header), keyed with CONDUIT_S2S_SECRET. The timestamp must be within 300 seconds of the server clock. A missing or invalid header returns HTTP 401. The secret is never written to logs or the response body.
t=$(date +%s)
v1=$(printf 't=%s' "$t" | openssl dgst -sha256 -hmac "$CONDUIT_S2S_SECRET" | awk '{print $NF}')
curl -sS http://127.0.0.1:8080/mcp \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-H "X-Gateway-S2S: t=${t},v1=${v1}" \
-H "X-Salesforce-Client-Id: ..." \
-H "X-Salesforce-Client-Secret: ..." \
-H "X-Salesforce-Instance-Url: https://yourorg.my.salesforce.com" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Salesforce Connected App setup
For Client Credentials flow (the recommended path):
Salesforce Setup → App Manager → New Connected App.
Under API (Enable OAuth Settings): turn on Enable OAuth Settings and Enable Client Credentials Flow.
Save, wait ~5 minutes for propagation.
Manage → Edit Policies → Client Credentials Flow → set a Run As user (the API calls run with that user's permissions).
Copy the Consumer Key and Consumer Secret from the Connected App into the gateway BYOC fields as
clientIdandclientSecret.Set
instanceUrlto the customer's My Domain URL (Setup → My Domain).
Build
npm install
npm run buildContainer
The image listens on 0.0.0.0 inside the container (MCP_HTTP_HOST) and defaults to AUTH_MODE=gateway. Publish the port on loopback and pass the S2S secret. In gateway mode, Salesforce credentials arrive on each request as headers; they are not read from the environment.
docker build -t salesforce-mcp:dev .
docker run --rm \
-e CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" \
-p 127.0.0.1:8080:8080 \
salesforce-mcp:dev
curl -s http://127.0.0.1:8080/healthCompose refuses to start when CONDUIT_S2S_SECRET is unset, sets AUTH_MODE=gateway, publishes 127.0.0.1:8080:8080, and does not inject SALESFORCE_*:
CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" docker compose upSingle-tenant HTTP (AUTH_MODE=env) still requires the S2S secret, then uses SALESFORCE_*:
docker run --rm \
-e CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" \
-e AUTH_MODE=env \
-e SALESFORCE_AUTH_FLOW=client_credentials \
-e SALESFORCE_CLIENT_ID=your-value \
-e SALESFORCE_CLIENT_SECRET=your-value \
-e SALESFORCE_INSTANCE_URL=https://yourorg.my.salesforce.com \
-p 127.0.0.1:8080:8080 \
salesforce-mcp:devThe published image lives at ghcr.io/wyre-ai/salesforce-mcp with :latest, :sha-<short_sha>, and :v<version> tags.
License
Apache-2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
Secure MCP server for exploring incwo CRM data, documents, and email workflows.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
Single-connection MCP gateway discovering and executing 490+ verified MCP & A2A tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis MCP server provides tools to interact with the Salesforce Agentforce API, allowing authentication, session creation, and message exchange with Salesforce agents.10-
- AlicenseNot gradedqualityCmaintenanceMCP server for Salesforce that exposes CLI, REST, Connect, Data 360, Bulk 2.0, and Einstein Models APIs as tools for any MCP-compatible client to manage orgs, data, and metadata.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides comprehensive access to Salesforce Tooling API for metadata management, SOQL queries, code analysis, and debugging through Claude and other AI assistants.24 npm5MIT
- FlicenseBqualityDmaintenanceA customizable MCP server for integrating Salesforce APIs with GenAI applications, supporting SOQL queries, record CRUD, metadata access, and more.138-