Connect an MCP Server to a Salesforce Agentforce Agent
Mar 30, 2026
Blog Post:
https://www.infallibletechie.com/2026/03/connect-an-mcp-server-to-a-salesforce-agentforce-agent.html
Show More Show Less View Video Transcript
0:07
Hello everyone. In this video, we are
0:09
going to see how to connect an MCP
0:13
server in Salesforce so that the agent
0:17
force agent can make use of the MCP
0:20
tools that are available from the MCP
0:22
server for agent interoperability.
0:26
Anthropic uh MCP model context protocol
0:31
plays a vital role for agent
0:34
interoperability.
0:35
Let's say I have developed some u uh set
0:40
of tools that are available from
0:43
non-agent force AI development. If I
0:46
wanted to invoke those things then
0:50
instead of making use of uh traditional
0:53
uh API we can make use of MCP. So that
0:56
those tools are registered in the MCP
0:58
server. That MCP server should be
1:01
registered in Salesforce so that the
1:03
agent force agent can make use of the
1:05
tools that are available from the MCP
1:08
server and then it can execute execute
1:11
those tasks.
1:14
The first step is we have to register
1:17
the MCP server which has the tools in
1:21
Salesforce setup. So go to Salesforce
1:23
setup
1:26
under Einstein under agent force
1:29
registry go to MCP servers click new and
1:32
then you should be able to register your
1:35
MCP server.
1:38
When you do this uh
1:41
MCP server registration you will have a
1:44
vizard using which you should enter all
1:46
the required information. You should
1:48
select the tools so that the agent force
1:51
agent can execute those tasks. Once this
1:55
is registration is done.
1:58
When you create that registry,
2:01
Salesforce creates a permission set
2:04
uh so that it can authenticate and
2:07
execute it. Once the permission set is
2:10
uh created,
2:12
you have to assign this permission set
2:14
to the users who are going to make use
2:16
of uh this MCP tools. Under uh agent
2:21
force assets under topics,
2:25
you will be able to see
2:31
the MCP tool. So this get forecast from
2:35
the weather forecast um MCP server. So
2:38
this is the get forecast uh tool that is
2:41
available in the agent force asset. Now
2:44
I can make use of this uh action in any
2:47
topic and then I should be able to
2:49
invoke this particular MCP tool.
2:53
Okay. In the builder
2:56
you can create a new topic or in the
2:58
existing topic go to this topics actions
3:03
use add from asset library and then you
3:06
should be able to select the MCP
3:09
tool.
3:13
Now
3:15
in this example I making use of agent
3:18
force service agent. So in order to make
3:21
use of uh the MCP tool for this agent
3:26
for service agent, find the user that is
3:30
tied to this agent for service agent.
3:33
Then assign the permission set to this
3:35
agent user. If you don't assign, then
3:38
the MCP tool action won't be invoked
3:40
because it is lacking the permission to
3:43
execute the MCP tool. Now once this is
3:47
done,
3:49
activate it or if you wanted to test it,
3:52
you can directly test it.
3:59
Okay, I'm going to ask
4:02
can you share the weather forecast for
4:04
next 3 days in Chicago? So this is my
4:06
prompt.
4:08
This should invoke this weather forecast
4:12
uh
4:14
topic and then it should execute the
4:17
MCP. So this is the MCP request and this
4:21
is the MCP response.
4:28
Yeah, looks like there is some issue
4:30
with my MCP uh server. But uh you should
4:34
see a response like this.
4:40
So this you will be able to see the MCP
4:42
request and then you should be able to
4:44
see the MCP response.
4:48
Make sure it is picking the right uh
4:51
action.
4:58
One important thing to note here is
5:02
if you wanted your agent force agent to
5:06
invoke the MCP servers tools then the
5:10
planner type should be atlas double
5:14
concurrent multi- aent orchestration.
5:18
So let's go to Salesforce developer
5:21
console
5:24
and this is the agent force uh agent
5:27
name and the planner type is atlas
5:30
concurrent multi-agent orchestration. So
5:33
update this planet type. There are two
5:35
ways to update. Uh you can try using
5:38
developer console. I believe it should
5:39
work. Or you can make use of
5:44
you can query this get the id of the gen
5:47
a planner definition which is our agent
5:50
force agent and then you can make use of
5:52
this sfdc uh uh uh command sfdx command
5:57
so that you you will be able to update
6:01
the planner type of your agent force
6:03
agent with the atlas concurrent
6:06
multi-agent orchestration.
6:11
without updating the planet type because
6:14
the Atlas region uh sorry the Atlas
6:16
reason engine should be Atlas double
6:19
concurrent multi- aent orchestration so
6:22
that it it can invoke the MCP uh tools
6:27
with with other planner types as of now
6:30
it is not supported so make sure to
6:31
update your planner Okay.
6:44
Please check the video description. In
6:46
the video description, I have shared my
6:47
blog post. From the blog post, you
6:49
should be able to get all the steps that
6:52
we discussed in this video for your
6:54
reference.
7:11
I hope it was helpful.
7:20
Thank you for watching.
#Internet Software
