Connecting Salesforce MCP Server to Claude AI via OAuth
Connecting AI assistants directly to your CRM unlocks seamless data interactions and automated workflows. By configuring Salesforce as a Model Context Protocol (MCP) server, you allow Claude AI to securely query data, perform actions, and interact with your Salesforce CRM in real time.
Here is a step-by-step guide to setting up a secure OAuth connection between Salesforce and Claude AI.
Step-by-Step Configuration
1. Create an External Client App in Salesforce
First, set up an app in Salesforce to handle authentication.
Go to Settings > Setup and search for External Client Apps.
Click New External Client App, enter a name, and provide your email address.
Scroll down to the API section and enableOAuth.
Enter your Callback URL.
Under Available OAuth Scopes, select:
Perform requests at any time
Access Salesforce-hosted MCP servers
In the Security section, enable PKCE (Proof Key for Code Exchange) and Issue JSON Web Token-based access tokens for named users.
Click Create.
2. Activate MCP Servers in Salesforce
Search for MCP Servers under the API Catalog in Setup.
Open the Subject All option and activate it.
Copy the generated Server URL.
3. Configure Claude AI Connectors
Log in to the Claude AI website, navigate to Customize, and open Connectors.
Click Add > Add Custom Connector and give your connector a name.
Paste the copied Salesforce Server URL into the Remote MCP Server URL field.
4. Authenticate and Connect
Go back to your Salesforce External Client App settings.
Copy the Consumer Key and paste it into Claude’s OAuth Client ID field.
Copy the Consumer Secret and paste it into Claude’s OAuth Client Secret field.
Click Add, then click Connect.
When prompted by Salesforce, click Allow to authorize the connection.
Once authorized, you will see a "Connected to Salesforce" confirmation message. Claude AI is now ready to securely query records and execute CRM actions using the Model Context Protocol.
