Newer Version Available

This content describes an older version of this product. View Latest

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.
  1. From Setup, in the Quick Find box, enter User Interface, and then select User Interface.
  2. On the User Interface page, select Enable MCP Service (Beta).
  3. (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.

Selecting Enable MCP Service (Beta) asserts that you accept the Beta Services Terms provided at the Agreements and Terms.

Note

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.
  1. From Setup, in the Quick Find box, enter external client, and then select External Client App Manager.
  2. Click New External Client App.
  3. Fill out the Basic Information section.
  4. In Callback URL, enter http://localhost:8080/oauth/callback.
    For other clients, consult the provider’s documentation for the callback URL.
  5. 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.
  6. Under Security:
    1. Select Issue JSON Web Token (JWT)-based access tokens for named users.
    2. Select Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows.
    3. Deselect all other options.
  7. Click Create.
  8. Click Settings, then click Consumer Key and Secret under OAuth Settings to get the consumer key.
    Store the consumer key for later use.

Check the Salesforce mcp-hosted repository for the latest updates on the Salesforce Hosted MCP Servers beta.

Important