Wiring OAuth 2.1 Into a Multi-Agent MCP Deployment Without Breaking Agent-to-Agent Trust
OAuth 2.1 and token exchange preserve agent identity across hops without inheriting credentials.

Securing a multi-agent MCP deployment requires an MCP gateway with OAuth 2.1 and tool-level RBAC that preserves delegated identity at every hop. Each agent needs its own credential, each destination needs an audience-bound token, and each tool call needs authorization tied to the human, agent, and tenant. Delegation must be verifiable without passing an inherited token down the chain.
Why OAuth 2.1 became mandatory for MCP servers, and what changed in the July 2026 spec
The July 2026 MCP specification tightened authorization to stop a valid token from being accepted in the wrong place. The chronology needs care. OAuth 2.1 requirements for remote servers date to the March 2025 revision, while the authorization framework uses SHOULD for HTTP-based implementations. July therefore should not be described as the moment every remote server became subject to an unconditional authentication mandate. Its significance lies in the more specific binding and validation rules, including PKCE requirements.
RFC 8707 Resource Indicators bind token requests to their intended resource, and MCP servers must validate that received tokens were issued for them. A token for one server is not a ticket to another. The specification also explicitly forbids token passthrough, so a server cannot forward a received token as its own credential. That rule helps guard against confused-deputy risks, though the specification’s discussion of that problem deals with a separate proxy-authorization scenario.
Client ID Metadata Documents, or CIMD, replace deprecated Dynamic Client Registration as the preferred registration mechanism. This reduces open registration’s client-sprawl problem but introduces SSRF and localhost-impersonation risks that authorization servers must handle. Identity metadata is not self-authenticating paperwork. A 2026 MCP Python SDK flaw showed the consequences of missing issuer validation, allowing a malicious server to steer a client toward an attacker-chosen token endpoint and harvest its client secret, authorization code, and PKCE verifier. The client-credentials extension adds machine-to-machine authentication for unattended agents, CI jobs, and workers while leaving user authorization in place.
The three identities hidden inside every agent tool call, and why a single inherited token cannot cover them

Those protocol rules say where a token belongs, but they leave out parts of the relationship behind an agent’s action. Consider a deploy agent acting on a developer’s request. The developer supplies consent that the action is wanted. The agent runtime supplies the execution identity, identifying the software acting and its limits. The tenant organization sets the boundary by showing which team owns the target and bears the consequences.
An inherited user token collapses those three principals into one. It can show that a human approved access without establishing whether the caller is the credentialed agent runtime or whether the target service belongs to the right tenant. That leaves two questions unanswered at execution time. Whose credentials did it use?
The FastMCP failure pattern described in the notes has this shape, with apparent authorization but no binding between consent, actor, and target. The correction is not another login screen. Each principal must be explicit, independently verifiable, and recorded at every tool call. Otherwise, a technically acceptable bearer token can conceal an unacceptable relationship between the caller and the action.
The CNCF’s March 2026 cloud-native agentic guidance gives a useful test for distinct workload identity. An agent needs one when it acts autonomously, persists beyond the user session, or operates outside the user’s permission scope. The deploy agent in this scenario meets all three conditions. Its identity therefore cannot be borrowed from the developer merely because the developer started the conversation.
How token exchange builds a delegation chain instead of inheriting a token

