Est.

Why Your MCP Proxy Is a Security Control Plane Not a Networking Convenience

Agent calls need a governed chokepoint, not just a relay.

· 9 min read
Cover illustration for “Why Your MCP Proxy Is a Security Control Plane Not a Networking Convenience”
Threat Intelligence · November 12, 2026 · 9 min read · 1,970 words

An MCP gateway is a Layer 7 proxy that speaks the Model Context Protocol between AI agents and tool servers, enforcing identity, access, credential, and content policies while producing an audit record. It gives agents a single governed endpoint for multiple MCP servers. Once those agents reach production systems, the gateway is a security control plane.

Why an MCP proxy positioned as a network hop leaves the call path ungoverned

A proxy sounds like a transparent relay. Production agents need something less accommodating. An assistant that generates text can say the wrong thing, while an agent that deploys code, pays invoices, or provisions cloud resources can do the wrong thing. A prompt instruction such as “never run rm -rf” remains a suggestion to a stochastic model. The network path cannot simply pass traffic and leave the model in charge of its own boundaries.

MCP made the contract between agents and tools the same, so calls could pass through a common interception layer. Errico et al. describe that architecture as a universal interface for accessing tools, data sources, and external systems. Without enforcement between the endpoints, though, that shared contract leaves a gap across the fleet. Direct connections let agents authenticate outside the normal gateway-and-WAF perimeter. A compromised agent could read a CRM, query a data warehouse, and send results through a collaboration integration, leaving separate application logs that do not connect the actions.

What is an MCP gateway, and how does it work with AI agents?

An MCP gateway presents itself as a server to agents and as a client to downstream servers. Every tool discovery and invocation therefore passes through the same auditable hop. Unlike a simple relay, it verifies callers, filters their tools, brokers downstream credentials, inspects content, and records enforcement decisions. Transport encryption does none of those jobs. It protects traffic in transit without deciding whether the requested action belongs in production.

The gateway’s control plane and data plane have different responsibilities. The control plane holds configuration, the server registry, policy, and audit metadata, while the data plane handles live requests against those policies. Configuration stays outside the request hot path. Recording policy decisions independently of application logs lets an auditor reconstruct which rule applied to a call. Brett’s MCP gateway architecture paper places these functions at a common ingress point, bringing network, application, identity, and monitoring controls together.

That architecture gives an approved client a single MCP endpoint rather than a collection of independently governed connections. Behind it, a translation layer can make legacy APIs and databases available as MCP servers. The existing identity provider supplies short-lived tokens, the gateway validates them and applies policy, and observability runs alongside the request path.

Why caller identity is the foundational control and why shared accounts cannot satisfy it

A shared service account tells the gateway which account connected, but not which agent acted or for whom. That distinction governs everything that follows. An agent can persist beyond a user session and access sensitive resources independently, so authorization, credential scope, and audit attribution need a more precise identity than a communal login. On the governed path, the gateway validates identity against the organization’s identity provider. An asserted name is not proof of identity.

Enterprise-Managed Authorization (EMA), stabilized on June 18, 2026, makes the organization’s identity provider authoritative for MCP server access. After single sign-on, the client obtains an Identity Assertion JWT Authorization Grant through an RFC 8693 token exchange, then exchanges that grant for an access token from the MCP server’s authorization server. Access is scoped to the user’s groups and roles. EMA does not by itself establish the workload identity of an autonomous agent operating without a user present.

The MCP roadmap published August 22, 2026 names that unattended-agent gap, including cloud workloads and agents delegating narrower authority to sub-agents. The MCP OAuth Client Credentials extension addresses unattended client authentication, while standardized agent identity and delegation remain under development. The gateway is where those mechanisms become enforceable as they mature. The Cloud Security Alliance’s AIUC-1 Q2 2026 update likewise separates agent identity from access management, because proving who is calling and governing what that caller may do require different controls.

How per-caller tool filtering enforces least privilege where allowlists cannot

A CRM reader, a data warehouse query tool, and a collaboration integration can form a toxic combination. Each may be safe to use on its own. Together, they can let a compromised agent retrieve sensitive information and send it elsewhere. Approving each server does not establish that every agent should be allowed to combine its tools with every other approved tool. Least privilege therefore requires a per-caller tool allowlist evaluated on every request.

The gateway applies that distinction across agents by filtering what a caller can discover and invoke, so a broad server catalog need not become a broad grant of authority. This also addresses agents that overstep their intended role without an attacker deliberately controlling them. Errico et al. identify such agents as unintentional adversaries. A legitimate identity does not make every action legitimate.

An agent presented with hundreds of tools spends tokens on their descriptions and can select the wrong one. Gateway-side semantic filtering narrows the catalog for the request, reducing cost and selection errors.

Shadow MCP — why ungoverned servers are the inventory problem the gateway must solve first

Per-caller filtering can protect traffic only when it passes through the filter. Shadow MCP servers are in use outside that governed path, without review, authorization, or logging. An unapproved application may only store information, while these servers can run code, call APIs, and move data without a human in the loop. The inventory gap is therefore an execution gap.

A registry makes the boundary explicit, identifying which servers and tools have been approved. When a call passes through the gateway, an unregistered destination becomes detectable and deniable there. Direct connections outside it leave no trace in the control plane. Errico et al. recommend private registries or gateway layers as part of centralized governance, including controls against unvetted code running outside a sandbox and tools exceeding their intended scope. The registry is the prerequisite for applying those controls consistently.

