The Door for Tools
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
Module 5 of 6 in the chapter Agents and Identity, chapter 17 of Securing Salesforce: Identity and Access. Each module stands on its own.
The question this module answers: How does an MCP tool prove who it’s working for, into Salesforce and out of it?
One plug, two directions
Section titled “One plug, two directions”The Model Context Protocol, MCP, is an open standard for connecting AI applications to tools and data. An MCP server offers tools; an MCP client, an AI app or an agent, calls them. Salesforce describes its own MCP servers as “a universal connector”: set up a server once, and “any MCP-compatible client can connect to it by using standard OAuth-based authentication” (S5).
For identity, there are two directions, and they work very differently:
- Into Salesforce. An AI app outside Salesforce, Claude, ChatGPT, Cursor or your own agent, calls Salesforce’s MCP servers to read and change records.
- Out of Salesforce. An Agentforce agent calls someone else’s MCP server, a payments provider, a ticketing system, a partner’s tools.
Same protocol. Different doors, different answers to “who is this, and who is it acting for?” How MCP fits into an integration design is the Integration course’s job. This module is the door.
Into Salesforce: always a person
Section titled “Into Salesforce: always a person”Salesforce’s hosted MCP servers make one strong choice: every connection is a person. In Salesforce’s words: “The system uses OAuth authorization code flow exclusively, maintaining human accountability for all transactions. There are no service accounts, no machine-to-machine flows, and no autonomous operation outside of user context” (S7).
So the door is chapter 9’s: the web server flow, with PKCE, which is “mandatory for all OAuth flows” (S7). A person signs in, approves the AI app, and from then on “every MCP tool call runs with the same permissions as the user who authorized the connection,” with “all actions… attributed to the named user in audit trails” (S7). Module 3’s power of attorney, built in.
The app is chapter 13’s app. You make an external client app for each MCP client; “Connected Apps aren’t supported” (S6). It needs the client’s callback URL, the mcp_api and refresh_token scopes, and JWT-based access tokens for named users (S6). Two more things Salesforce makes you decide, on purpose:
- Servers are off until you turn them on. “MCP servers are disabled by default and require explicit administrative action to enable” (S7).
- No app registers itself. “Dynamic client registration is not supported. Administrators must explicitly create and configure External Client Apps” (S7). OAuth has a standard way for apps to register themselves, dynamic client registration; Salesforce doesn’t support it here, so an admin decides every app that may connect.
Then harden the app, from Salesforce’s own list (S6), all of it from chapter 13:
- Who may use it. “By default, any user in your org can authenticate through the External Client App.” Require a permission set instead.
- A secret, only for web-based clients that can keep one on a server; never in a desktop app.
- IP ranges, if the client has stable ones (some exceed the allowlist; check with the vendor).
- Refresh tokens, 30 days or less, with rotation (module 3).
- Single logout, so ending her Salesforce session ends the MCP session too.
And plan for two practical things. A new external client app “can take up to 30 minutes to become available” (S6), the wait chapter 16 warned about. And the hosted MCP servers are “intended only for customers with Flex Credits,” and usage may be billed (S5, checked 2026-11-20).
To narrow what a person’s agent can do further, Salesforce suggests a read-only server, named queries, and custom tools with your own logic (S7). To see what agents did, filter the API logs for API_CLIENT_CATEGORY = SALESFORCE_HOSTED_MCP (S7). Chapter 16’s logs, with one more filter.
Out of Salesforce: you choose
Section titled “Out of Salesforce: you choose”When an Agentforce agent calls someone else’s MCP server, Salesforce doesn’t make the choice for you. You register the server in the Agentforce Registry and pick how it authenticates (S9):
- No authentication. Only for tools that are public anyway.
- OAuth 2.0 with a client ID and secret. The client credentials flow from chapter 8. One identity for the whole org.
- An external credential “that provides per-user authentication.” Here “end users access the server with their own credentials instead of a system-to-system OAuth 2.0 client credentials connection,” and they “must be Salesforce-authenticated at run time” (S9).
That’s module 4’s question at the last hop: does the next system need the person? Salesforce’s architects spell out what the shared choice means: a system-to-system connection is “one shared system identity, so all callers receive the same privileges,” and the other side’s audit trail “shows the integration user, not the individual end user” (S1). The other side also knows nothing about Salesforce’s sharing rules: “It runs whatever the connection is authorized to do” (S1).
So choose per server. Public reference data: client credentials may be fine. Anything that’s one person’s, or that changes something in her name: per-user. And whichever you choose, “Expose only the MCP tools the agent needs,” and prefer servers scoped to the use case over one that does everything (S1). You allowlist tools when you register the server (S9); allowlist few.
What’s next
Section titled “What’s next”Module 6: agents come and go. An agent has an identity from the day it’s made to the day it’s gone, and someone has to look after it.
What an architect decides here
Section titled “What an architect decides here”- Which AI apps may connect to Salesforce’s MCP servers, each with its own external client app, decided by an admin.
- Who may use each one, by permission set, and its token policy.
- Which servers and tools are on, starting read-only.
- For every outside MCP server: shared identity or per-user, decided by whose data it is.
Explore
Section titled “Explore”- Salesforce Hosted MCP Servers: Get Started (opens in a new tab) (Salesforce Developers; checked 2026-11-21)
- Security Best Practices (Hosted MCP Servers) (opens in a new tab) (Salesforce Developers; checked 2026-11-21)
- Register a Third-Party MCP Server in Agentforce Registry (opens in a new tab) (Salesforce Help; checked 2026-11-21)
