Salesforce CLI
About
Exposes Salesforce CLI functionality for interacting with Salesforce orgs, enabling developers to query data, deploy code, and manage orgs through dynamically discovered commands.
Details
- Author
- codefriar
- Repository
- codefriar/sf-mcp
- GitHub stars
- 24
- Downloads
- 345
- Categories
- AI, Developer Tools, Search, Infrastructure, Project Management
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Salesforce CLICommand (node, npx, python, etc.)/path/to/nodeArguments-
Argument 1
/path/to/sf-mcp/build/index.js -
Argument 2
/path/to/project1 -
Argument 3
/path/to/project2
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
npm install
npm start
To configure this MCP in Claude Desktop's .claude.json configuration:
json{
"tools": {
"salesforce": {
"command": "/path/to/node",
"args": [
"/path/to/sf-mcp/build/index.js",
"/path/to/project1",
"/path/to/project2"
]
}
}
}
Using the npm package directly:
json{
"tools": {
"salesforce": {
"command": "/path/to/npx",
"args": [
"-y",
"codefriar/sf-mcp",
"/path/to/project1",
"/path/to/project2"
]
}
}
}
Method 1: Via Command Line Arguments
bash
sf_list_roots
sf_version
Get the Salesforce CLI version information
sf_help
Get help information for Salesforce CLI commands
sf_cache_clear
Clear the command discovery cache
sf_cache_refresh
Refresh the command discovery cache
sf_set_project_directory
Set a Salesforce project directory to use for commands. Parameters: directory (path to a directory containing a sfdx-project.json file), name (optional name for this project root), description (optional description for this project root), isDefault (optional set this root as the default for command execution)
sf_list_roots
List all configured project roots
sf_detect_project_directory
Attempt to detect project directory from user messages
sf_org_list
List Salesforce orgs. Parameters: json, verbose
sf_auth_list_orgs
List authenticated Salesforce orgs. Parameters: json, verbose
sf_org_display
Display details about an org. Parameters: targetusername, json
sf_org_open
Open an org in the browser. Parameters: targetusername, path, urlonly
sf_apex_run
Run anonymous Apex code. Parameters: targetusername, file, apexcode, json
sf_apex_test_run
Run Apex tests. Parameters: targetusername, testnames, suitenames, classnames, json
sf_data_query
Execute a SOQL query. Parameters: targetusername, query, json
sf_schema_list_objects
List sObjects in the org. Parameters: targetusername, json
sf_schema_describe
Describe a Salesforce object. Parameters: targetusername, sobject, json
sf_project_deploy_start
Deploy the source to an org. Parameters: targetusername, sourcedir, json, wait
This MCP server provides Salesforce CLI commands as MCP tools. It automatically discovers and registers all available commands from the Salesforce CLI, and also specifically implements the most commonly used commands.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"salesforce cli": {
"env": {},
"args": [
"/path/to/sf-mcp/build/index.js",
"/path/to/project1",
"/path/to/project2"
],
"shell": false,
"command": "/path/to/node"
}
}
}
Linux
{
"env": [],
"args": [
"/path/to/sf-mcp/build/index.js",
"/path/to/project1",
"/path/to/project2"
],
"shell": false,
"command": "/path/to/node"
}
Macos
{
"env": [],
"args": [
"/path/to/sf-mcp/build/index.js",
"/path/to/project1",
"/path/to/project2"
],
"shell": false,
"command": "/path/to/node"
}
Windows
{
"env": [],
"args": [
"/c",
"/path/to/npx",
"-y",
"codefriar/sf-mcp",
"/path/to/project1",
"/path/to/project2"
],
"shell": true,
"command": "cmd"
}
Salesforce CLI MCP Server
Model Context Protocol (MCP) server for providing Salesforce CLI functionality to LLM tools like Claude Desktop.
Overview
This MCP server wraps the Salesforce CLI (sf) command-line tool and exposes its commands as MCP tools and resources, allowing LLM-powered agents to:
- View help information about Salesforce CLI topics and commands
- Execute Salesforce CLI commands with appropriate parameters
- Leverage Salesforce CLI capabilities in AI workflows
Requirements
- Node.js 18+ and npm
- Salesforce CLI (sf) installed and configured
- Your Salesforce org credentials configured in the CLI
Installation
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




