Est.

Zero-Trust Identity Verification for MCP Sessions Across Heterogeneous Agent Runtimes

Sessionless MCP demands per-request verification, and a gateway control plane is how to enforce it.

· 8 min read · Updated
Cover illustration for “Zero-Trust Identity Verification for MCP Sessions Across Heterogeneous Agent Runtimes”
Threat Intelligence · November 11, 2026 · 8 min read · 1,862 words

An MCP gateway is an enforcement layer between AI agents and MCP servers that routes tool calls and uses identity, access, data protection, and audit controls to check them. It gives agents a single endpoint for internal tools while governing access across the servers behind it. MCP’s sessionless redesign makes those controls a per-request requirement, best enforced through a consistent control plane across separately configured servers.

Why MCP's sessionless redesign makes per-request identity verification a protocol-level requirement

HashiCorp’s Terraform MCP vulnerability exposed the problem with treating a session identifier as proof of authority. Anyone holding another user’s session identifier could issue tool calls. No malware or lateral movement was required. A session ID in the wrong hands was enough, because possession could stand in for fresh verification of the caller.

MCP’s 2026-07-28 revision eliminated the stateful session model, including the initialize handshake and Mcp-Session-Id. Every request now stands on its own and must present its own verifiable token. Removing sessions removes that session-hijacking vulnerability class, though not every possible token attack.

Large organizations went from zero to dozens of internally built MCP servers within a year, with teams choosing no authentication, API keys, or full OAuth independently. Offboarding required fleet-wide coordination to carry out a single identity change. The specification now demands per-request verification, but it does not specify how to enforce it consistently across heterogeneous runtimes.

What per-request zero trust actually requires at the MCP layer

Zero trust at the MCP layer means five verifiable checks before a tool call runs. The first is identity verification, covering the agent and the originating user. The second is token validation, including the issuer, validity, audience, and short-lived, task-scoped authority. The third is authorization for the particular tool action. The fourth is inspection of inputs and outputs against data protection policy, and the fifth is independently attributable audit recording.

RFC 8707 resource indicators bind a token to one MCP server through its aud claim, which the receiving server must verify on every request. A token minted for one server is valid only for that server, which addresses the cross-server replay boundary exposed as missing in the Terraform vulnerability.

Authorization must then distinguish between actions available to the same caller. Permission to read customer records does not automatically permit exporting, deleting, or forwarding them. Scopes must remain tool-specific rather than collapsing into mcp:all, which can turn a minor token leak into full server compromise. The specification covers client identity, token binding, and error signaling, while implementers must supply per-tool policy, upstream-call controls, and audit.

The identity problem: why client software IDs are not enough and what replaces them

Client ID Metadata Documents identify client software, leaving individual agent instances undifferentiated. The 2025-11-25 specification made them the default registration mechanism, and the 2026-07-28 revision formally deprecated Dynamic Client Registration in their favor. Shared service accounts have the same limitation, preventing per-agent scope and revocation without disrupting other agents using the account.

MCP’s 2026-08-22 roadmap makes agent identity a priority because more callers now run as cloud processes, including for offline users or through sub-agents. SPIFFE/SPIRE addresses workload identity without manual credential provisioning by issuing cryptographically verifiable identities based on provenance and runtime context. It answers which workload is calling and whether its identity is verifiable. It does not authorize the requested action.

The two-layer model pairs SPIFFE SVIDs with OAuth 2.1 On-Behalf-Of token flows. Agents exchange user tokens for scoped service tokens that preserve the originating user’s context through delegation, including agent-to-agent handoffs. Agent authentication alone is not sufficient authority. SCIM-IdP integration complements this model by syncing groups, so leaving a role removes tool access at the next sync cycle.

OAuth 2.1 remains an IETF Internet-Draft, specifically draft-ietf-oauth-v2-1-17 as of October 2026. MCP, Red Hat, NetScaler, and Microsoft’s Azure MCP guidance build on it, but it is not yet an RFC. An “OAuth 2.1 certified” claim is therefore inaccurate.

Why heterogeneous runtimes make server-by-server configuration unworkable

A fleet can have cloud-hosted workloads, containerized services, background processes that run for a long time, and short-lived task runners that all call the same MCP servers. Their transports, lifecycles, and trust contexts differ. A server allowlist cannot cover everything that changes from one call to the next, including the delegating user, the tool’s current risk level, and whether the agent runs in a known environment. Recognizing a caller is not the same as understanding its authority for this task.

Some servers validate tokens differently, while others have no authentication, leaving no single point to change policy, revoke credentials, or audit activity across the fleet. Giving every agent a verifiable identity does not fix that fragmentation by itself. The same rules must apply to the identity wherever it runs.

Policy evaluation also needs separation from the gateway’s data path. Early deployments that coupled them tightly faced a choice between stale policy and unacceptable latency, because changing rules and processing calls became entangled. With a separate policy service, rules can change without redeploying the proxy, and slow policy engines do not block hot paths. Consistent enforcement across servers requires one enforcement layer beyond what more elaborate per-server configuration can provide.

What is an MCP gateway, and how does its control plane enforce every call?

A production MCP gateway validates the OAuth 2.1 token and audience, routes the request to the correct backend server, and enforces per-team and per-role tool access. It also records the invocation with user identity and timestamp and applies data loss prevention rules to inputs and outputs. Routing alone is not the security boundary. The gateway must bind the routed action to the caller’s verified authority.

