Rohit496/SF-MCP-SERVER
If you are the rightful owner of SF-MCP-SERVER and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for Salesforce, enabling programmatic access to Salesforce orgs and data via the MCP standard.
list_connected_salesforce_orgs
Lists all Salesforce orgs connected via the Salesforce CLI.
query_records
Executes a SOQL query against a specified Salesforce org.
sf-mcp-server
A Model Context Protocol (MCP) server for Salesforce, enabling programmatic access to Salesforce orgs and data via the MCP standard.
Features
- List all connected Salesforce orgs using the Salesforce CLI (
sf org list
). - Execute SOQL queries against a specified Salesforce org using the Salesforce CLI (
sf data query
). - Exposes these capabilities as MCP tools for integration with MCP clients.
Requirements
- Node.js (v18 or higher recommended)
- Salesforce CLI (
sf
) installed and authenticated with your Salesforce orgs
Installation
- Clone this repository:
git clone <repo-url> cd sf-mcp-server
- Install dependencies:
npm install
Usage
You can run the MCP server using Node.js:
npm start
Or directly:
node build/index.js
The server will start and listen for MCP requests over stdio.
Claude Configuration
To use Claude with this MCP server, configure your Claude client as follows:
- Set the MCP server endpoint to the location where this server is running (usually stdio or a local port if you adapt the transport).
- Ensure your Salesforce CLI is authenticated and accessible from the environment where the server runs.
- Use the provided MCP tools (
list_connected_salesforce_orgs
andquery_records
) from your Claude or MCP-compatible client.
Example Claude Client Configuration
- MCP Server Endpoint:
local
(or specify the port if using a network transport) - Tooling:
list_connected_salesforce_orgs
query_records
Refer to your Claude client documentation for details on connecting to a local MCP server.
Images
Below are example images for configuration and usage:
MCP Tools
1. list_connected_salesforce_orgs
Lists all Salesforce orgs connected via the Salesforce CLI.
2. query_records
Executes a SOQL query against a specified Salesforce org.
Input fields:
targetOrg
: Target Salesforce Org alias or usernamesObject
: Salesforce SObject to query fromfields
: Comma-separated list of fields to retrievewhere
: (Optional) WHERE clauseorderBy
: (Optional) ORDER BY clauselimit
: (Optional) Limit for the number of records returned
Development
- Source code is in the
src/
directory. - Build output is in the
build/
directory. - To build the project:
npm run build
License
MIT