The practical response is discovery and remediation. Discovered servers can enter the governed registry and become subject to the same policies as approved ones. That approach depends on one governed path for every agent, regardless of its eventual destination. A gateway cannot govern traffic it never receives.

Prompt injection and data exfiltration — why runtime content inspection must run at the gateway

In a documented 2025 case, prompt injection in WhatsApp messages that a trusted MCP tool returned led to data exfiltration. The tool was trusted, but its content was hostile. That distinction exposes the limit of identity checks and tool allowlists, because a correctly authorized agent can receive instructions disguised as data through an approved connection. CVE-2025-59944 in Cursor IDE, involving case-sensitivity-bypass-based MCP configuration tampering, also illustrates that the agent host itself can become a target. The consequence need not stop at an incorrect answer.

Runtime inspection addresses what access controls cannot see in advance. The gateway can inspect both tool arguments leaving the agent and results returning to it, without depending on the agent’s instrumentation. That independence is essential when the agent is the target. A compromised or misdirected agent cannot be the sole authority on whether its incoming content is malicious.

Errico et al. recommend inline policy enforcement with data loss prevention and anomaly detection, together with containerized sandboxing and input/output checks. These controls examine the content crossing the boundary. A compromised server can pass tool-name validation even as it sends back malicious content. An allowlist cannot inspect a response by implication, and calling a tool “trusted” does not make everything it retrieves trustworthy.

Credential brokering — why agents should never hold raw secrets

Even with the right identity and narrow tool access, an agent that holds a long-lived backend API key leaves a gap. Poisoned context, exposed memory, or intercepted tool calls can turn that key into part of the attack. The secret can still be used after the interaction ends. Rotation then means reaching every agent that has a copy, so credential recovery requires cleanup across all those agents.

The gateway separates agent authentication from backend authentication. It terminates authentication on the agent side and brokers short-lived, task-scoped downstream credentials, keeping the upstream secret out of the agent’s hands. Issuance, rotation, and revocation become centralized responsibilities. Per-user OAuth with PKCE also allows a user’s downstream credential to be revoked independently, without affecting other users of the same MCP server. Shared access to a server need not mean shared credentials.

This changes the shape of credential management. Direct connections create relationships between every agent and every backend it reaches, while gateway brokering reduces those pairwise relationships to managed agent-to-gateway and gateway-to-backend connections. With dozens of agents and tools, the notes’ comparison of 2,000 credential pairs and 90 managed connections illustrates the inventory burden. Scope remains essential even after that consolidation. An agent allowed to call a database tool should get credentials that let it do only the current task, so credential restrictions add to the limits set by tool-level permissions.

Diagram: Gateway Brokering Collapses Credential Complexity. Visualizes: Visualize the contrast between two credential-management topologies.

Why audit trails must come from the gateway, not from agent instrumentation

OpenTelemetry and security audit solve different problems. Engineering telemetry reports latency, token counts, and errors from instrumented code, and the v1.39 MCP semantic conventions standardize tool-layer visibility. Security audit must record what callers were permitted to do and what they actually did, including when those callers are uninstrumented, misconfigured, or hostile. Agent-emitted spans cannot guarantee that coverage. A missing span cannot distinguish an absent event from an agent that failed to report it.

The gateway generates evidence at the enforcement boundary rather than asking the subject of a control to certify its own compliance. Each record of a tool call can link the identity checked against the identity provider, the allow-or-deny decision, and the scope of the data involved. Credential management and content inspection also produce events at that boundary. The record needs protection of its own. Signed entries, rules for how long to keep them, and off-box archival provide tamper-evident evidence beyond what an ordinary agent or server access log can offer.

Completeness alone does not make the record actionable. An entry saying that a tool was called leaves the investigator to reconstruct who initiated it and under whose authority. A gateway audit record can connect the agent, the user on whose behalf it acted, the governing policy, and the decision. Errico et al. recommend provenance tracking across workflows for this reason. Attribution is what connects a suspicious cross-system action to the user request that initiated it.

Extending the enterprise stack rather than replacing it — how the gateway integrates with what organizations already run

The gateway’s value comes from extending existing authority into MCP traffic. Okta, Entra ID, or another identity provider issues short-lived tokens, and the gateway validates them. The identity provider remains the authority. EMA expresses the same principle at the protocol level by scoping server access to existing groups and roles. A new enforcement point does not require a parallel directory of people and permissions.

Audit integration follows the same pattern. Gateway-generated events can flow into existing OpenTelemetry collectors, Datadog instances, Grafana stacks, and SIEM pipelines. Security evidence comes from gateway enforcement even when it shares infrastructure with engineering telemetry. For policy, the recommendation is to use OPA expressions, CEL rules, or identity-provider role policies already in place, instead of adding a proprietary model that security teams must learn and audit on its own.

The practical path is to bring discovered servers into the governed registry incrementally and apply the same controls to each. Brett’s architecture places the gateway in front of existing systems, combining authentication, intrusion detection, and secure tunneling while retaining the infrastructure behind it.

Sources

  1. Securing the Model Context Protocol (MCP): Risks, Controls, and Governance
  2. Simplified and Secure MCP Gateways for Enterprise AI Integration
  3. Enterprise-Managed Authorization: Zero-touch OAuth for MCP

More in Threat Intelligence