
Force
STDIOMCP server exposing Salesforce APIs for AI agents to interact with Salesforce organizations
MCP server exposing Salesforce APIs for AI agents to interact with Salesforce organizations
This program provides an MCP (Model Context Protocol) server that exposes Salesforce APIs as tools for use in AI agents. It enables AI assistants like Claude Desktop and VS Code to interact with your Salesforce organization through natural language.
Currently, the following APIs are covered :
This package is experimental.
Please use it ONLY in a sandbox, a developer org or a scratch org. NEVER use this in production : you have been warned.
The APIs provided by MCP Force are defined in the @rapidocloud/mcp-tools
package on NPMjs.org.
All Salesforce APIs will be connected, depending on user requests : open an issue to ask for more.
Finally, user authentication is manual, for the time being : set an OAuth2 access token in the .env
file. This will be improved very soon.
Create a .env
file in your project directory with your Salesforce credentials:
SALESFORCE_ENDPOINT='https://mydomain-dev-ed.developer.my.salesforce.com' # run this command : # sf org login web --instance-url ${SALESFORCE_ENDPOINT} --json SALESFORCE_ACCESS_TOKEN='<your_access_token_here>' # Set your port : 3001 by default PORT=3021
npx @rapidocloud/[email protected] --help
npx @rapidocloud/[email protected] list-tools
npx @rapidocloud/[email protected]
npx @rapidocloud/mcp-force run-server
npx @rapidocloud/mcp-force run-server --selectedAPIs 'rest,tooling'
npx @rapidocloud/mcp-force run-server --barredAPIs 'bulk'
npx @rapidocloud/mcp-force run-server --barredToolNames 'run_tests_sync, tooling_run_tests_async'
npm install -g @rapidocloud/[email protected] 1>&2 && npx @rapidocloud/[email protected] run-server --selectedAPIs 'rest, tooling, metadata' --barredAPIs 'auth, bulk, graphql'
To use this in your MCP server configuration :
{ "servers": { "mcpforce": { "command": "bash", "args": ["-c", "npm install -g @rapidocloud/[email protected] 1>&2 && npx @rapidocloud/[email protected] run-server --selectedAPIs 'rest, tooling, metadata' --barredAPIs 'auth, bulk, graphql'"], "env": { "SALESFORCE_ENDPOINT": "https://mydomain-dev-ed.developer.my.salesforce.com", "SALESFORCE_ACCESS_TOKEN": "<your_access_token_here>", "PORT": "3021" } } } }
Create or update .vscode/mcp.json
to configure the MCP server:
{ "servers": { "mcp-force": { "command": "npx", "args": ["-y", "@rapidocloud/mcp-force"], "env": { "SALESFORCE_ENDPOINT": "https://mydomain-dev-ed.developer.my.salesforce.com", "SALESFORCE_ACCESS_TOKEN": "<your_access_token_here>", "PORT": "3021" } } } }
Add the MCP server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "mcp-force": { "command": "npx", "args": ["-y", "@rapidocloud/mcp-force"], "env": { "SALESFORCE_ENDPOINT": "https://mydomain-dev-ed.developer.my.salesforce.com", "SALESFORCE_ACCESS_TOKEN": "<your_access_token_here>", "PORT": "3021" } } } }
No installation required! The MCP server will be automatically downloaded and run using npx when configured in your MCP client.
For development or testing, you can also run it directly:
npx @rapidocloud/mcp-force list-tools npx @rapidocloud/mcp-force run-server
In VS Code with the MCP extension and Agent mode enabled:
Cmd/Ctrl + Shift + P
)Sum the amount of all open Salesforce opportunities
The agent will:
In Claude Desktop with the MCP server configured:
Sum the total amount of all open Salesforce opportunities?
Connect to my Salesforce org and run a query to get this information.
Claude will:
SELECT Amount FROM Opportunity WHERE IsClosed = false AND Amount != null
Example response:
I've connected to your Salesforce org and found the following open opportunities:
Total Open Opportunity Amount: $2,450,000
Breakdown:
- 15 opportunities with amounts ranging from $25,000 to $500,000
- Average deal size: $163,333
- Largest opportunity: $500,000
- Smallest opportunity: $25,000