Salesforce MCP Server: Connect AI to Your CRM
A Salesforce MCP server connects AI assistants to your Salesforce org. It lets tools like Claude and ChatGPT query leads, update opportunities, run SOQL queries, and pull reports — all through natural language. Salesforce has over 150,000 customers, and most of them have the same problem: getting data out of the CRM is harder than putting it in.
In this guide
What a Salesforce MCP server does
Instead of navigating Salesforce's UI, building reports, or writing SOQL, you talk to an AI assistant. The MCP server translates your request into Salesforce API calls and returns the results.
- "Show me all opportunities closing this quarter over $100K" — runs a SOQL query and returns the list
- "What's our pipeline by stage and owner?" — aggregates opportunity data into a summary
- "Create a lead for John Smith, VP Sales at TechCorp" — creates the record with field mappings
- "Find all accounts in healthcare with no activity in 60 days" — queries accounts with activity filters
- "Move the TechCorp opportunity to Negotiation stage" — updates the stage field
- "Log a call with the Acme account — discussed renewal pricing" — creates a task/activity record
Salesforce MCP vs. Agentforce
Salesforce has its own AI platform (Agentforce, formerly Einstein). How does an MCP server compare?
- Agentforce lives inside Salesforce. It works with Salesforce data and Salesforce workflows. It's integrated but locked to the Salesforce ecosystem.
- An MCP server works with any AI client — Claude, ChatGPT, Cursor, your own tools. It lets you combine Salesforce data with other systems in a single conversation.
- They're complementary. Use Agentforce for Salesforce-native automation. Use MCP when you need Salesforce data alongside Slack, databases, or other tools.
How to set it up
Step 1: Create a Connected App
In Salesforce Setup, go to App Manager → New Connected App. Enable OAuth settings and select the scopes you need. For read-only access: api and id. For full access: add full.
See Salesforce Connected App documentation for details.
Step 2: Create a dedicated integration user
Don't use your admin credentials. Create a user with a restricted profile that only has access to the objects and fields the AI needs.
Step 3: Add to your AI client
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "salesforce-mcp-server"],
"env": {
"SF_LOGIN_URL": "https://login.salesforce.com",
"SF_USERNAME": "mcp-integration@yourorg.com",
"SF_PASSWORD": "your-password",
"SF_SECURITY_TOKEN": "your-security-token"
}
}
}
}
Step 4: Test it
Ask "How many open opportunities do I have in Salesforce?" to verify the connection.
Available tools
- query — run SOQL queries against any object
- describe_object — get field definitions for an object
- create_record — create a new record (lead, contact, opportunity, etc.)
- update_record — modify an existing record
- get_record — retrieve a specific record by ID
- search — SOSL full-text search across objects
- list_objects — show available Salesforce objects
The AI uses describe_object first to understand field names and types, then writes accurate SOQL. You don't need to know SOQL — the AI handles it.
Use cases by role
Sales reps
Get pipeline summaries before 1:1s. Log activities by describing what happened. Search for accounts matching specific criteria without building Salesforce reports.
Sales leadership
Run ad-hoc pipeline analysis. Compare rep performance by querying activity and opportunity data. Identify pipeline gaps by stage, segment, or territory.
Revenue operations
Bulk-update records. Audit data quality across objects. Query custom objects and fields without building reports. Validate automation results.
Customer success
Pull account history before renewal conversations. Track case volume and resolution times. Find accounts with declining engagement signals.
Security and permissions
- Dedicated integration user. Create a user specifically for MCP with a restricted profile. Never use admin credentials.
- Profile-based access. Salesforce profiles control object and field-level access. The AI can only see what the integration user's profile allows.
- Field-level security. Hide sensitive fields (SSN, salary, etc.) from the integration user's profile.
- IP restrictions. Lock the Connected App to specific IP ranges if possible.
- Audit trail. Salesforce logs all API calls. Review the integration user's login history and API usage regularly.
- Start read-only. Set the profile to read-only on all objects first. Add write access per-object as needed.
FAQ
What is a Salesforce MCP server?
A connector that lets AI assistants query, create, and update Salesforce records through natural language instead of the Salesforce UI.
Does Salesforce have an official MCP server?
Salesforce has released Agentforce with MCP capabilities. Community-built open-source alternatives are also available on GitHub.
Can AI write to Salesforce through MCP?
Yes. With appropriate profile permissions, AI can create leads, update opportunities, log activities, and modify records.
Is it safe to connect AI to Salesforce?
Yes, with proper controls. Use a dedicated integration user, restrict the profile, apply field-level security, and start read-only.
What Salesforce objects can AI access?
Leads, contacts, accounts, opportunities, cases, tasks, reports, and custom objects — controlled by the integration user's profile.
Related guides
- What Is an MCP Server? — start here if MCP is new
- HubSpot MCP Server — the other major CRM
- Snowflake MCP Server — data warehouse analytics
Building with MCP?
I build AI-native revenue infrastructure — enrichment pipelines, CRM automation, and MCP servers. See the Clay MCP Server (73 tools) for what's possible, or get in touch.