What to Look for in an MCP Gateway When Security Is the Requirement
Enforce identity, tool permissions, credentials, and content inspection at the gateway layer.

Choosing an MCP gateway for security-critical work means choosing an enforcement layer. Choose a gateway that closes the protocol’s gaps across identity, tool permissions, credentials, content, supply chain trust, and audit records. Familiar API gateway features are not enough, and for regulated data, the deployment boundary can disqualify a product before those features deserve a look.
Why MCP's protocol design makes gateway security non-negotiable
MCP leaves it to each deployment to enforce core security. Authentication is optional, session-to-identity binding has no established pattern, and tool manifest signing is absent. These are architectural gaps. Hardening individual servers may improve each one, but it does not create a unified permission model across them.
That gap is more dangerous because MCP servers go beyond answering bounded data requests to query systems and take actions on a client’s behalf. A single protocol hop can concentrate access to source control, ticketing queues, data warehouses, and customer records. The security boundary therefore has to follow the caller across those connections.
The specification has moved toward stronger authorization. The March 2025 revision introduced an OAuth 2.1 baseline, and the June 2025 revision formally classified MCP servers as OAuth 2.1 resource servers. But specification intent does not establish consistent enforcement. A gateway is the practical place to apply the same controls across servers without depending on every implementation to get them right.
The five attack classes that define what a security-critical gateway must stop
Five attack classes define the minimum threat model. They are confused deputy, token passthrough, tool poisoning, supply chain compromise, and SSRF via tool connectors. Their common feature is that a connection can work exactly as configured while allowing an action the caller should never have been able to trigger.
Token passthrough exposes that distinction clearly. When a gateway forwards a bearer token upstream rather than brokering a scoped credential, the upstream service acts with the token’s privileges beyond the intended limits of the request. That creates a confused-deputy target, where a service performs work using broader authority than the user should have.
Tool poisoning attacks the agent’s interpretation instead. A tool’s visible name and summary can stay unchanged while its description acquires hidden instructions that redirect the agent. Supply chain compromise can change how a trusted tool behaves through a silent update. The postmark-mcp case illustrates the risk, with fifteen clean releases before one version introduced malicious behavior.
These are not merely hypothetical exposure paths. CVE-2026-33032, known as “MCPwn,” was a CVSS 9.8 authentication bypass in nginx-ui’s MCP server that was actively exploited before being patched in March 2026. The evaluation must cover both who can invoke a tool and whether the tool remains trustworthy.
Why transport encryption and API gateway features are the wrong starting point
TLS protects data in transit. It does not check the application’s caller identity, limit tool use, check for instructions embedded in responses, or keep a record of access for each user. An encrypted connection can still deliver a poisoned response.
Existing API gateways solve a different problem. Platforms such as Kong, Azure APIM, and Apigee give teams familiar infrastructure for static routes and HTTP semantics, while MCP requires dynamic tool discovery and JSON-RPC method-level policy. Some platforms are adding MCP-specific controls, so an existing gateway need not be dismissed outright. The practical test is whether it enforces per-tool authorization and scans responses, rather than merely authenticating and forwarding HTTP requests.
Caller identity enforcement: OAuth 2.1, token audience validation, and SSO integration
Identity comes first because every later control depends on it. A gateway needs to know who is calling to enforce tool permissions, choose the user’s upstream credential, or record who took an action. Enterprise SSO must establish that identity before the gateway takes actions on a user’s behalf.
Every remote MCP server should require OAuth 2.1 with PKCE, using a recognized authorization server and validating token audience and claims before honoring requests. Protected Resource Metadata, defined in RFC 9728, and Resource Indicators, defined in RFC 8707, support resource-specific authorization. The gateway must reject tokens unless they were issued specifically for the server that receives them. Otherwise, cross-server token replay remains possible.
The July 2026 draft revision adds client-side issuer validation on authorization responses under RFC 9207 to prevent mix-up attacks. Dynamic client registration also needs redirect URI validation and IP validation, and public clients need PKCE because they cannot keep secrets safe. These are required checks in an OAuth evaluation.
The candidate should produce different filtered tool lists for two different virtual keys or sessions, proving that caller identity changes what the client can access.
Per-tool least privilege: why server-level access controls are insufficient
A server can expose both query_records and delete_records, leaving an agent allowed to read data with the ability to delete it based on its interpretation of a prompt. An approval decision about the server does not distinguish between those consequences.
The gateway should deny access by default and enforce least-privilege scopes for each tool and resource. Explicit per-tool allowlists need validation against the tool’s declared JSON schema. Filtering should operate at three levels, which are caller identity, server, and individual tool. A static server allowlist supplies only part of that boundary.
Rate limits need the same precision. A blanket limit that is tolerable for reads may permit far too many writes or deletes. Production deployments should require human approval for high-impact actions above a configurable threshold, rather than letting a prompt alone authorize the consequence. That gate is especially important because content inspection cannot reliably catch every malicious instruction.
Credential brokering: keeping upstream secrets out of agent context
Tool permissions lose much of their value if the agent can reach the credentials underneath them. When the agent can read secrets in environment variables and configuration files, every system those secrets can unlock is at risk. If a tool response leaks those credentials into the model’s context, the exposure extends beyond the original tool call.
A broker keeps those secrets on the server. Credentials should be encrypted, keyed to the user’s gateway identity, and never returned to the MCP client. On each call, the gateway retrieves the right credential, refreshes it if needed, and proxies the request. The audit log preserves per-user attribution even when the upstream service sees a single service principal.
That is the distinction between mediation and forwarding. A proxy passes credentials through, while a gateway controls their use and attributes the resulting action. To test this separately from tool-list filtering, ask for per-user credential revocation that takes effect on the next tool call. A cached session must not become an escape route from revoked access.
Bidirectional content inspection: validating tool inputs and scanning tool outputs
Authorization answers whether a caller may use a tool. Content inspection addresses what flows through that authorized call, in both directions. Most gateways secure only one side of this exchange, leaving either the upstream service or the agent exposed.
On input, the gateway must parse each tool’s JSON schema on every call and validate parameter types, ranges, and formats before forwarding the request. Tool definitions need inspection too. A poisoned description can enter the agent’s context before execution, so metadata validation must happen on each retrieval.
Outputs can contain PII, customer records, or instructions meant to redirect the agent’s next action. Logging them without inspection preserves evidence while leaving exposure unaddressed. NeuralTrust TrustGate illustrates the inline inspection pattern with a security engine and session memory across the conversation. That context helps deal with attacks whose payload is spread across calls that look harmless on their own.
Inspection still has a hard limit. LLMs cannot reliably separate instructions from data, so gateway scanning reduces exposure without eliminating prompt injection. Defense in depth therefore combines input and output controls with human approval for high-risk actions and ephemeral execution environments that contain the damage when an injection succeeds.
Supply chain controls: the registry, version pinning, and continuous health verification
Registration is a starting condition. A reviewed server can change behavior through a silent update. Version pinning and continuous health verification therefore belong in the gateway’s enforcement path. The clean release history in the postmark-mcp case would not have protected a deployment relying on registration-time approval alone.
The registry should require proof of ownership and check TLS, authentication method, and schema version. Access must still depend on those checks, even after approval. Tool descriptions also need inspection when retrieved, because a registered identity does not make changed metadata safe.
In production, only the gateway should be able to reach approved MCP servers, since direct agent-to-server connections bypass its controls. A centralized registry with automated validation also gives the organization an account of the servers entering its environment. Making registration routine and fast reduces the incentive for developers to create unapproved connections outside that boundary.
Tamper-evident audit logging: what a real-time record requires versus a postmortem log
A postmortem log explains an incident, while a real-time, tamper-evident record supports a live safety net. The record’s ability to support a live safety net depends on what it can prove. Missing attribution is a governance failure.
Five properties define the required evidence. Attribution shows which user made each tool call, including calls through shared servers. Least privilege records the enforced tools each consumer could reach, while credential lifecycle evidence covers central issuance, rotation, and revocation. An immutable record requires signed entries, defined retention, and off-box archival. Data residency keeps prompts, arguments, and results inside a controlled boundary.
Tamper evidence cannot be an afterthought. Signed, append-only entries with off-box archival are the minimum standard for regulated environments, because an editable log cannot establish a dependable compliance record. Yet capturing the full payload can itself break privacy or residency policy. Structured logging, selective capture, field-level redaction, and tiered access balance those needs, while SIEM export through a native integration or OpenTelemetry connects the record to existing security operations.
Deployment model as a disqualifying criterion for regulated environments
When regulated data must stay inside a controlled environment, where the gateway runs comes before how its features compare. Under that condition, a cloud-only gateway is disqualified regardless of its authorization or inspection features. Self-hosting is required because the gateway handles the prompts, tool arguments, and results that the organization must keep in a location it controls.
The available models differ substantially. They include local container gateways, self-hosted open source, in-VPC or on-premises deployments, air-gapped systems, managed SaaS, and MCP support added to existing API gateways. Bifrost supports self-hosted, in-VPC, on-premises, Kubernetes, and air-gapped deployments, while Amazon Bedrock AgentCore Gateway is fully managed on AWS. Microsoft MCP Gateway runs on Kubernetes with Entra ID bearer tokens and app roles per server and per tool.
Where the gateway runs does not, however, ensure tenant isolation. The MCP specification does not define tenant boundaries, so organizations that serve more than one organization must check that they are kept separate at the data plane. Separate policy settings alone do not establish that one tenant’s data is isolated from another’s.
A practical evaluation sequence that puts disqualifiers first
First identify any regulated data that will flow through the gateway and establish its requirements for remaining within a controlled boundary. If it must, remove cloud-only options from consideration. Then establish that the candidate has all six controls, including identity enforcement, per-tool least privilege, credential brokering, bidirectional inspection, a registry with version pinning, and tamper-evident logging.
The next step fits into one vendor conversation. Ask for a filtered tool list for two different virtual keys or sessions, followed by per-user credential revocation effective on the next tool call. Then ask the vendor to export a signed audit record and show a guardrail blocking a secret in a tool result. A candidate that cannot complete all four demonstrations has not established itself as a security control plane.
Only then examine the harder implementation details. These include session-aware inspection, approval gate configuration, continuous registry health verification, and SIEM export format and completeness.
A fast, governed registration path reduces shadow MCP adoption more effectively than leaving developers blocked from the tools they need. Organizations that treat MCP security as infrastructure rather than overhead can ship faster with less undiscovered risk.


