---
schema_version: "1"
id: 40e6074aa5f01b0ed8b7d5b4714b21ba09738616ca813ce55999a289bdd5a6cf
title: "Prerequisites: Set Up Salesforce Hosted MCP Servers"
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_mcp_server_eca.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_mcp_server_eca.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c5f33e5b1be99fac4b0ccf8c06369e777ab36dfe009d3afa385a19bec043bb62
description: "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.Activate the API Context MCP Server in your org.External client apps enable third-party applications to integrate with Salesforce using APIs and security protocols. You need an external client app if you’re using these tools with any MCP client other than Agentforce Vibes. Skip this step if you’re using the API Context tools in Agentforce Vibes.When you configure your MCP client and initiate its authentication, it opens a web browser to authenticate into your org via OAuth. To prepare for this, additional steps are sometimes needed for the authentication to succeed. Since the MCP spec doesn't have special provisions for systems like Salesforce with multiple tenants, we recommend the following steps:"
---
# Prerequisites: Set Up Salesforce Hosted MCP Servers

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.

## Activate the MCP Server

Activate the API Context MCP Server in your org.

1. From Setup, in the Quick Find box, enter MCP Servers, and then select **MCP Servers**.
2. Click **salesforce-api-context** and click **Activate**.

## Create an External Client App

External client apps enable third-party applications to integrate with Salesforce using APIs and security protocols. You need an external client app if you’re using these tools with any MCP client other than Agentforce Vibes. Skip this step if you’re using the API Context tools in Agentforce Vibes.

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. Expand the section labeled **API (Enable OAuth Settings)** and click the **Enable OAuth** checkbox.
5. In Callback URL, enter [http://localhost:8080/oauth/callback](http://localhost:8080/oauth/callback).
    
    For other clients, consult the provider’s documentation for the callback URL.
6. 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.
7. 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.
8. Click **Create**.
9. Click **Settings**, then click **Consumer Key and Secret** under OAuth Settings to get the consumer key.
    
    Store the consumer key for later use.

## Log Into Your Target Org

When you configure your MCP client and initiate its authentication, it opens a web browser to authenticate into your org via OAuth. To prepare for this, additional steps are sometimes needed for the authentication to succeed. Since the MCP spec doesn't have special provisions for systems like Salesforce with multiple tenants, we recommend the following steps:

1. Log out of all other Salesforce orgs.
2. Using your default browser, log into the org that you want to access from your MCP client.
    
    This should be the org in which you created the External Client App in the previous section.
3. Keep the browser open, since the MCP client will open a new tab in that browser window in a later step.