Newer Version Available
Prerequisites: Set Up Salesforce Hosted MCP Servers (Beta)
The Salesforce API Context MCP server is one of many Salesforce Hosted MCP Servers. To
use the Salesforce API Context MCP server, you must first set up the Salesforce Hosted MCP
Server.
Enable the Beta
To enable this beta, follow these steps. You must have either the Modify All Data or
the Customize Application permission.
- From Setup, in the Quick Find box, enter User Interface, and then select User Interface.
- On the User Interface page, select Enable MCP Service (Beta).
- (Optional) To enable the Salesforce Hosted MCP Servers beta in a scratch org, first create the org with the SalesforceHostedMCP feature. See Scratch Org Features.
Create an External Client App
External client apps enable third-party applications to integrate with Salesforce
using APIs and security protocols.
In this Quick Start, we provide the steps to use Cursor as your MCP client. Cursor is
an AI-driven coding editor that supports MCP. To use Cursor as your MCP client, you must
install Node.js. After installing Node.js, confirm that your installation was successful by
running the commands node -v and npm -v from the command line.
- From Setup, in the Quick Find box, enter external client, and then select External Client App Manager.
- Click New External Client App.
- Fill out the Basic Information section.
-
In Callback URL, enter http://localhost:8080/oauth/callback.
For other clients, consult the provider’s documentation for the callback URL.
- In OAuth Scopes, add the Manage user data via APIs (api), Access the Salesforce API Platform (sfap_api) and Perform requests at any time (refresh_token, offline_access) scopes. If you’re using prompt templates, add the Access Einstein GPT services (einstein_gpt_api) scope.
-
Under Security:
- Select Issue JSON Web Token (JWT)-based access tokens for named users.
- Select Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows.
- Deselect all other options.
- Click Create.
-
Click Settings, then click Consumer Key and
Secret under OAuth Settings to get the consumer key.
Store the consumer key for later use.