Blog

Purpose-Built MCP Gateway vs General-Purpose API Proxy

A general-purpose API proxy can route MCP traffic without governing what that traffic does. That is the distinction behind the choice between a proxy and a purpose-built MCP gateway. When enterprises use tools, decisions need to account for agents, delegated users, tool arguments, and whole sessions. HTTP routing remains useful infrastructure, but it is not a substitute for those controls.

Why MCP changes what an API proxy is actually being asked to do

The architectural shift is from passive context to active tool use. Instead of only receiving data in prompts, agents call MCP servers to read files, open tickets, move records, and send messages. Each call can change something outside the conversation. It is therefore a security decision, an access-control event, and an audit record.

That changes the unit of control from an isolated HTTP exchange to an action within a stateful, multi-turn session. The action has an agent behind it, a human or workload context, and tool semantics that determine its consequences. Earlier calls can change the risk of later ones. A general proxy understands requests and responses, but those transport boundaries do not tell it whose authority an agent is exercising or what the session is becoming.

What a general API proxy can and cannot see in an MCP request

A general API proxy does useful work. TLS termination, load balancing, coarse rate limiting, token presence checks, and path-based routing are genuine capabilities. They get traffic to the right service with basic transport controls in place. MCP does not make any of that obsolete.

The limit appears inside the request body. A proxy sees an HTTP POST containing JSON, but its native routing logic does not interpret the tool call as a business action. A policy such as “this agent may query CRM records but not delete accounts” requires more than permission to reach an endpoint. Both actions can take the same route even when one is allowed and the other is denied.

The gap extends beyond tool names to six connected dimensions, including identity, authorization, secrets, inspection, resilience, and evidence. Shared keys do not provide end-to-end attribution, and gateway-held credentials do not provide short-lived, task-scoped issuance with no exposure to model context. Checking a tool name also leaves its arguments, response, and destination unchecked. Adding those capabilities requires new enforcement logic.

Why agent identity is the first gap a proxy cannot fill

Identity comes first because every later decision depends on it. When several agents share a service account, the audit log attributes their actions to that shared account. Revocation and investigation then inherit the same ambiguity. Non-human identities already vastly outnumber human identities in enterprise environments, so treating them as interchangeable HTTP clients leaves a large attribution gap.

Dual identity addresses the delegated nature of agent work. It authenticates both the agent and the human on whose behalf it acts, preventing the agent from exceeding the human’s authority. It also prevents the human from using the agent to perform actions their own account could not perform directly. The credential needs to describe the delegation.

The June 2026 Enterprise-Managed Authorization extension to MCP formalizes centralized provisioning of server access through enterprise identity providers. Microsoft Entra Agent ID offers managed credentials and an agent on-behalf-of flow. Amazon Bedrock AgentCore Identity provides a workload identity directory with per-agent ARNs and a KMS-encrypted token vault, while Google Agent Identity uses workload identities with 24-hour X.509 certificates per agent.

These capabilities belong in the enterprise identity management system already in place. A purpose-built gateway integrates with that system. A proxy can check that a token exists, but that check does not enforce dual identity, propagate delegated-human context, or issue short-lived task-scoped credentials.

How authorization for tool calls differs from authorization for API endpoints

Even a correctly identified agent needs a separate authorization decision for each invocation. Route-level authorization usually checks whether a token may POST to a given path. Tool authorization asks what the agent intends to invoke, with which arguments, against which data, under whose authority. The same MCP server can expose calendar queries, email sending, customer records, and infrastructure changes without making them equivalent permissions.

Arguments are part of the permission boundary. Allowing a support agent to use a CRM tool does not settle whether it may read tickets or delete accounts. The decision can also depend on data classification, environment, transaction value, and the target server. A tool allowlist alone cannot express those distinctions.

Delegation makes that boundary more demanding still. A planner may delegate to a researcher, which later asks a publishing agent to transmit a result outside an approved channel. Each hop needs its own policy decision, rather than inheriting blanket approval from the first perimeter check. Centralized policy evaluation replaces scattered permissions because the authority being exercised changes along the chain.

Rules must also be enforced outside the agent’s context window. An agent under prompt injection may ignore instructions meant to constrain it. A gateway evaluates the proposed call independently, at a boundary the agent cannot override.

The attack surface that opens when tool traffic is ungoverned

Combining private data, untrusted content, and external communication in one agent creates risk. This combination is known as the “lethal trifecta”. An injected instruction in a document or tool response can redirect the agent from useful work to exfiltration. Authentication does not solve that problem because the redirected agent may still hold valid credentials.

The GitHub MCP case illustrates the runtime vector. An attacker placed hidden prompt injection instructions in a crafted issue in a public repository. When a Claude agent using the GitHub MCP server encountered the content, the instructions redirected it to access tokens from a separate private repository and exfiltrate them through a subsequent tool call.

The postmark-mcp incident illustrates a different entry point. The package had fifteen clean versions before a single line of exfiltration code was added. A proxy watching the resulting traffic would have seen a valid HTTP call arising from the supply-chain compromise. Because MCP servers hold credentials for several enterprise systems, one compromised server can affect several systems connected to it.

