Metadata Coverage
Quick Start Using the VS Code With Copilot MCP Client
Install and Configure the Salesforce DX MCP Server
Use the Core Salesforce DX MCP Tools
Limitations for Salesforce DX
Previous PDF Versions
Use the core Salesforce DX MCP tools to run classic DX tasks, such as work with orgs, retrieve and deploy metadata, run Apex tests, and more.
The core DX tools are grouped into these toolsets:
orgsmetadatadatauserstestingSee the toolset topic for information about the other available toolsets, such as DevOps and LWC, and links to documentation about how to effectively use them.
To work with the core DX MCP tools, you need the standard Salesforce DX environment set up on your computer. In particular:
Install and configure the Salesforce DX MCP Server in your MCP client.
Create a Salesforce DX project and open it in VS Code. You can also clone an example repo, such as dreamhouse-lwc, which is a ready-to-use DX project that contains a simple Salesforce application, with metadata and test data.
Authorize at least one development Salesforce org to use with your DX project, such as a Trailhead playground, sandbox, scratch org, or Developer Edition org, and set it as your default org.
If you want to create a scratch org using MCP, then you must also authorize a Dev Hub org.
Here are some sample prompts to get you started using the core DX MCP tools. You never call a specific MCP tool directly; as always in this exciting new AI world, you use natural language to tell the LLM what you want to accomplish, and it then figures out what tools to call to complete the task.
You can configure your MCP client to automatically run MCP tools that just provide information, but to ask for your explicit confirmation before it runs a tool that makes a real change in your local DX project or in your org. We think this behavior is a good idea.
Get information about the orgs that the DX MCP Server knows about:
Tips:
--orgs flag in your DX MCP Server configuration and either add the org’s alias or username or specify ALLOW_ALL_ORGS.Open your org in a browser:
Tips:
Work with scratch orgs and snapshots:
Tips:
--orgs flag in your DX MCP Server configuration and either add the new scratch org alias or username or specify ALLOW_ALL_ORGS.Get information about your org:
Deploy and retrieve metadata:
Run tests:
The core Salesforce DX MCP Server provides these tools for working with orgs, metadata, and so on. We provide this reference information so you understand what kinds of tasks these tools can accomplish; you don’t call these tools directly, but rather the LLM does.
The tools marked NON-GA are not yet generally available, specify the --allow-non-ga-tools flag in your DX MCP Server configuration to use them. See Configure the Salesforce DX MCP Server for Your Environment.
| Tool name | Toolset | GA? | Description |
|---|---|---|---|
get_username | core (always available) | GA | Determines the appropriate username or alias for Salesforce operations, handling both default orgs and Dev Hubs. |
resume_tool_operation | core (always available) | GA | Resumes a long-running operation that wasn’t completed by another tool. |
list_all_orgs | orgs | GA | Lists all configured Salesforce orgs. |
create_org_snapshot | orgs | NON-GA | Creates a scratch org snapshot. |
create_scratch_org | orgs | NON-GA | Creates a scratch org. |
delete_org | orgs | NON-GA | Deletes a locally-authorized Salesforce scratch org or sandbox. |
org_open | orgs | NON-GA | Opens a Salesforce org in a browser. |
run_soql_query | data | GA | Runs a SOQL query against a Salesforce org. |
assign_permission_set | users | GA | Assigns a permission set to the user or on behalf of another user. |
deploy_metadata | metadata | GA | Deploys metadata from your Salesforce DX project to an authorized org. |
retrieve_metadata | metadata | GA | Retrieves metadata from an authorized org to your Salesforce DX project. |
run_agent_test | testing | GA | Executes Agentforce agent tests in your authorized org. |
run_apex_test | testing | GA | Executes Apex tests in your authorized org. |
See Also