Token exchange preserves the relationship without preserving the same credential. The human first consents to the task, identifying the agent that will act. The August 2025 IETF draft draft-oauth-ai-agents-on-behalf-of-user introduces requested_actor for that purpose in the authorization request and actor_token to authenticate the agent during the authorization-code exchange. Support for this draft mechanism can vary across OAuth implementations.
The agent then authenticates with its own credential, preferably a signed JWT assertion tied to verified runtime identity. The exchange includes the actor authentication required by the pattern. The authorization server mints a delegation token identifying the original human, the acting agent, and the permitted task scope. The agent sends that token to the intended MCP server, which validates its audience and scope before executing the tool.
A second agent-to-agent hop requires another exchange. The downstream agent presents its own credential and the upstream delegation token so that the authorization server can issue a fresh token for the next audience. RFC 8707 binding prevents the previous server’s token from simply being replayed at the next destination. The authority has a traceable path, while the credential changes.
SPIFFE/SPIRE and AWS IAM Roles Anywhere provide workload identity options beneath this exchange. SPIRE can use selectors including service account, namespace, and container image digest, while IAM Roles Anywhere authenticates through X.509 certificates. Auth0’s Auth for MCP, generally available in May 2026, provides a shipped example of on-behalf-of token exchange for downstream API calls and support for resource identifiers. Those tools handle delegation plumbing, but they leave some policy decisions about a deployment to others.
Why per-tool scope design determines whether multi-agent trust survives the second hop
A fresh token can still grant far too much. If every delegation token includes read, write, and administrative access, token exchange changes the packaging without meaningfully reducing the blast radius. The chain may identify each actor correctly while permitting every actor to do almost everything. Narrow scope is what gives delegation substance.
For the deploy scenario, deploy:write must be bounded to the tenant’s services, and production mutation needs fresh human consent. Rollback uses the same write scope because reversing a deployment has the same blast radius, even though its direction differs. Scaling also uses write authority and needs a tenant-quota boundary because it changes how much is spent. By contrast, logs:read is read-only and tenant-bounded, with no cross-tenant reads. Deploy and log-reading tools must not share a scope simply because one agent calls both.
These examples also expose the limit of scope names. The deploy:write label alone does not distinguish a deployment from a rollback or establish whether a scaling request fits the tenant’s quota. Each call must be authorized against the intersection of the agent’s role, the user’s authority, and the task context. The user’s full entitlement set is not the default grant.
MCP does not standardize per-tool authorization within a server, leaving gateways and policy engines to fill that gap. Okta’s approach filters unauthorized MCP tools based on the delegating user’s identity before the model executes, keeping out-of-scope tools out of its view and reducing schema token costs. Enforcement still needs the complete identity intersection. Narrow scopes also make the audit record legible, because a tenant-bounded log read and a production write no longer look like two uses of the same universal permission.
How do enterprises add a governed authorization layer to multi-agent MCP?
An MCP gateway centralizes authentication, access control, routing, observability, auditing, and policy enforcement across agents and servers. That shared enforcement point prevents each server from inventing its own interpretation of delegation. Independent implementations can leave access policies uneven, inference costs unattributed, and failure behavior inconsistent. Process cannot take the place of an enforcement point.
For enterprise tool-level RBAC, the governed layer connects to existing identity systems such as Okta and Entra ID through the organization’s SAML/OIDC arrangements. Policy then draws on the authoritative identity graph. The buying distinction is concrete. OAuth support establishes token handling, while tool-level RBAC establishes whether this agent can call this tool under this user’s authority and task context.
That layer must also inspect threats that valid credentials do not resolve. A compromised MCP server can place instructions in a tool description that the agent reads as guidance, without any malicious user input. Prompt injection detection, PII blocking, and secret detection therefore belong at the governed boundary. A valid token is not a character reference for the tool description attached to it.
Uber’s in-house architecture shows how this works at scale, with an AI Gateway, an MCP gateway and registry across thousands of internal services, and an agent identity system that extends its Zero Trust Architecture. Snowflake’s Cortex AI Gateway offers centralized MCP capabilities covering authentication, fine-grained authorization, and discovery and monitoring of shadow AI and MCPs across more than 100 MCP servers, including BYO and VPC connect, in private preview in the supplied material. These examples serve different roles. Auth0 supplies delegation capabilities, Okta illustrates identity-based tool filtering, and Snowflake describes centralized gateway coverage, so the evidence supports capability comparison.
What the audit log must record to make agent-to-agent delegation verifiable at incident review
The governed layer applies policy forward, while the audit log lets an incident reviewer reconstruct it backward. A record stating only that a deploy tool ran cannot establish who authorized that particular deployment. The record needs the original human principal and a separate agent identity tied to the process, version, and tool manifest. Runtime attestation alone does not supply all that context. The audit design must preserve it explicitly.
The delegation mechanism must identify the exchange pattern and the authorization server that issued the token. Approval mode must distinguish fresh human consent, delegated authority within a pre-approved task, and an automated machine-to-machine credential. Those are different grounds for action. Without that distinction, a human-approved deployment and an agent acting on stale intent with a still-valid token can produce indistinguishable entries.
The tenant boundary must identify the organization whose resources and blast radius were in scope. Without it, the record cannot expose a cross-tenant read even where policy should have prevented one. The authorization context also needs the specific tool, the scope presented, and the audience the token is bound to. Together, those fields let the reviewer relate what ran to the permission presented and the server intended to accept it.
Distinct audit usernames for human, CI, and agent lanes make the actor directly queryable rather than something inferred from timing or conversation history. The same separation belongs at both the MCP layer and the deployment system beneath it. A log must distinguish consent from execution and connect both to a bounded task, or it cannot establish whose credentials were used.
Applying the full pattern: what a correctly wired multi-agent MCP deployment looks like end to end
The implementation begins by separating human, CI, and agent credential lanes before deployment. Each lane gets its own audit username, and the agent lane uses short-lived workload identity through SPIFFE/SPIRE or an equivalent in place of a long-lived shared secret. The design also associates that identity with the agent process and version. This produces an identifiable actor before any tool access is granted.
Next, the agent identifies itself to the authorization server through CIMD at the governed layer. New registrations do not use DCR. The layer validates the CIMD URL, guards against SSRF, and records the registration event. Registration establishes the client relationship, but it does not grant blanket permission to deploy.
The third step constructs delegation at every agent-to-agent hop. The acting agent presents its signed JWT assertion and the upstream delegation token through the on-behalf-of pattern, and the authorization server returns a fresh audience-bound, task-scoped token. No received token is forwarded as-is. For the deploy agent, this means the credential reaching the MCP server represents that agent’s bounded authority on the developer’s behalf.
Fourth, the governed layer filters the tool manifest before the model runs and enforces permissions for each tool and tenant. Only tools allowed by the agent role, user authority, and task context are available, and deploy and read scopes stay separate. Execution remains subject to authorization for the actual call.
Fifth, prompt injection detection, PII blocking, and secret detection run at the governed layer on every tool call. Tool descriptions from unvalidated servers are treated as an injection surface. Sixth, every hop writes a structured, queryable record containing the human principal, agent identity, delegation mechanism, approval mode, tenant boundary, and tool with its scope and audience. That record completes the connection between permission and execution.
When the deploy is reviewed, “whose credentials did it use?” has an answer in a log query.


