Claude to Salesforce Using MCP
- Sangamesh Gella
- Jul 1
- 7 min read
Imagine this - you are in a client meeting and someone asks about account details. Instead of fumbling through Salesforce tabs, you ask Claude 'Show me the Johnson Industries account details' and boom - everything's right there.
This is something we could never imagine that would happen. But it did!
What We Are Building
Let's get started without delay - think of this as teaching Claude how to speak Salesforce. To do so, we need to establish a connection between your AI assistant, Claude, and your customer data stored in Salesforce. This is the gateway to many possibilities, like natural language queries, instant updates, and seamless workflow integration.
Before understanding why this is different, let's answer why this matters.
Why This Matters
Context Switching Fatigue: Stop Jumping between applications
Data Silos: Your AI can finally see your business data across CRM to provide better accessibility and insights through natural language prompting - no tech jargon!
Speed: Ask questions in plain English or your language instead of learning SOQL or other topics.
Consistency: A single interface for various types of work.
Let's say you're a sales manager jumping on a high-stakes call with a potential client, Johnson Industries. Halfway through, the client asks, "Can you tell me the current status of our last service request? Also, did we get a quote for that new support package?"
Now, in the old world, here's what happens next:
You politely ask for a minute, awkwardly share your screen, and scramble through endless Salesforce tabs.
Try a few searches, copy their account ID, open a new tab for the case record, and check your email for the latest quote PDF.
The client's on hold. You're sweating. The flow of conversation is broken.
Eventually, you find the answer… but the momentum is gone, and your confidence takes a hit.
But with Claude plugged into Salesforce via MCP, here's how it goes:
You type (or say) in the chat window: "What's the status of Johnson Industries' last service request? And is there a quote for the new support package?"
In seconds, Claude responds:
The last service request (Case #45213) is marked ‘In Progress’ and assigned to Samir Patel in Support. Yes, a new support package quote (#Q-009821) was sent on June 25, and it’s currently under review by their procurement team.
You look like a rockstar—fast, prepared, and in control. The client's impressed by how seamless and informed the experience is. Instead of bouncing between windows, your focus is 100% on the conversation and the client's needs.
Now you understand why it differs, right? Just a few clicks and a prompt - boom!
How It Works with MCP
It's a three-part dance as follows:
You ask Claude something (in everyday language)
Claude translates and fetches the details (the magic happens here, which will be explained later)
You get your answer (formatted nicely)
Let's get behind the scenes -
A small server program that acts as a translator, known as the MCP
Secure authentication (to protect your data)
Real-time connection to your Salesforce org
What Is MCP?
MCP (Model Context Protocol) serves as a universal translator, enabling AI assistants to connect with external tools and data sources. Think of it as a standardised way for Claude to "plug into" other systems - whether that's Salesforce, your email, or any other business tool. Instead of Claude being limited to just text conversations, MCP gives it "hands and eyes" to interact with your real work systems.
What You Can Do With This
This setup transforms the way you interact with your Salesforce data, moving from cumbersome manual tasks to intuitive, voice-activated efficiency.
Quick Queries: Instant Information at Your Fingertips
Before (Manual Process): Imagine you need a list of all your California-based accounts. You would typically log into Salesforce, navigate to the "Accounts" tab, apply a filter for "Billing State/Province" and select "California," then wait for the results to load. To find contact information, navigate to the "Contacts" section, search for the company, and then locate the specific contact's details. Each step requires clicks, navigation, and waiting.
After (With AI Assistant): You ask Claude:
"Show me all accounts in California."
"What deals are closing this month?"
"Find the contact info for ABC Company."
Within moments, Claude processes your natural language request, queries Salesforce, and presents the precise information you need, formatted clearly on your screen: no navigation, no filters, just immediate answers.
Smart Updates: Effortless Data Management
Before (Manual Process): Updating a single record, like a phone number for an account, involves several steps: logging in, searching for the specific account, clicking to edit the record, locating the phone number field, typing in the new number, and finally saving the changes. Creating a new contact after a meeting would involve navigating to the "Contacts" tab, clicking "New Contact," and manually filling out all the relevant fields. This can be tedious and prone to errors.
After (With AI Assistant): You tell Claude:
"Update the Johnson account with the new phone number 555-123-4567."
"Create a new contact for the meeting I just had with John Doe at Acme Corp his email is john.doe@acmecorp.com, and his title is Marketing Manager."
Claude understands your intent, securely authenticates your request, and directly updates or creates the record in Salesforce. The time and effort saved on these routine tasks are significant, allowing you to focus on more strategic activities.
Complex Analysis: Gaining Deeper Insights, Faster
Before (Manual Process): Generating reports for complex analysis, such as identifying recently uncontacted accounts or visualising sales pipelines, is often a multi-step process. You'd need to go to the "Reports" tab, create a new report, select the appropriate report type, define filters (e.g., "Last Activity Date" less than 30 days ago), group data (e.g., by "Sales Rep"), add relevant columns, run the report, and then potentially export it to analyse further. This requires familiarity with Salesforce reporting features and can be a time-consuming process.
After (With AI Assistant): You ask Claude:
"Which accounts haven't been contacted in 30 days?"
"Show me the pipeline for each sales rep."
Claude leverages its understanding of your request to perform the necessary queries and aggregations within Salesforce. It then presents the analytical insights directly to you, potentially even summarising key findings or visualising the data. This enables rapid decision-making and a clearer understanding of your business performance, without the overhead of manually generating reports.
The Setup Process
Getting Your Credentials Ready:
This is an essential step, as Claude Desktop, being an external tool, requires that we authenticate Salesforce with it securely.
It can be either a username and password with a security token or client credentials.
This will enable Claude Desktop to communicate more securely with Salesforce while performing specific actions.
Setting Up the Bridge:
The Technical Setup (Don't worry, it's easier than it sounds)
Step 1: Get Your Salesforce Credentials
Your Salesforce username
Your password
Your security token
Step 2: Configure Authentication
Create a '.env' file with your credentials, including username, password, and security token.
Step 3: Install the Bridge Software
Download Node.js if you don't have it
Clone the MCP server code from here
Install dependencies with 'npm install'
Build the project with 'npm run build'
Step 4: Connect Claude Desktop
Add this to your Claude Desktop config file:
{
"mcpServers": {
"salesforce": {
"command": "node",
"args": ["path/to/your/dist/index.js"]
}
}
}
Step 5: Test it by restarting the Claude Desktop


When Things Don't Work (And How to Fix Them)
"Server Disconnected" Error:
Make sure you've restarted Claude Desktop completely
Check that your .env file is in the correct location
Verify the file path in your Claude config is correct
Authentication Failed:
Double-check that your username and password work in Salesforce directly
Make sure your security token is current (they expire)
Remember: your password + security token = what goes in SF_PASSWORD
"No Results" for Valid Queries:
Check your Salesforce permissions - you need read access to the objects you're querying
Try a simple query first: "SELECT Id, Name FROM Account LIMIT 5"
The Technical Magic (Simplified) Here's what happens when you ask Claude about your Salesforce data:
You type your question → Claude recognises you need Salesforce data
Claude calls the MCP server → Your local bridge program receives the request
MCP server authenticates → Securely logs into your Salesforce org
Executes the query → Translates your question into SOQL (Salesforce's query language)
Returns the data → Salesforce sends back the results
Claude formats the answer → Presents it to you in a readable format
All of this happens in seconds, and your credentials never leave your local machine.
NOTE: Replace 'claude_desktop_config.json' with your details in mcpServers, as shown below, and ensure that you have environment variables configured accordingly.

A Quick Word on Security
Your Salesforce credentials remain on your local machine; they are never sent to Anthropic or stored in the cloud. The MCP server runs locally, creating a secure bridge between Claude and your Salesforce org. It's like having a private translator that only you control.
Where This Gets Interesting (Future Vision with MCP)
Now, imagine if this "AI + CRM bridge" weren't just about Salesforce. Picture a world where you could ask your assistant for anything, from any tool you use. Want the latest Zendesk ticket stats? Need to know how your Monday.com projects are progressing? Curious about last month's expenses in QuickBooks or your latest marketing leads from HubSpot? The same AI-driven workflow applies. You ask, and your AI pulls the correct data from wherever it lives. No more bouncing between tabs, logging in and out, or copying data back and forth. That's business productivity, turbocharged.
The real magic? With these bridges, you can start building custom workflows that cross multiple systems. For example, you could say, "Show me deals closing this month and automatically schedule follow-up meetings in Google Calendar for each one." Or, "When a big support ticket comes in on Zendesk, create a task in Asana and update the account owner in Salesforce." This is where the lines between tools start to blur, because the AI understands your business context, not just isolated apps.
Ultimately, this is the first step toward an AI assistant that's truly integrated with your unique business world. An assistant that learns your priorities, speaks your language, and works across all your platforms—Salesforce, Slack, Gmail, Notion, Trello, and beyond. It's not just about data; it's about creating a seamless, intelligent, and proactive digital workspace. This approach is more than a productivity hack—it's the beginning of a whole new way to work.
Ready to Try it?
Begin with a straightforward use case and observe how it impacts your workflow. I've put all the code and detailed setup instructions on GitHub: https://github.com/gellasangameshgupta/sfclaude_mcp
Video Recording with Results - https://www.loom.com/share/c30b179b6ff34580abb0ff4817f8c897
The setup takes about 30 minutes, but the time savings start immediately. Even if you use it only for quick account lookups, you'll wonder how you managed without it.
What's your first question going to be? I'd love to hear how you adapt this for your work. Please drop a comment below with the Salesforce data you'd like to access through Claude.
P.S. - Once you see how this works, you'll start imagining connections to all your other business tools. That's precisely the point.
Comments