Salesforce MCP Server
Aembit supports the official Salesforce-hosted MCP servers, which let AI Agent: A software workload that authenticates to systems, requests credentials, and accesses resources, either on behalf of a person or on its own. Aembit secures AI agents with the same identity-first model it uses for any workload. User-driven agents such as Claude Desktop also carry a blended identity that ties access to both the user and the agent.Learn more access Salesforce data and actions through Model Context Protocol: A standard protocol for AI agent and server interactions that defines how AI assistants communicate with external tools and data sources.Learn more(opens in new tab) tools.
This page describes how to configure Salesforce as an MCP Server: A server that implements the Model Context Protocol to provide tools, resources, or data to AI agents and MCP clients.Learn more(opens in new tab) behind the Aembit MCP Identity Gateway: A component that brokers MCP traffic between MCP clients and target MCP servers, validating authorization and presenting Aembit-managed credentials on each request.Learn more.
This guide builds the Gateway-to-Server Policy: The Access Policy that authorizes the MCP Identity Gateway to access an MCP server on behalf of authenticated users—the Gateway itself is the Client Workload. Also called right-side auth; each MCP server behind the Gateway needs its own.Learn more—the second of the two Access Policy: Access Policies define, enforce, and audit access between Client and Server Workloads by cryptographically verifying workload identity and contextual factors rather than relying on static secrets.Learn more the MCP Identity Gateway requires. You create the first, the Client-to-Gateway Policy: The Access Policy that validates which MCP client can connect to the MCP Identity Gateway and authenticates users through your Identity Provider. Also called left-side auth; you create one per MCP client and Gateway combination.Learn more, during Gateway setup.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have the following:
- A Salesforce org, Developer Edition or higher (Developer Edition organizations include free access to hosted MCP servers)
- A configured Aembit MCP Identity Gateway
Requirements and considerations
Section titled “Requirements and considerations”Before you configure Salesforce, review these requirements and behaviors specific to Salesforce’s MCP server.
- No Dynamic Client Registration. Both authentication approaches need the manually created External Client App.
- Org-specific OAuth URL. The Discover URL is your Salesforce org URL (for example,
https://orgname.develop.my.salesforce.com/), not a fixed global URL. - Multiple MCP servers. Salesforce exposes many MCP servers with different access levels; each needs its own Server Workload in Aembit, since each uses a different path. The full list is in Setup > MCP Servers.
- Activation delay. A new External Client App can take up to 30 minutes to become active.
- Reauthorize after scope changes. Editing the scopes on an existing Credential Provider requires immediate reauthorization—the old token won’t reflect the new scopes.
- Activate the MCP server first. Activate each MCP server in Setup > MCP Servers before use.
Choose an authentication approach
Section titled “Choose an authentication approach”Aembit supports two authentication approaches for Salesforce. The tabs in the following sections stay in sync with the approach you choose.
- User-Based: each user authenticates with their own Salesforce identity, and the Gateway injects that user’s token into MCP requests. Aembit stores and refreshes each user’s tokens individually.
- Admin-Based: an administrator completes the OAuth flow once during setup, and all users who access Salesforce through the Gateway share the resulting tokens.
Create the external client app
Section titled “Create the external client app”Salesforce doesn’t support OAuth Dynamic Client Registration, so an administrator must create one External Client App before users can authenticate. Both authentication approaches share this app: the Consumer Key is the Client ID and the Consumer Secret is the Client Secret. This setup is once per Salesforce org.
- In Setup, search for External Client App Manager, then click New External Client App.
- Name the app, expand API (Enable OAuth Settings), and check Enable OAuth.
- Set the Callback URL to the Aembit Credential Provider’s Callback URL. Copy the exact read-only value from the Credential Provider after you create it in Aembit.
- Add these OAuth scopes:
mcp_api(Access Salesforce-hosted MCP Servers)refresh_token/offline_access(Perform requests at any time)api(Manage user data via APIs)sfap_api(Access the Salesforce API Platform)
- Under Security, enable both of these settings:
- Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
- Issue JSON Web Token (JWT)-based access tokens for named users
- Click Create, then retrieve the Consumer Key (Client ID) and Consumer Secret (Client Secret) from Settings > Consumer Key and Secret.
- In Setup, go to MCP Servers, select the MCP server you want, and click Activate.
A new External Client App can take up to 30 minutes to become active.
Configure the Credential Provider
Section titled “Configure the Credential Provider”Create an MCP User-Based Access Token Credential Provider: Credential Providers obtain the specific access credentials—such as API keys, OAuth tokens, or temporary cloud credentials—that Client Workloads need to authenticate to Server Workloads.Learn more in Aembit.
-
Log into your Aembit Tenant.
-
Go to Credential Providers in the left sidebar and click + New.
-
Configure the following fields:
Field Value Name A user-friendly name Credential Type MCP User-Based Access Token MCP Server URL https://<your-salesforce-org>.salesforce.com/Client ID The Client ID you copied earlier Client Secret The Client Secret you copied earlier Scopes refresh_token offline_access mcp_api api sfap_apiPKCE Required On Lifetime 1 yearFor MCP Server URL, click Discover to populate the Authorization URL and Token URL.
-
Click Save.
-
Copy the read-only Callback URL from the Credential Provider.
Create an OAuth 2.0 Authorization Code Credential Provider: Credential Providers obtain the specific access credentials—such as API keys, OAuth tokens, or temporary cloud credentials—that Client Workloads need to authenticate to Server Workloads.Learn more in Aembit.
-
Log into your Aembit Tenant.
-
Go to Credential Providers in the left sidebar and click + New.
-
Configure the following fields:
Field Value Name A user-friendly name Credential Type OAuth 2.0 Authorization Code Client ID The Client ID you copied earlier Client Secret The Client Secret, if required—see the app setup notes Scopes refresh_token offline_access mcp_api api sfap_apiOAuth URL https://<your-salesforce-org>.salesforce.com/PKCE Required On Lifetime 1 yearFor OAuth URL, click URL Discovery to populate the Authorization URL and Token URL.
-
Click Save.
-
Copy the read-only Callback URL from the Credential Provider.
Finish configuring the external client app
Section titled “Finish configuring the external client app”User-Based Auth uses the shared External Client App you create in the prerequisites—both authentication approaches use the same app.
- Create the MCP User-Based Access Token Credential Provider in Aembit and copy its read-only Callback URL.
- Confirm the External Client App’s Callback URL setting includes that Callback URL (see the prerequisites).
- Supply the app’s Consumer Key as the Client ID and its Consumer Secret as the Client Secret in the Credential Provider.
Admin-Based Auth uses the same shared External Client App you create in the prerequisites—both authentication approaches use the same app.
- Create the MCP Credential Provider (OAuth 2.0 Authorization Code) in Aembit and copy its read-only Callback URL.
- Confirm the External Client App’s Callback URL setting includes that Callback URL (see the prerequisites).
- Supply the app’s Consumer Key as the Client ID and its Consumer Secret as the Client Secret in the Credential Provider.
Authorize the Credential Provider
Section titled “Authorize the Credential Provider”There’s no administrator authorization step for this credential type. Each user completes their own Salesforce sign-in and consent the first time they access Salesforce through the Gateway, and Aembit stores and refreshes each user’s tokens individually.
-
Return to the Credential Provider in Aembit and click Authorize.
-
Complete the Salesforce sign-in as an administrator and approve access. The Credential Provider status changes to Ready when the flow completes.
Create the Server Workload
Section titled “Create the Server Workload”-
Go to Server Workloads in the left sidebar and click + New.
-
Configure the following fields:
Field Value Name A user-friendly name Host api.salesforce.comApplication Protocol MCP Port 443 with TLS URL Path /platform/mcp/v1/platform/<mcp-server-name>Authentication method HTTP Authentication Authentication scheme Bearer -
Click Save.
Create an Access Policy
Section titled “Create an Access Policy”This section creates the Gateway-to-Server Access Policy, which authorizes the MCP Identity Gateway to access Salesforce on behalf of authenticated users.
Create an Access Policy linking the MCP Identity Gateway (as the Client Workload: Client Workloads represent software applications, scripts, or automated processes that initiate access requests to Server Workloads, operating autonomously without direct user interaction.Learn more), the Credential Provider you created, and the Server Workload for Salesforce.
For step-by-step instructions, including the Client Workload settings that identify the Gateway, see Create the gateway-to-server Access Policy.
Verify
Section titled “Verify”After authorization completes, the Aembit AI Access Authorized page lists the Salesforce MCP Server as Ready. The AI agent can then call Salesforce MCP tools through the Gateway.