The control plane distributes policy, manages configuration, and collects analytics. Lightweight instances of the data plane run close to the agents and enforce authentication, authorization, routing, and rate limiting. This separation lets policy change without proxy redeployment or a mandatory trip through one distant chokepoint. Central governance need not mean centralized traffic.

Deployment patterns include centralized hub-and-spoke, federated or mesh gateways, sidecar gateways, and in-process enforcement. None is universally optimal, because governance and performance requirements differ. For most organizations, the recommended balance is a centralized control plane with distributed data-plane gateways. Enforcement must remain consistent across physical deployment locations.

That boundary must also cover shadow MCP traffic. To make the gateway the only ingress point, firewall rules and service mesh configurations must block direct agent-to-tool connections. Finding unapproved traffic calls for behavioral analysis and runtime API discovery because signature matching alone will not find it. Once shadow servers are found, they should be brought under control-plane governance, since banning them outright encourages workarounds.

How current gateway implementations handle the five checks across different enterprise stacks

Amazon Bedrock AgentCore Gateway combines Cedar policy with Lambda interceptors per tool, making it a native fit for AWS-native agent stacks. Azure API Management offers Entra ID Workload Identity for AKS-hosted self-hosted gateways, removing client secrets that would otherwise need rotation. These address different parts of the control problem. The former focuses on tool-level policy and dynamic validation, while the latter gives enterprises that use the Microsoft stack a way to handle workload authentication.

Kong AI Gateway supports OAuth 2.1 through its AI MCP OAuth2 plugin and also offers SAML plugin support. That makes it a relevant option for organizations already using Kong for API management. Cloudflare MCP Portals integrates with Access and OIDC, fitting organizations already using Cloudflare Access.

Docker MCP Gateway uses Cedar permit/forbid rules at the gateway policy layer. Those rules control requests and server registration, while container isolation has its own control.

Microsoft MCP Gateway is open-source and integrates with Entra app roles. IBM ContextForge takes an open-source registry model, providing a registry and proxy with centralized governance, discovery, and observability. Willow, formerly Webrix, is a gateway entrant rebranded in 2026. Those descriptions do not establish equivalent coverage of every check.

For buyers, the evaluation should return to evidence. Does the gateway validate audience claims per request, enforce policy per tool call, integrate with the existing IdP, and produce an audit trail attributable to a named person? Content inspection must also check what is in prompts and tool calls. The identity pattern should combine persistent company IdP identities with short-lived, task-scoped credentials, so durable attribution does not require durable access tokens.

How prompt injection and tool poisoning break the identity model after the token is validated

A validated token proves who sent a call while leaving open whether someone manipulated its contents against the user’s intent. Correct authentication can therefore coexist with a harmful request. Prompt injection uses that gap to turn what the agent reads into instructions it follows. The caller may be genuine while the purpose of the call has been hijacked.

The GitHub MCP incident illustrates the sequence. An attacker placed hidden instructions in a malicious GitHub Issue on a public repository, which a Claude agent using the GitHub MCP server encountered. The instructions redirected the agent to access tokens in a separate private repository and exfiltrate them through a subsequent tool call. Security researchers called the attack a combination of Indirect Prompt Injection and Data Exfiltration.

Tool poisoning broadens the same problem beyond retrieved content. Instructions can hide in MCP tool descriptions, one server can influence how an agent uses another trusted server, and tool behavior can change after initial approval. A token check detects none of these changes. Initial approval is not a permanent certificate of good behavior.

The enforcement layer needs content inspection on every call because agent-side defenses still cannot be relied on. Sensitive tool output can flow directly into a model’s context without crossing a network boundary that a traditional proxy would inspect. Gateway-side DLP must cover outputs as well as inputs to address that path.

What a complete audit trail requires and why agent-side logging cannot substitute for gateway-side attribution

An agent’s own log is a self-report from the entity under governance. Gateway-side logging enables independent attribution by recording activity separately from the agent at a mandatory point on the request path. A complete record includes the agent identity, originating user identity, invoked tool, full arguments, policy verdict, applicable rule, and timestamp. A tool name and a time are not enough.

The record must answer which employee’s delegated credential authorized the action. A shared service account cannot supply that attribution, even if its authentication was technically valid. The record must include calls that were allowed as well as those that were denied. Logging only denials hides sequences of individually permitted calls that together amount to exfiltration or privilege escalation.

The ZT-MCP framework includes anomaly detection in its Protocol Audit Logger because multi-step attacks become visible in aggregate. Gateway telemetry must also reach the tools security teams already operate, including Datadog, Grafana, or an OpenTelemetry collector. A separate dashboard is not the objective. OTel-native logging brings agent activity together with infrastructure and application telemetry, so investigators can see how a tool call relates to what the rest of the system was doing.

MCP’s 2026-07-28 revision made every request stand on its own. The audit trail is the after-the-fact evidence that each request actually faced verification, authorization, and content controls. The five checks are complete only when their execution is recorded and attributed to a name.

Sources

  1. Agentic MCP Security Best Practices Guide
  2. [2608.10760v1] A Gateway Architecture for Enterprise MCP Authentication: Unifying Heterogeneous Auth, Identity Delegation, and the User / Non-User Persona Problem

More in Threat Intelligence