Salesforce Cloud — Claude Code MCP server: deals and SOQL
Wires your AI agent into Salesforce: finds opportunities, reads engagement history and builds business cases as PDF.
claude mcp add --env SF_CLIENT_ID=<SF_CLIENT_ID> --env SF_CLIENT_SECRET=<SF_CLIENT_SECRET> --env SF_USERNAME=<SF_USERNAME> --env SF_PASSWORD=<SF_PASSWORD> --env SF_LOGIN_URL=<SF_LOGIN_URL> --transport stdio salesforce-cloud -- npx -y @aaronsb/salesforce-cloud-mcpWhat Salesforce Cloud does
The server hands the agent a set of Salesforce tools. You ask in plain language and it searches opportunities, pulls together calls and emails for one account, looks up comparable deals you already closed, and writes a business case document. Standard CRUD calls and SOQL queries are there too. Responses come paginated, so large result sets stay manageable for the model.
It runs from npx @aaronsb/salesforce-cloud-mcp. You need OAuth credentials from a Connected App: SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD, with SF_LOGIN_URL pointing at https://login.salesforce.com. Without those variables the server has nothing to authenticate with. An org admin creates the Connected App in Setup under App Manager, turns on OAuth, saves it, waits for activation and copies the Consumer Key.
You can register the server in your platform's config, or drop the JSON block into the Claude Desktop file — ~/.config/Claude/claude_desktop_config.json on Linux, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. MIT licensed, so you can adapt the code to your own process.
What it helps with
- find open opportunities tied to a named solution engineer
- see which stakeholders an account has actually met
- produce a business case PDF for one opportunity
- compare a live deal against similar closed-won ones
- pull opportunities at a given stage with SOQL
Example prompts for the agent
- Find open opportunities where Aaron Rochelle is the solution engineer
- Analyze engagement on the Acme Corp deal — who have we talked to and who is missing
- Generate a business case document for this opportunity
How to install Salesforce Cloud
Platform CLI
claude mcp add --env SF_CLIENT_ID=<SF_CLIENT_ID> --env SF_CLIENT_SECRET=<SF_CLIENT_SECRET> --env SF_USERNAME=<SF_USERNAME> --env SF_PASSWORD=<SF_PASSWORD> --env SF_LOGIN_URL=<SF_LOGIN_URL> --transport stdio salesforce-cloud -- npx -y @aaronsb/salesforce-cloud-mcpReplace <…> with your own values
Platform CLI
codex mcp add salesforce-cloud --env SF_CLIENT_ID=<SF_CLIENT_ID> --env SF_CLIENT_SECRET=<SF_CLIENT_SECRET> --env SF_USERNAME=<SF_USERNAME> --env SF_PASSWORD=<SF_PASSWORD> --env SF_LOGIN_URL=<SF_LOGIN_URL> -- npx -y @aaronsb/salesforce-cloud-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"salesforce-cloud": {
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<SF_CLIENT_SECRET>",
"SF_USERNAME": "<SF_USERNAME>",
"SF_PASSWORD": "<SF_PASSWORD>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"salesforce-cloud": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<SF_CLIENT_SECRET>",
"SF_USERNAME": "<SF_USERNAME>",
"SF_PASSWORD": "<SF_PASSWORD>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SF_CLIENT_ID=<SF_CLIENT_ID> -e SF_CLIENT_SECRET=<SF_CLIENT_SECRET> -e SF_USERNAME=<SF_USERNAME> -e SF_PASSWORD=<SF_PASSWORD> -e SF_LOGIN_URL=<SF_LOGIN_URL> salesforce-cloud npx -y @aaronsb/salesforce-cloud-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Salesforce Cloud
How do I install Salesforce Cloud in Claude Code?
Run `claude mcp add salesforce-cloud -e SF_CLIENT_ID=<SF_CLIENT_ID> -e SF_CLIENT_SECRET=<SF_CLIENT_SECRET> -e SF_PASSWORD=<SF_PASSWORD> -e SF_LOGIN_URL=<SF_LOGIN_URL> -- npx -y @aaronsb/salesforce-cloud-mcp. A second form adds --transport stdio and SF_USERNAME` explicitly.
What does Salesforce Cloud do?
It gives an agent access to Salesforce data: opportunity search, engagement analysis for an account, lookups of similar won deals, business case generation and SOQL queries.
What do I need before running it?
OAuth credentials from a Connected App in your Salesforce org: SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, SF_PASSWORD. The login endpoint goes in SF_LOGIN_URL.