mcp
@salesforcecli
About mcp
MCP Server for interacting with Salesforce instances
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"Salesforce DX": {
"command": "npx",
"args": [
"-y",
"@salesforce/mcp",
"--orgs",
"DEFAULT_TARGET_ORG",
"--toolsets",
"orgs,metadata,data,users",
"--tools",
"run_apex_test",
"--allow-non-ga-tools"
]
}
}
}Tools
12Intelligently determines the appropriate username or alias for Salesforce operations. WHEN TO USE THIS TOOL: - When uncertain which org username a user wants for Salesforce operations. To resolve the default org username, set the defaultTargetOrg param to true and defaultDevHub to false. To resole the default devhub org username, set the defaultTargetOrg param to false and defaultDevHub to true. If it's not clear which type of org to resolve, set both defaultTargetOrg and defaultDevHub to false to an allow-listed org username available.
Resume a long running operation that was not completed by another tool. AGENT INSTRUCTIONS: Use this tool to resume a long running operation. EXAMPLE USAGE: Resume the metadata deploy job 0Af1234567890 Resume the deployment and wait for 10 minutes Resume the deployment to my org Resume scratch org creation Resume job 2SR1234567890 Resume agent tests Resume org snapshot with ID 0OoKa000000XZAbKAO Report on my org snapshot
Run a SOQL query against a Salesforce org.
Creates a new snapshot of an org AGENT INSTRUCTIONS: Example usage: Create a snapshot called 07042025 create a snapshot called 07042025 with the description, "this is a snapshot for commit 5b1a09b1743 - new login flow working" create a snapshot of my MyScratch in myDevHub
Creates a scratch org with the specified parameters. AGENT INSTRUCTIONS: Example usage: Create a scratch org create a scratch org with the definition file myDefinition.json that lasts 3 days create a scratch org aliased as MyNewOrg and set as default and don't wait for it to finish
Deletes specified salesforce org. AGENT INSTRUCTIONS: ALWAYS confirm with the user before deleting an org Example usage: Can you delete my org Can you delete MyAliasedOrg Can you delete [email protected]
Lists all configured Salesforce orgs. AGENT INSTRUCTIONS: DO NOT use this tool to try to determine which org a user wants, use #get_username instead. Only use it if the user explicitly asks for a list of orgs. Example usage: Can you list all Salesforce orgs for me List all Salesforce orgs List all orgs
Open a Salesforce org in the browser. You can specify a metadata file you want to open.
Deploy metadata to an org from your local project. AGENT INSTRUCTIONS: If the user doesn't specify what to deploy exactly ("deploy my changes"), leave the "sourceDir", "ignoreConflicts" and "manifest" params empty so the tool calculates which files to deploy. EXAMPLE USAGE: Deploy changes to my org Deploy this file to my org Deploy the manifest Deploy X metadata to my org Deploy X local files to my org and ignore any conflicts between the local project and org Deploy X to my org and run A,B and C apex tests.
Retrieve metadata from an org to your local project. AGENT INSTRUCTIONS: If the user doesn't specify what to retrieve exactly ("retrieve my changes"), leave the "sourceDir", "ignoreConflicts", and "manifest" params empty so the tool calculates which files to retrieve. EXAMPLE USAGE: Retrieve changes Retrieve changes from my org Retrieve this file from my org Retrieve the metadata in the manifest Retrieve X metadata from my org Retrieve X metadata from my org and ignore any conflicts between the local project and org
Assign a permission set to one or more org users.
Run Apex tests in an org. AGENT INSTRUCTIONS: If the user doesn't specify what to test, take context from the currently open file This will ONLY run APEX tests, NOT agent tests, lightning tests, flow tests, or any other type of test. this should be chosen when a file in the 'classes' directory is mentioned EXAMPLE USAGE: Run tests A, B, C. Run the myTestMethod in this file Run this test and include success and failures Run all tests in the org. Test the "mySuite" suite asynchronously. I’ll check results later. Run tests for this file and include coverage What are the results for 707XXXXXXXXXXXX
Overview
What is mcp?
mcp is a Model Context Protocol (MCP) server that enables large language models (LLMs) to interact with Salesforce orgs. It provides a robust set of tools for reading, managing, and operating Salesforce resources securely.
How to use mcp?
Install and configure mcp by adding its JSON configuration to your MCP client’s settings. The server is run via npx -y @salesforce/mcp with required --orgs flag and optional --toolsets, --tools, and other flags. See the README for client-specific examples (VS Code, Claude Code, Cline, Cursor, etc.).
Key features of mcp
- Interact with Salesforce orgs through LLMs securely.
- Selectively enable tool groups via toolsets (orgs, metadata, data, users).
- Specify individual tools with the
--toolsflag. - Support for multiple authorized orgs using the
--orgsflag. - Boolean flags for debug logging, non‑GA tools, dynamic tool discovery, and telemetry control.
- Works with various MCP clients (VS Code, Claude Code, Cline, Cursor, etc.).
Use cases of mcp
- Query and manage Salesforce metadata, data, and users through an LLM.
- Run Apex tests and retrieve results via natural language.
- Automate Salesforce administrative tasks using AI assistants.
- Build custom AI‑powered workflows that interact with Salesforce orgs.
FAQ from mcp
What toolsets does mcp support?
The --toolsets flag accepts sets like orgs, metadata, data, users, or all to enable all tools. Toolsets group related functionality to reduce LLM context.
How do I specify which org mcp can access?
Use the required --orgs flag with values such as DEFAULT_TARGET_ORG, DEFAULT_TARGET_DEV_HUB, ALLOW_ALL_ORGS, or a specific username/alias. Org must be authorized locally first.
Does mcp require any additional runtime or dependencies?
mcp is installed via npx from the @salesforce/mcp npm package. No extra runtime is needed beyond Node.js and a compatible MCP client.
Can I enable only specific tools instead of entire toolsets?
Yes, use the --tools flag to list individual tool names (e.g., run_apex_test). You can combine --toolsets and --tools to fine‑tune which tools are active.
Is telemetry enabled by default? How can I disable it?
Telemetry is enabled by default. To disable it, include the --no-telemetry Boolean flag in the args option of your MCP client configuration.
Frequently asked questions
What toolsets does mcp support?
The `--toolsets` flag accepts sets like `orgs`, `metadata`, `data`, `users`, or `all` to enable all tools. Toolsets group related functionality to reduce LLM context.
How do I specify which org mcp can access?
Use the required `--orgs` flag with values such as `DEFAULT_TARGET_ORG`, `DEFAULT_TARGET_DEV_HUB`, `ALLOW_ALL_ORGS`, or a specific username/alias. Org must be authorized locally first.
Does mcp require any additional runtime or dependencies?
mcp is installed via `npx` from the `@salesforce/mcp` npm package. No extra runtime is needed beyond Node.js and a compatible MCP client.
Can I enable only specific tools instead of entire toolsets?
Yes, use the `--tools` flag to list individual tool names (e.g., `run_apex_test`). You can combine `--toolsets` and `--tools` to fine‑tune which tools are active.
Is telemetry enabled by default? How can I disable it?
Telemetry is enabled by default. To disable it, include the `--no-telemetry` Boolean flag in the `args` option of your MCP client configuration.
Basic information
More Other MCP servers

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

Glasswarp
GlasswarpSee and control a real Windows PC you own — from any MCP client, locally or remotely. Observe (UIA + screenshots), click/type/drag/scroll, launch apps, owner Live View. BYOH: your machine, your key.
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Comments