First setup and authorize your Salesforce Developer org into VsCode.
Then go to .vscode folder and create mcp.json.
Then paste the following in mcp.json:
{
"servers": {
"Salesforce DX": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@salesforce/mcp", "--orgs", "DEFAULT_TARGET_ORG", "--toolsets", "all"]
}
}
}
Keep the github copilot extension installed in vscode to query your org using the desired ai models.
Select Agent option in the chat window, refer to below image for reference:
Now click on the Start button to start the mcp server and also do select whichever LLM you want to use from the copilot window:
Voila! we are all set, now keep happily querying your org.
Some example queries:
Query1: Give me the names and owner name alongwith the status of leads which are from CA.
Query2: List me all the permission sets which are assigned to the user Debajyoti Das.
Query3: Remove the assignment of the 3rd permission for Debajyoti Das
For more info kindly read the git document:
salesforcecli
/
mcp
MCP Server for interacting with Salesforce instances
mcp
MCP Server for Interacting with Salesforce Orgs
Overview of the Salesforce DX MCP Server (Developer Preview)
The Salesforce DX MCP Server is a specialized Model Context Protocol (MCP) implementation designed to facilitate seamless interaction between large language models (LLMs) and Salesforce orgs. This MCP server provides a robust set of tools and capabilities that enable LLMs to read, manage, and operate Salesforce resources securely.
Key Features:
- Direct interaction with Salesforce orgs through LLM-driven tools.
- Secure access using TypeScript libraries (not shelling out to the
sf
Salesforce CLI). - Improved security by avoiding the exposure of secrets in plain text.
- Granular access control with org allowlisting.
- Modular tool architecture for easy extensibility.
NOTE: The Salesforce DX MCP Server is available as a developer preview. The feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and…
Top comments (0)