Securing MCP Servers in the Enterprise
MCP makes authorization optional, so an enterprise has to require it. Per-user OAuth, audience-bound tokens, the issuer checks and stateless core of the 2026-07-28 revision, managed connectors, and what a CISO should verify.
Coding and operations agents increasingly reach enterprise systems through the Model Context Protocol: tickets, incidents, documentation and internal APIs. Where nobody governs it, a developer adds a local server, a token sits in a configuration file, and nobody can say which agent read which record, or on whose authority.
The protocol leaves the first decision to the organization. The authorization specification states that “Authorization is OPTIONAL for MCP implementations.” An enterprise therefore has to require it, and then test that it is implemented correctly. The current revision, released on 28 July 2026 as 2026-07-28, also changes what “correctly” means: it adds issuer checks, deprecates one way of registering clients and removes protocol sessions. This article covers the controls I would put in place, and what to test against that revision. A separate article compares the authorization text of 2026-07-28 with the previous revision in more detail.
Remote servers with per-user OAuth should be the default
MCP defines two standard transports: stdio, for “a client-launched subprocess,” and Streamable HTTP, where “each message is an HTTP POST to a single MCP endpoint.” Claude Code describes HTTP servers as “the recommended option for connecting to remote MCP servers” and states that its SSE transport “is deprecated.”
The authorization specification tells implementations that use stdio to “retrieve credentials from the environment” instead of following its flow. In practice a local connector then runs on a credential stored on the laptop: either a personal token issued to the engineer, often valid until someone revokes it, or a shared service token that no single person owns. Remote servers with per-user OAuth give each token one audience, one user and one place to revoke it, so the agent’s access to a system is its user’s access to that system.
| Local connector, personal token | Local connector, shared token | Remote server, per-user OAuth | |
|---|---|---|---|
| Whose access it is | One engineer’s, often broader than the task | Nobody’s in particular | The user who prompted the agent |
| Bound to one server | No | No | Yes, by audience |
| Reads attributable to a person | Only if the token is never shared | No | Yes |
| Revocable from one place | No | No | Yes, at the authorization server |
Source: MCP specification, authorization and transports; author's assessment.
The specification turns authorization into tests
Once authorization is required, the specification sets requirements a security team can test directly. Three have held since the 2025-11-25 revision and remain in 2026-07-28: clients “MUST implement Resource Indicators for OAuth 2.0 as defined in RFC 8707,” which binds each token to one server; servers “MUST validate that access tokens were issued specifically for them as the intended audience”; and servers “MUST NOT accept or transit any other tokens.” The specification’s security guidance sets out “why token passthrough is explicitly forbidden,” and states the rule plainly: “The access token used at the upstream API is a separate token, issued by the upstream authorization server.” A server that forwards the client’s token bypasses the controls that depend on audience, and the downstream logs no longer show who actually called.
The 2026-07-28 revision makes clients verify which authorization server issued a code or a credential, and deprecates one registration method.
- Issuer validation against mix-up attacks. Before redirecting the user, “the client MUST record the
issuervalue from the selected authorization server’s validated metadata document,” and it “MUST apply the validation in RFC9207 Section 2.4 before transmitting the authorization code to any token endpoint.” Authorization servers “SHOULD include theissparameter in authorization responses.” - Credentials bound to their issuer. Pre-registered and dynamically registered client credentials are keyed “by the authorization server’s
issueridentifier,” and “clients MUST NOT reuse client credentials from a different authorization server and MUST re-register with the new authorization server.” - Dynamic Client Registration deprecated. The revision deprecates “the OAuth 2.0 Dynamic Client Registration Protocol (RFC7591) as a client registration mechanism in favor of Client ID Metadata Documents.” It remains available for backwards compatibility, and the deprecation registry gives the earliest removal as the “First revision released on or after 2027-07-28.”
| Test | Expected result | Since |
|---|---|---|
| Send a token issued for another server | Rejected by audience validation | 2025-11-25 |
| Check whether a server forwards the client’s token downstream | Never; the server uses its own credential | 2025-11-25 |
Return an authorization response with a wrong iss | The client stops before sending the code | 2026-07-28 |
| Point protected resource metadata to a second authorization server | The client re-registers, or reports an error for pre-registered credentials, and never reuses them | 2026-07-28 |
| Inventory clients that register dynamically | A dated plan to move to Client ID Metadata Documents | 2026-07-28 deprecation |
| Send a request whose headers and body disagree | Rejected by a server that processes the body | 2026-07-28 |
Source: MCP specification 2025-11-25 and 2026-07-28, authorization pages, changelog and deprecation registry. Selection of tests is the author's.
A stateless protocol moves state to places that need protection
The 2026-07-28 revision removes protocol sessions and the Mcp-Session-Id header. Sessions were never meant to carry authentication, since the earlier security guidance already said servers “MUST NOT use sessions for authentication,” but any server that leaned on the session identifier for authorization context needs another place for it, and I would carry it in the bearer token and in state the server can verify. Where a multi-step exchange still needs state, it travels through the client in a requestState value, and the specification is explicit about its trust level: “servers MUST treat requestState as an attacker-controlled input,” and if it “influences authorization, resource access, or business logic, servers MUST protect its integrity (e.g. HMAC or AEAD).”
Two other rules in the same revision close gaps a gateway or a schema could open. Servers that process the request body “MUST reject requests where the values specified in the headers do not match the corresponding values in the request body,” so a gateway that routes on headers and a server that executes the body cannot act on different values. And implementations “MUST NOT automatically dereference $ref values that resolve to a network URI” in schemas, which closes a server-side request forgery path by default.
The connector list has to be managed centrally
If developers can add any MCP server, unreviewed integrations follow. In Claude Code, a managed-mcp.json file in the system-level managed settings directory defines the servers every session may use:
{
"mcpServers": {
"tickets": {
"type": "http",
"url": "https://mcp.example.internal/tickets"
},
"incidents": {
"type": "http",
"url": "https://mcp.example.internal/incidents"
}
}
}
With the file deployed, “Users can’t add, modify, or use any other MCP servers, including plugin-provided servers and servers passed with the --mcp-config CLI flag.” The documentation lists servers that still load under that control, among them in-process servers registered by the application that started the session and the server Claude Code creates when a mod adds tools. The last one is the exception a user controls, and the documented remedy is to stop user-installed mods from loading with the allowManagedModsOnly option in managed settings.
Scopes and content need separate controls
Connectors should be registered with the narrowest scopes that do the job. In the reference design of my book The Enterprise Agentic Software Factory, ticket and incident connectors are read-only: an agent can read a ticket under its user’s identity and cannot write anything back through the connector.
Read access still brings content into the session, and Claude Code’s documentation warns that “Servers that fetch external content can expose you to prompt injection risk.” A ticket can be written by anyone with access to the ticket system, including customers. The reference design therefore treats ticket text as untrusted: a person turns it into an approved specification change before implementation starts, and implementation agents in CI run with no ticket connector at all, reading the approved specification from their checkout.
Access has to follow people through joiner, mover and leaver events
Disabling a person in the identity provider does not revoke the grants their MCP clients hold at each authorization server. Claude Code is explicit about its own part: when a remote server is removed, it deletes the stored tokens but “doesn’t revoke the tokens at the authorization server that issued them,” and the documented step to revoke them is claude mcp logout <name> before removal, where the server supports revocation.
| Event | Control |
|---|---|
| Joiner | Per-user OAuth sign-in on first use of each managed server |
| Mover | Group change in the identity provider; gateway policies, caps and model list follow at the next refresh |
| Leaver | Identity disabled in the identity provider, and grants revoked at each authorization server |
Source: Author's reference design, The Enterprise Agentic Software Factory; Claude Code MCP documentation.
Questions a CISO should be able to answer
- Which MCP servers can an agent reach today, and who approved each one?
- Does every server require OAuth, validate the token audience and refuse passthrough?
- Do our authorization servers send
iss, and do our clients reject a mismatch? - Which clients still register dynamically, and by what date will they move?
- Are any connectors running on personal or shared long-lived tokens, and which connectors can write?
- When someone leaves, how long until every one of their connector grants is revoked at its authorization server?