TL;DR:
Connecting Salesforce to your AI assistant doesn't require custom integration code or manual API management.
Using Composio's MCP gateway, you can link Claude, ChatGPT, or Cursor directly to your CRM.
Composio handles OAuth token refreshes and tool routing automatically, letting your AI read and write CRM records.
Composio's free tier includes 100,000 tool calls per month with no credit card required.
Every time you copy a client's name from Salesforce, paste it into Claude to draft a follow-up, and manually log that activity back in your CRM, you hand over chunks of focused work to tasks that don't require your judgment. Connecting Salesforce to your AI assistant eliminates those handoffs.
You don't need to write custom integration code or manage OAuth flows yourself. By using the Model Context Protocol (MCP) through Composio, you establish a direct, secure link that lets Claude, ChatGPT, or Cursor read and write CRM records directly from your chat interface. This guide gives you the exact steps and configuration files to get your Salesforce AI connection running in one sitting. The setup involves terminal commands and editing JSON config files, so a basic comfort with the command line helps.
Ready-to-copy MCP configuration blocks for Claude Desktop and Cursor are included below.
How Salesforce MCP streamlines your AI workflow
MCP is a standard that lets AI models connect to your business apps. Think of it as a universal translator sitting between your AI assistant and your software stack. Instead of your AI knowing nothing about your CRM data, it can query Salesforce records, create contacts, log calls, and update opportunity stages, all from inside the chat interface.
The practical difference between building this connection yourself and using Composio MCP comes down to what you own after setup. Writing a custom integration can take days to weeks depending on complexity, and when Salesforce changes how their systems work, you face ongoing maintenance work that never ends. Composio handles that operational burden so you connect once and move on.
Feature / Metric | Manual API integration | Composio Salesforce MCP |
|---|---|---|
Setup time | Days to weeks | Under 10 minutes |
Auth management | Manual OAuth and token refresh coding | Managed automatically by Composio |
Schema maintenance | Manual updates when APIs change | Handled automatically by Composio |
Multi-app routing | Requires custom conditional logic | Handled by Composio Tool Router |
This connection queries live Salesforce data. When your AI queries Salesforce, it pulls data at that moment. When it writes a record, that change posts to your Salesforce org through the standard API write path, with no separate sync job required.
Prerequisites for a smooth Salesforce MCP setup
Before you run the first command, confirm you have the following in place.
Required apps for AI integration
A Composio account (free tier, no credit card required)
One of: Claude Desktop, ChatGPT (with custom GPT access), or Cursor
A Salesforce org on Enterprise, Unlimited, Developer, or Professional Edition (with API add-on)
Minimum CRM permissions for MCP
Your Salesforce user profile needs the "API Enabled" permission checked. To verify or set this, go to Setup > Manage Users > Profiles, click Edit on your profile, scroll to Administrative Permissions, and check "API Enabled."
Beyond the profile-level setting, the authenticated user needs appropriate Object-Level Security (OLS) and Field-Level Security (FLS) for the records the AI will touch. If your AI assistant tries to update an Opportunity field the user cannot see, Salesforce blocks that action and surfaces a permission error in the logs. Salesforce enforces these rules at the API level, not just in the UI, so the MCP connection respects whatever your org's security model defines.
Testing vs. live Salesforce connections
Connect to a Salesforce Sandbox or Developer Edition org first before pointing your AI at production data. Note that Salesforce sandbox types vary: Developer and Developer Pro Sandboxes contain metadata only, while Partial Copy and Full Copy Sandboxes include data as well. Composio also provides a Remote Sandbox on its side, which is a persistent Python execution environment, similar to a Jupyter notebook, where your agent writes and executes code, with variables and imports preserved across calls within a session.
Developer Edition orgs are capped at 15,000 API calls per 24 hours. That's enough for setup and manual testing, but easy to hit if your agent runs repeated queries. Full Copy Sandboxes carry a much higher limit of 5,000,000 calls per day, so if you plan to run load or stress tests before going to production, a Sandbox is the safer choice.
How to install and configure Composio MCP
The steps below use the Composio CLI. Run each command in your terminal, in order.
Step 1: Install Composio MCP
curl -fsSL https://composio.dev/install | shThis installs the Composio CLI. Once it finishes, verify the installation:
composio --version
composio --helpIf both commands return output without errors, you're ready to authenticate.
Step 2: Connect your Composio account
composio loginThis opens a browser window where you authenticate with your Composio account. Once you complete the browser flow, return to the terminal and run:
composio whoamiYour account email should appear in the output, confirming the session is active. For future logins mid-conversation, Composio's In-Chat Auth feature lets users authorize a new app connection without leaving the AI interface or restarting a session.
Step 3: Sync Salesforce to your AI
composio link salesforceRun the command and complete the Salesforce OAuth consent screen, which asks which org you want to connect and what permissions to grant. After you approve, Composio stores the token and marks the connection as active.
To test safely before pointing this at production, enter your sandbox domain when Composio prompts for your Salesforce instance URL (for example, https://yourorg--sandboxname.sandbox.salesforce.com) rather than your production URL. You can also use Composio's Remote Sandbox to run test queries as code in a persistent Python environment, with variables and imports preserved across calls so multi-step queries behave like a Jupyter notebook session.
Step 4: Run a live CRM test
composio dev connected-accounts listSalesforce should appear in the output with status ACTIVE. You can also run a test query through the Composio dashboard to confirm the connection is returning live data before you configure your AI assistant.
Get your CRM data flowing into AI chat apps
Now that Salesforce is connected to Composio, configure your AI assistant to use the MCP server. Each assistant has a slightly different setup path. For a video walkthrough of connecting multiple apps to Claude using Composio MCP, this multi-app Claude setup shows the complete MCP and Connectors flow for Claude.
Enable Salesforce access in Claude
Open (or create) the Claude Desktop config file at the following path:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Paste this configuration block:
{
"mcpServers": {
"salesforce-composio": {
"type": "http",
"url": "https://connect.composio.dev/mcp"
}
}
}If you're building with Claude Code rather than Claude Desktop, the setup path differs: generate a Tool Router session URL via the Composio SDK, then run claude mcp add --transport http with that URL and any required headers. The Claude Code plugin page documents this flow in full.
Enable Salesforce access in ChatGPT
In ChatGPT, go to the custom GPT builder and go to the Configure tab. Under Apps and Connectors, import your Composio MCP server URL from your dashboard under the MCP Gateway section. Add your Composio MCP server URL and set the auth method to API key.
Enable Salesforce access in Cursor
In Cursor, open .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for a global config that applies across all projects) and add the following:
{
"mcpServers": {
"salesforce-composio": {
"type": "http",
"url": "https://connect.composio.dev/mcp"
}
}
}No API key is required in the config file. Composio authenticates via OAuth when you connect. Restart Cursor, then click "Connect" next to Composio in the MCP Tools settings panel. The same pattern demonstrated in the Linear MCP and Cursor tutorial applies directly here.
Key Salesforce AI integration workflows to try
Once your AI assistant is connected, these are the most immediately useful workflows to run.
Pull account details via Salesforce MCP
Ask your AI: "Retrieve all open opportunities for the account named Acme Corp, including the stage, close date, and amount."
The AI calls the Salesforce toolkit, queries your org, and returns structured results directly in the chat. For a working Composio demo of connecting AI to real app data, this tutorial shows the query-and-response pattern in real time.
Update and create Salesforce records via MCP
Ask your AI: "Update the Opportunity stage for Acme Corp Q3 Deal to 'Negotiation/Review'."
Composio routes the write action to Salesforce using the authenticated user's credentials and field permissions. The response confirms the update with the record ID. You can also create a custom MCP server that combines Salesforce with other tools like Gmail or Slack if your workflow touches multiple apps in one task.
You can also create records on the fly. Ask: "Create a new lead in Salesforce named Jordan Lee from the company TechStart, with the title 'Head of Engineering'." The AI constructs the Salesforce record and creates it directly, and you can verify it appeared in your org after the confirmation message.
Instantly load meeting briefs from CRM
Ask your AI: "Prepare a meeting brief for my call with Sarah at GlobalRetail. Pull their account history, open opportunities, and the last three logged activities."
This is where the connection pays back the setup time. Your AI reads multiple Salesforce objects in one query and summarizes them into a structured brief, ready before the call starts. For a Notion-based example of this same multi-object querying pattern, the Notion and Claude MCP guide shows how Composio handles complex multi-tool queries.
Confirm your Salesforce sync is live
Run these three tests to confirm your connection is reading and writing correctly before you rely on it in a live workflow.
Read test: Ask the AI to retrieve a specific contact's phone number by name. If it returns the correct number from your CRM, reads are working.
Write test: Ask the AI to log a call note on a test contact. Check the contact's activity history in Salesforce immediately after to confirm the log appears.
Stage update test: Ask the AI to move a sandbox opportunity from "Prospecting" to "Qualification." Verify the change in Salesforce. If it shows the update, the full read-write cycle is confirmed.
How to resolve Salesforce MCP connection faults
Resolving Salesforce token expiry
Salesforce access tokens expire based on your org's session timeout policy, two hours by default, configurable under Setup > Session Settings. When multiple agent threads run in parallel, they can attempt to refresh the same token simultaneously, creating race conditions. Composio's managed auth layer coordinates token refresh across concurrent calls, exchanging the refresh token with Salesforce's authorization server before expiry and surfacing a clean error state if the refresh fails.
If a connection does break and Composio cannot refresh automatically (for example, after a Salesforce password reset invalidates the refresh token) reconnect the integration from the Composio dashboard to issue a fresh set of credentials.
composio link salesforceThis re-triggers the OAuth consent flow and stores a fresh set of credentials. Do not store your Salesforce password or security token directly in the MCP configuration file as a workaround, since that approach bypasses the token lifecycle entirely and creates a persistent security risk.
Why actions get blocked in Salesforce
If the AI reports a permission error when trying to read or write a record, the cause is almost always a Salesforce-side permission setting, not a Composio configuration issue. Check these in order:
API Enabled: Is the checkbox enabled on the user profile?
Object-Level Security: Does the user have Read/Edit/Create access to the relevant object?
Field-Level Security: Is the specific field visible and editable for that profile?
Validation rules: Does Salesforce have a validation rule that rejects the field value the AI is trying to write?
Logs in the Composio dashboard show the Salesforce error response, which typically identifies the specific object or field causing the block.
Fixing unstable Salesforce MCP connections
Salesforce API rate limits apply to MCP calls the same way they apply to any API integration. Enterprise Edition orgs get 100,000 daily API requests plus 1,000 per Salesforce license. Unlimited and Performance orgs use the same 100,000 base with 5,000 per license. If your AI is running heavily automated workflows, monitor your API usage in Salesforce Setup > System Overview. Composio's execution layer handles retries, concurrent requests, and rate-limit responses automatically. If Salesforce returns a 429, Composio backs off and retries the request. If a token expires mid-call, it refreshes and replays the request before surfacing a result. The Composio MCP instance API lets you create multiple server instances if you need to distribute load across projects or teams.
Quick fixes for Salesforce AI connection hurdles
Using Salesforce MCP with test orgs
To connect a Sandbox or Developer Edition instead of production, use your sandbox org's domain when Composio prompts for your Salesforce URL during composio link salesforce. Composio's sessions-via-MCP feature then lets you manage both a sandbox and a production connection under a single account.
Requirements for your Salesforce instance
Developer Edition orgs are fully supported and free, making them the best environment to complete this setup before touching production data. Professional Edition requires the Web Services API add-on. Group and Professional Edition orgs do not support API access by default, though qualified partners can request API access through Salesforce's packaged app process. If you're uncertain which edition your org is running, check Setup > Company Information > Salesforce Edition.
Developer Edition orgs get a flat 15,000 API calls per 24 hours, which is enough for setup and testing but worth watching if your agent runs repeated queries.
Finalizing your production CRM access
Once you've verified the connection works against a sandbox, switch the Salesforce connection URL in Composio to your production org. Run composio link salesforce again, and during the OAuth flow select your production org.
Managing Salesforce connection timeouts
If the AI is querying large datasets and timing out, scope the queries more tightly. For example, instead of asking for "all accounts," ask for "accounts created in the last 30 days with open opportunities." Composio's Remote Sandbox also helps here: instead of pulling large datasets directly into the AI context, you can run the query as code inside the Remote Sandbox's persistent Python environment, process the results there, and surface only what the agent needs for the next step.
You're not writing auth logic, handling token edge cases, or maintaining schema definitions. You connect once, and Composio holds the operational complexity while you focus on the work that actually needs your attention.
Start connecting your apps with Composio's free Salesforce toolkit, which includes 100,000 tool calls per month with no credit card required. For teams routing multiple tool connections, the MCP Gateway handles multi-app routing and team-level access controls from a single control point.
Security implications
This section is written for the IT or security team reviewing this integration before it goes to production. If that's you, here's what governs credential handling, authorization scope, and compliance controls. When you connect Salesforce to an AI assistant through Composio, security operates at three layers: authentication, authorization, and data handling.
Composio is SOC 2 and ISO 27001 certified. All OAuth credentials are encrypted at rest using AES-256 and in transit. Tokens are stored in isolated credential vaults, not in plain text configuration files or environment variables. When your AI makes a Salesforce API call, Composio retrieves the token and authenticates the request. The credential is isolated from the LLM context and your application code throughout.
Authorization happens at the Salesforce level, not the Composio level. The authenticated user's Salesforce permissions control what the AI can read and write. If the user cannot view a field in the Salesforce UI, the AI cannot access that field through the API. Object-Level Security and Field-Level Security rules apply to every MCP call the same way they apply to any other API request. This means your existing Salesforce permission model stays intact.
For teams with stricter compliance requirements, Composio's enterprise tier supports self-hosted deployments and audit logging that tracks every tool call with timestamp, user, and action. IT administrators can set application-level whitelist and blacklist rules through the MCP Gateway to restrict which apps can connect and which actions are allowed.
If a credential is compromised, revoke access in the Composio dashboard or directly in Salesforce under Setup > Connected Apps. Revoking access immediately invalidates all tokens associated with that connection, and the AI will stop working until you re-authorize.
FAQs
Does Composio respect Salesforce Field-Level Security (FLS)?
Yes. Composio acts as a secure proxy, meaning the AI assistant can only access fields and records that the authenticated Salesforce user has permission to view or edit. Salesforce enforces OLS and FLS at the API level, so those rules apply to every MCP call the same way they apply to any other API request.
What Salesforce editions are supported?
Composio works with any Salesforce org that has API access enabled. Professional Edition requires a Web Services API access add-on purchased through your Salesforce AE. Group and Professional Edition orgs do not support API access by default without Salesforce's partner qualification process.
How does Composio handle expired Salesforce tokens?
Composio's managed auth layer automatically refreshes OAuth 2.0 tokens in the background by exchanging the refresh token with Salesforce's authorization server before the access token expires. If the refresh token itself gets invalidated (for example, after a password reset), you'll need to re-authorize through Composio.
Can I connect both a sandbox and a production Salesforce org?
Yes. Composio supports multiple active connections under one account. You can configure a sandbox connection for testing and a production connection for live workflows, and manage both from the Composio dashboard.
Is Composio secure enough for production CRM data?
Composio is SOC 2 and ISO 27001 certified, with all credentials encrypted at rest and in transit. For teams with stricter compliance requirements, Composio's enterprise tier supports self-hosted deployments. IT and security teams can also set per-team whitelist and blacklist rules through the MCP Gateway.
Key terms glossary
Model Context Protocol (MCP): A standard that allows AI models to securely read and write data from the apps and databases you already use.
Tool Router: A Composio feature that automatically directs AI requests to the correct application based on the user's active connections, removing the need for conditional logic in your configuration.
In-Chat Auth: A secure authentication flow that allows users to connect applications mid-conversation without leaving the AI interface or restarting a session.
Remote Sandbox: A persistent Python execution environment provided by Composio where your agent writes and executes code across a session, with variables and imports preserved between calls, similar to a Jupyter notebook. Supports compute tiers from standard (1 vCPU, 1 GB) to xlarge (8 vCPU, 8 GB) and a file mount at /mnt/files/ that survives session restarts.
Field-Level Security (FLS): A Salesforce permission layer that controls which fields a given user profile can read or edit, enforced at the API level on every request.
OAuth 2.0 token refresh: The process by which an expired access token is automatically replaced using a stored refresh token, without requiring the user to re-authenticate manually.