SF-MCP is a Node.js server that exposes Salesforce CLI functionality through the Model Context Protocol, allowing AI assistants to interact with Salesforce orgs. Developed by Kevin Poorman, it dynamically discovers and registers all available SF CLI commands as MCP tools, supports project-specific command execution through configurable roots, and includes caching mechanisms for improved performance. The implementation handles contextual command execution within Salesforce project directories, making it particularly valuable for developers and administrators who need to perform Salesforce operations like querying data, deploying code, or managing orgs through AI assistants.
No reviews yet. Be the first to review!
Sign in to join the conversation
Get the Salesforce CLI version information
Get help information for Salesforce CLI commands
Clear the command discovery cache
Refresh the command discovery cache
Set a Salesforce project directory to use for commands. Parameters: directory (string), name (optional string), description (optional string), isDefault (optional boolean)
List all configured project roots
Attempt to detect project directory from user messages
List Salesforce orgs. Parameters: json (optional boolean), verbose (optional boolean)
List authenticated Salesforce orgs. Parameters: json (optional boolean), verbose (optional boolean)
Display details about an org. Parameters: targetusername (string), json (optional boolean)
Open an org in the browser. Parameters: targetusername (string), path (optional string), urlonly (optional boolean)
Run anonymous Apex code. Parameters: targetusername (string), file (optional string), apexcode (string), json (optional boolean)
Run Apex tests. Parameters: targetusername (string), testnames (optional string), suitenames (optional string), classnames (optional string), json (optional boolean)
Execute a SOQL query. Parameters: targetusername (string), query (string), json (optional boolean)
List sObjects in the org. Parameters: targetusername (string), json (optional boolean)
Describe a Salesforce object. Parameters: targetusername (string), sobject (string), json (optional boolean)
Deploy the source to an org. Parameters: targetusername (string), sourcedir (string), json (optional boolean), wait (optional integer)