Recently, I fired up the Claude Desktop app and had the following conversation:
Lest you think this was a hallucination, here is the custom object Claude desktop built:
OK, how much code did I have to write to do this?
Nada. Nichts. None.
Did Anthropic put some sort of Salesforce connector in its desktop?
Nope. It has no innate ability to connect to Salesforce.
How did it do this, then?
By using Claude Desktop’s ability to talk to servers for tooling. In this case, I installed a “MCP” server on my desktop that was designed to access Salesforce data and metadata and told the app where to find it. It took me about 5 minutes to set up.
You might have some questions at this point?
What is an “MCP” server?
The short (and incomplete) answer is that it’s a 3rd party extension to an AI chat client. You can write your own, you can download other developer’s, or you can use cloud based MCP-as-a-Service (that’s not really a name for it).What can an MCP server do?
In general, it’s designed to allow access to any sort of external services, and can return data and (kind of interestingly) prompts.What are the use cases for it?
Maybe not unlimited, but I don’t really have a good sense for it where the limits are.Is this AI?
Not really, it’s providing AI access to services in a standardized way. Those services could use AI, of course. It’s turtles all the way down.Is there anything here you could not have done before?
Again, not really, you could (and many of us have) written a chat app that could talk to Salesforce, for example. It’s just that if I wanted to use someone else’s library to talk to Salesforce (e.g., Simple Salesforce for python), I’d have to write a lot of glue code. With MCP, I write zero code.
There’s a lot more questions to answer, and a lot more depth to the answers to discover, but probably the most important thing right now is to just play with it to get a sense of what the experience is like.
Ready to get started? Let’s get you MCPing!
Prerequisites
Installing an MCP server isn’t quite ready for end users, but if you’re at least a bit comfortable with command line tools, I’m confident that all of you have what it takes. To get started, you’re going to need a few things:
You’ll need a salesforce login and a security token for the login. If you don’t have a security token and want instructions on how to get one, see this footnote: 1
If you haven’t already, you need to download and install the Claude Desktop for your Mac/Windows laptop/desktop2.
If you haven’t already, you need to download and install node.js.
Finally, at the command line, to install the Salesforce MCP server, you need to issue the command:
npm install -g @tsmztech/mcp-server-salesforce
With that, you have everything you need. Let’s configure the desktop client to make it actually work!
Setup
Run the Claude Desktop client, pick settings off the menu. You’ll see something like this:
If you click Edit Config, it will open up your file manager (“finder” on Mac) highlighting the JSON file Claude uses to configure MCP servers. Open it in your favorite text editor. Here’s what mine (both file and favorite text editor ;-) ) looks like:
The “salesforce” key3 holds the information for (a) how to run the MCP server app for salesforce and (b) what the login credentials are it should use. Here’s a short version you can use:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": [
"-y",
"@tsmztech/mcp-server-salesforce"
],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "user id goes here",
"SALESFORCE_PASSWORD": "password too",
"SALESFORCE_TOKEN": "security token"
}
}
}
}
Once you’ve saved the config file, restart the desktop client, and you should be able to “talk to salesforce” like I did. Start with something simple like “How many open opportunities do I have?”
So, Um, What About Agentforce?
If you want to tie Agentforce into your desktop Claude, somebody has a free mcp server for that. I’ve not tried it, so I don’t know if it works, but maybe ¯\_(ツ)_/¯?
But what if you want Agentforce to be able to take advantage of MCP servers on the net? That doesn’t seem easily possible (unless someone has written an over-the-wire interface from Apex, but even then it’s gonna be work).
Which leads to the question: will Salesforce support MCP? They have to. The question is when and how?
Final Thoughts
I’ve seen a lot of tools that do essentially what a generic chat app like Claude Desktop can do with MCP and the right servers. That’s going to be a tough market: there is no extra cost involved with Claude (unless you have some sort of paid-for MCP service). For the $20/month Claude Pro subscription, I basically can use the really impressive Claude 3.7 to do a lot of work: the value of that subscription has gone way up as a result.
The real lesson is one that we’ve know for a long time: if you put a light gloss on an LLM and call that your app, your app is going to be roadkill.
Up Next
I encourage you to try to get this working. If you have problems and you think I can help, you can reply to this post (or contact me via some other means) and I’ll see what I can do.
In the next post we’re going to look a bit more at the protocol and try to understand its capabilities and limitations. Then we’ll write one to illustrate how it works. After that … not sure yet.
Security tokens are generated upon request and sent to you in email. You can generate a new one in the following fashion:
First, in Salesforce, pop-down the icon for your profile and click settings:
Next, find “Reset My Security Token” in the left-hand menu, click it, and then click “Reset Security Token”:
A new token will be sent in email.
What if Reset My Security Token does not appear in the left-hand menu? Ah, that means there’s an IP Address restriction on your account. Why that should prevent you from having a security token, I do not know. If you have admin rights, you can fix that:
Go into real Setup, and find and drill into your user
Drill into the profile:
Click on “Login IP Ranges”:
Delete any ranges in there so that it’s empty:
Warning: If the ranges are there for a reason, it’s probably bad to delete them. But some demo orgs have 0.0.0.0 to 255.255.255.255 listed, which I guess they thought was the right way to say any IP address, but it’s still sufficient to block security tokens from working.
Now go back and try to reset your token again.
Sorry Joe, no Linux support there :-(
I also have a weather app installed which is a sort of standard demo for MCP.
A few of my colleagues have had great success with Claude. Thanks for the detailed MCP setup instructions!