Siirry sisältöön

The Door for Tools

Tämä sisältö ei ole vielä saatavilla valitsemallasi kielellä.

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?

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.

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.

MCP both ways: who signs in, as whom MCP both ways, and who each connection works as. Into Salesforce: an AI app, Claude, ChatGPT, Cursor or your own, comes through the authorization code flow with PKCE, only, and an external client app; it works as the person who approved, with her access, and the audit names her. Out of Salesforce, through Agentforce Registry, three choices: a public tool, with no authentication, works as nobody, for public data only; one shared identity, with client credentials, a client ID and secret, chapter 8, works as the integration, and every caller gets the same access, marked amber because the person is lost at the hop; each person, with a per-user external credential, signed in to Salesforce at run time, works as the person, with her own account at the other side. Footnote: Salesforce Developers and Salesforce Help, checked 2026-11-20. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-AGI-06", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} THE CONNECTION THE DOOR IT WORKS AS Into Salesforce an AI app: Claude, ChatGPT, Cursor, yours Authorization code, PKCE only; an external client app The person who approved her access; the audit names her Out: a public tool Agentforce Registry No authentication Nobody public data only Out: one shared identity Agentforce Registry Client credentials a client ID and secret · ch 8 The integration every caller gets the same access Out: each person Agentforce Registry A per-user external credential signed in to Salesforce at run time The person her own account at the other side through so through so through so through so Salesforce Developers and Salesforce Help, checked 2026-11-20. HOW TO READ IT the person kept the person lost at the hop © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

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.

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.

  • 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.