Blog Post:
https://www.infallibletechie.com/2025/12/connect-salesforce-api-mcp-server-in-cursor-ide.html
Show More Show Less View Video Transcript
0:07
Hello everyone. In this video we are
0:09
going to see how to make use of
0:12
Salesforce API MCP server in cursor IDE.
0:17
If you are using cursor IDE for
0:19
Salesforce development and then if you
0:22
want to boost your development then you
0:24
have to must try this Salesforce API MCP
0:28
server.
0:31
Whenever we do Salesforce development
0:33
and if we get stuck on any uh use cases
0:38
then we can make use of uh the chat
0:41
option that is available in the cursor
0:42
ID and then we can ask the questions
0:47
if it is related to Salesforce.
0:50
Since we are going to configure the
0:52
Salesforce APA MCP server in cursor ID
0:55
then it will make use of the tools that
0:58
Salesforce APA MCP server is providing
1:01
to answer those questions. So it will
1:04
definitely help in uh increasing uh your
1:09
uh um efficiency in Salesforce code
1:12
development. It will also try to provide
1:15
optimized code solution. uh it uh if you
1:19
have uh any questions like uh what is
1:22
account object, what is contact object,
1:23
can can it get any information about uh
1:27
um uh an object whether I can create
1:30
records in that object like that if you
1:31
wanted to ask any questions then you can
1:33
directly make use of the Salesforce API
1:37
MCP server in your cursor IDE
1:41
the prerequisites for uh this is we have
1:45
to make sure we have installed cursor
1:47
cursor ID. So, make sure the cursor ID
1:50
is installed in your laptop or personal
1:53
uh computer. Next, you should have a
1:57
Salesforce org so that we can enable
2:02
MCP service. So, in your Salesforce or
2:05
if you go to Salesforce setup, in the
2:08
Salesforce setup under user interface,
2:10
we have user interface uh option. When
2:13
you enable it, when you click it, you
2:16
should see enable MCP service beta.
2:19
Note, uh, make a note that it is a beta
2:22
service as of now. So, en click enable
2:26
MCP service beta. Save it. Once it is,
2:29
uh, saved
2:31
then you can proceed further on these
2:33
steps. Uh, make sure node.js is
2:36
installed. Uh, we are installing this
2:38
node.js JS in your laptop or PC so that
2:42
the npx command can be executed.
2:46
So we already saw the step one. We have
2:49
to enable uh uh MCP uh service in
2:53
Salesforce setup. Once this is done, you
2:55
have to create an external client app.
2:59
For that we have to make sure we are
3:01
following all these steps.
3:05
Once it is uh created, we will be able
3:07
to get the consumer key and the secret.
3:11
Make a note of the consumer key.
3:16
Next, we have to go to the cursor ID and
3:21
then we have to click cursor settings.
3:24
Once it is uh opened, you will be able
3:26
to see tools and MCP. Here you have to
3:31
make use of the new MCP server button
3:35
and uh in order to connect to Salesforce
3:38
MCP uh server I am making use of S
3:43
object all uh so this MCP server
3:47
provides
3:49
uh all object definition uh and if you
3:52
wanted to describe an object then we
3:54
will be able to get all those uh tools
3:57
from this. So MCP is a server. It's a
4:01
provider of resources. So it will
4:03
provide you the tools that will help uh
4:06
in your productivity.
4:09
Uh now we in in in uh MCP server we will
4:13
have the tools uh using which we can um
4:21
uh help in answering the questions
4:22
whatever we have. So for example here
4:26
here uh for for this particular uh MCP
4:30
server I am having 12 tools that are
4:33
enabled. The 12 uh tools are describe
4:37
global, describe s object, list uh
4:42
list recent records, get related uh uh
4:47
records like that. I was able to I'm
4:49
able to see multiple tools that
4:52
Salesforce is providing as part of this
4:54
MCP server.
4:58
So this is the JSON. So here uh you have
5:02
to mention the consumer key. Here you
5:04
need not mention the consumer secret.
5:06
You can directly make use of the
5:07
consumer uh uh key from your external
5:10
client app which you which we just
5:12
created.
5:16
So here you have to just replace uh this
5:19
consumer key with your external client
5:22
app consumer key. Once that is done,
5:24
click save.
5:27
um you if you wanted to test whether it
5:30
is working fine, you can ask some
5:33
prompts. So for example, here I'm going
5:35
to ask
5:38
is contact
5:41
a standard object
5:44
in Salesforce.
5:50
So it's a straightforward question. uh
5:52
it should definitely pick this
5:55
particular Salesforce MCP server and
5:58
then uh
6:00
okay it took describe object tool from
6:02
the MCP server which is the right tool
6:05
it is not uh custom object because
6:08
customer is false label is contact cre
6:11
prefix is 003 and these are all the
6:14
fields that are available in my contact
6:17
uh uh object it's it says that it's a
6:20
core standard object in every Salesforce
6:21
arg and is part of account contact
6:24
relationship model.
6:32
When I was setting up this initially, I
6:34
had several issues. What I would
6:36
recommend is try to run this in your
6:39
terminal. I'm a Mac OS user. So I ran
6:43
this so that it will clear the um
6:47
authentication that happened when I
6:50
initially tried to connect to Salesforce
6:52
from my cursor ID. Uh so with this uh
6:57
command when I try to execute it, it
6:59
will remove that cache. It will again
7:01
ask me to uh login into my Salesforce
7:03
arc so that it will um create the
7:06
connectivity between the MCP server in
7:09
cursor ID and Salesforce or um one one
7:13
more thing what I I was doing uh was I
7:16
was keep on disabling it and enabling it
7:19
so that at one point after three or four
7:21
times it was able to get connected. Uh
7:24
so even if you run into the same issue
7:27
like error no code verifier saved for
7:30
session or invalid grant error try to
7:33
follow the troubleshooting steps
7:36
whatever I have shared so that you will
7:38
be able to resolve it.
7:45
Please check the video description. In
7:46
the video description I have shared my
7:49
blog post. from the blog post you should
7:51
be able to get all the steps we
7:53
discussed in this video. Also I have
7:56
shared the JSON uh um code
8:02
to connect to Salesforce MCP server from
8:05
your cursor ID as a reference.
8:15
I hope it was helpful.
8:24
Thank you for watching.
#Internet Software
