sf-mcp
The Salesforce CLI MCP Server is a Model Context Protocol server that integrates Salesforce CLI functionalities into AI tools like Claude Desktop. It wraps Salesforce CLI commands as tools and resources, allowing AI workflows to access Salesforce command-line capabilities.
What are the prerequisites for using the Salesforce CLI MCP Server?
You need Node.js 18+, npm, and a configured Salesforce CLI with your Salesforce org credentials.
How do I start the Salesforce CLI MCP Server?
You can start the server using npm start
or with project roots using npm start /path/to/project1 /path/to/project2
.
How can I refresh the command cache?
Use the sf_cache_refresh
tool to update the cache, then restart the server.
How do I configure project roots?
Project roots can be configured via command line arguments, MCP tools, or in Claude Desktop's .claude.json
configuration.
What should I do if I encounter cache issues?
Stop the server, delete the cache file ~/.sf-mcp/command-cache.json
, and restart the server to force a complete rediscovery of commands.