Exfiltration need not happen in one conspicuous request. It can be spread across individually harmless operations that stay below conventional data-loss thresholds. Detecting that pattern requires inspection across the session, where the relationship between calls becomes visible. Deciding access for each HTTP request on its own misses what the requests do together.

Why session-aware rate limiting and resilience controls require purpose-built logic

Accumulation also threatens resilience, even without an attacker. A proxy’s general rate limiter counts requests within a time window but does not understand an MCP session or the fan-out one instruction can trigger. An agent can stay within that request limit even as it gets caught in a runaway loop or spreads work across many downstream servers.

Session-scoped controls govern more than request frequency. They can bound tool calls before reauthorization, payload size, execution time, token or credit consumption, and fan-out. Sensitive write tools need lower thresholds or human approval before they run because what they do has different consequences from read operations. That distinction depends on tool semantics.

Retries need the same session-level understanding. Changing request identifiers must not let clients evade quotas, so enforcement needs to distinguish repeated attempts from genuinely new actions. Tool-level circuit breakers and retry controls also prevent cascading failures when a downstream MCP server degrades. A general HTTP connection breaker cannot distinguish a failing tool from failure of the server as a whole.

What the audit trail needs to capture that a proxy access log never will

A proxy access log records timestamps, source network addresses, HTTP methods, paths, status codes, and bytes transferred. Those fields support network forensics, but they do not reconstruct delegated agent work. An MCP audit record needs the human and agent principals, selected tool, arguments, returned data, policy decision, and outcome. Without that chain, investigators can tell that a request arrived but cannot tell whose authority allowed it.

The 2026-07-28 MCP specification deprecated protocol-level logging and reserved traceparent, tracestate, and baggage in request metadata for trace propagation. A trace can follow a call from the host application through the client SDK, MCP server, and downstream systems. OpenTelemetry defines agent creation, invocation, and planning spans, an execute_tool span, and dedicated mcp.client and mcp.server conventions. These conventions are still marked Development and have yet to become stable.

OpenTelemetry makes gen_ai.tool.call.arguments and gen_ai.tool.call.result optional and warns that they may contain sensitive data. A tool such as get-env can put API keys into an observability backend, so masking at the SDK level before export is the recommended mitigation.

The destination of those records also shapes their usefulness. Sending MCP audit records to the customer’s observability stack makes them available to existing monitoring, SIEM, and compliance tools. Regulatory evidence requires attributable actions and decisions. That requirement also raises a prior question about whether every relevant server is under governance at all.

Shadow MCP and why the inventory problem is as dangerous as the protocol gaps

A proxy can govern only traffic it sees. Unregistered MCP servers create paths into internal systems outside that boundary, regardless of how carefully the visible proxy is configured. This is the familiar inventory problem of shadow IT, now attached to tools that agents can invoke.

Golf Scanner was developed in 2026 to discover and audit MCP server configurations across a developer’s machine, including IDE configurations. Its local discovery scope differs from fleet-wide organizational scanning because finding one developer’s servers and maintaining an enterprise inventory are different jobs. Neither follows automatically from installing a gateway.

AWS published reference guidance that pairs an MCP gateway with a registry, and Cloudflare’s reference architecture also requires a registry. Routing alone does not register servers, enforce a catalog, or discover shadow servers. For production governance, every reachable MCP server needs to appear in a signed catalog with a named owner, risk classification, pinned version, and review date.

What purpose-built MCP gateway infrastructure actually covers, and how to evaluate options

Purpose-built infrastructure puts these controls together where they can be enforced. Its minimum production role includes governed tool discovery, authentication, fine-grained per-agent authorization, minimum necessary tool exposure, and an audit record for every invocation. Server federation, identity propagation, runtime inspection, and session controls extend that foundation.

Runtime content security needs its own check when teams compare gateways. Identity, role-based access control, and audit logs establish permission and evidence, but do not themselves inspect content for injection, leakage, or cross-turn abuse. NeuralTrust TrustGate’s Security Engine inspects tool-call content inline and reasons across a session. That makes runtime inspection its distinguishing capability in this comparison, rather than merely another way to decide who may invoke a tool.

Other options address different operational priorities. IBM ContextForge is open-source and federates gateway instances through mDNS/Zeroconf or manual configuration, merging tool lists into a unified registry. It suits distributed enterprises prepared to invest in self-hosting. Docker MCP Gateway provides container-native isolation for teams already using Docker workflows, though broader identity, audit, and policy controls may need additional components. Traefik Hub MCP Gateway builds on the existing Traefik gateway layer, so teams already running that infrastructure can use it.

Deployment ownership is another axis of choice. Open-source options let teams control and see how the system works but take work to run, while managed platforms are faster to deploy and include ongoing maintenance. Teams governing models, agents, and tools together also need a shared policy surface, audit trail, and access-management layer. A narrow MCP platform may suffice when the governance requirement is narrower.

The evaluation questions should therefore test integration as well as features. Does identity propagate end to end, including the delegated human, and does authorization inspect both tool names and arguments? Does the gateway use the existing identity provider and send evidence to the organization’s own observability stack? Can it discover shadow servers and bring them under registry control? Those answers distinguish infrastructure that governs agent actions from infrastructure that simply delivers them.