The MCP Salesforce Connector enables LLMs to interact with Salesforce data and APIs through the following capabilities:
Run SOQL Queries (
run_soql_query): Execute Salesforce Object Query Language queries to retrieve structured data.Run SOSL Searches (
run_sosl_search): Perform searches across multiple objects and fields (e.g.,FIND {John Smith} IN ALL FIELDS).Get Object Fields (
get_object_fields): Retrieve metadata for Salesforce objects, including field names, labels, and data types.Record Management: Retrieve (
get_record), create (create_record), update (update_record), and delete (delete_record) records for any Salesforce object.Tooling API (
tooling_execute): Make GET, POST, PATCH, and DELETE calls to the Salesforce Tooling API (e.g., accessApexClassmetadata).Apex REST (
apex_execute): Call custom Apex REST endpoints with GET, POST, PATCH, and DELETE methods.Direct REST API (
restful): Make arbitrary REST API calls to any Salesforce endpoint with custom paths, methods, query parameters, and request bodies.
Supports OAuth, Salesforce CLI, and username/password authentication, and works with both production and sandbox environments.
Enables interaction with Salesforce data through SOQL queries, SOSL searches, and various operations including retrieving metadata, managing records (create, read, update, delete), executing Tooling API requests, running Apex REST requests, and making direct REST API calls to Salesforce.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Salesforce Connectorshow me the last 10 opportunities created this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Salesforce Connector
A Model Context Protocol (MCP) server implementation for Salesforce integration, allowing LLMs to interact with Salesforce data through SOQL queries and SOSL searches.
Features
Execute SOQL (Salesforce Object Query Language) queries
Perform SOSL (Salesforce Object Search Language) searches
Retrieve metadata for Salesforce objects, including field names, labels, and types
Retrieve, create, update, and delete records
Execute Tooling API requests
Execute Apex REST requests
Make direct REST API calls to Salesforce
Related MCP server: MCP Database Server
Configuration
Model Context Protocol
To use this server with the Model Context Protocol, you need to configure it in your claude_desktop_config.json file. Add the following entry to the mcpServers section:
Note on Salesforce Authentication Methods
This server supports three authentication methods:
OAuth (Recommended): Set
SALESFORCE_ACCESS_TOKENandSALESFORCE_INSTANCE_URLas environment variables.Salesforce CLI (Default Org): If no OAuth env vars are set, the server will try to use the active Salesforce CLI default org from the current workspace (via
sf org display --jsonorsfdx force:org:display --json). Optionally setSALESFORCE_CLI_TARGET_ORGto target a specific org.Username/Password (Legacy): If
SALESFORCE_ACCESS_TOKENandSALESFORCE_INSTANCE_URLare not set, the server will fall back to usingSALESFORCE_USERNAME,SALESFORCE_PASSWORD, andSALESFORCE_SECURITY_TOKEN.
Environment Configuration
SALESFORCE_DOMAINSet totestto connect to a Salesforce sandbox environment. If not set or left empty, the server will connect to the production environment.SALESFORCE_CLI_TARGET_ORGWhen using the Salesforce CLI authentication method, set this to target a specific org alias or username instead of the default org.