What it is
An MCP gateway is a proxy between MCP clients and MCP servers. Agents connect to one endpoint, and the gateway routes each request to the right backend server while applying shared controls: authentication, per-tool authorization, credential handling, guardrails, rate limits and audit logging.
It matters once MCP moves past a single server. Without a gateway every client keeps its own server list and credentials, every server re-implements security, and nobody has one record of what agents did. With one, the organization gets a governed catalog and a single place to enforce policy and gather evidence. A gateway is an architecture pattern, not part of the MCP specification, so capabilities vary by product.
How it works
Register servers
Approved MCP servers join a registry with an owner, version and risk rating.
Authenticate
Agents and users sign in through the identity provider, and the gateway validates their tokens.
Filter tools
The gateway lists only the tools this identity is allowed to see.
Enforce policy
On each call it checks scope, limits and approvals, and inspects arguments.
Broker and route
It obtains a downstream credential for the user and forwards the call to the backend.
Inspect and record
It checks the result, returns it, and writes an audit event with metrics and cost.
Why put a gateway in front of MCP servers
One MCP server with one client is easy to manage. An enterprise with many servers, many agents and many users is not. An MCP gateway is a proxy that sits between MCP clients and MCP servers and applies the same controls to all of them. It is an architecture pattern rather than part of the MCP specification, so features differ by product.
Server sprawl
Teams stand up MCP servers independently. Soon nobody knows which servers exist, who owns them, what they can do or who is using them.
Every client configured by hand
Without a gateway each developer and each agent holds its own list of server URLs and credentials, which drifts and leaks.
Security repeated per server
Authentication, authorization, rate limits, redaction and logging get re-implemented, unevenly, in every server.
Too many tools in context
Connecting an agent to dozens of servers floods its context with tool definitions, raising cost and making tool selection worse.
No central evidence
Auditors and incident responders need one record of which agent called which tool for which user. Scattered server logs do not give that.
Credentials sprawl
Downstream API keys and tokens end up in laptops and agent configs instead of one managed place.
Without and with a gateway
| Concern | Direct to each server | Through a gateway |
|---|---|---|
| Server discovery | Each client keeps its own list of URLs | One endpoint and a catalog of approved servers |
| Authentication | Implemented separately in every server | Sign-in once at the gateway against your identity provider |
| Authorization | Whatever each server decides | Central policy: which user or agent may call which tool |
| Downstream credentials | Stored in each client or server | Held in a vault and injected by the gateway |
| Tool exposure | Everything every server offers | Filtered, renamed and curated per team or agent |
| Audit | Scattered logs, different formats | One structured record per call |
| Rate limits and cost | Per server, if at all | Per user, per agent and per tool |
| Content safety | Optional, per server | Redaction and injection checks on the way in and out |
| Change and rollout | Reconfigure every client | Add, retire or version a server in one place |
What an MCP gateway does
Single entry point and routing
Agents connect to one MCP endpoint. The gateway fans requests out to the right backend servers, and can present several servers as one combined tool list.
Registry and catalog
A governed list of approved servers with owners, versions, descriptions, risk ratings and health status. New servers join through review.
Authentication and identity
Validates OAuth tokens from your identity provider, and maps each caller, human or agent, to an identity and group.
Authorization per tool
Role- or attribute-based rules decide which identities see and call which tools, including read-only versus write access.
Credential brokering
Obtains downstream tokens on the caller's behalf, using token exchange or a vault, so secrets never reach the client and tokens are never passed through unchanged.
Tool curation
Hides, renames or rewrites tool descriptions, and exposes only the subset an agent needs, which saves context and reduces risk.
Guardrails
Inspects requests and results for secrets, personal data and prompt injection, and can redact, block or ask for approval.
Rate limiting and quotas
Caps calls and spend per user, agent, team and tool so a looping agent cannot run away.
Observability and audit
Records caller, tool, arguments, result status, latency and cost for every call, and emits traces and metrics to your existing tools.
Resilience
Health checks, timeouts, retries, caching and failover across backend instances.
Protocol bridging
Lets a local stdio server be reached remotely, or fronts an existing REST API as MCP tools.
Policy as code, illustrative
Good gateways let you express rules per tool and per identity, and keep them in version control like any other configuration.
policy "finance-read-only":
allow group:finance to call billing.find_overdue_invoices
allow group:finance to call billing.get_invoice
deny * to call billing.* # everything else on billing
limit 100 calls/hour per user
approve billing.issue_refund by group:finance-managersDeployment patterns
Central enterprise gateway
One shared service in front of all internal MCP servers, run by a platform or security team. Strongest governance, and the one place to scale and protect.
Per-domain gateways
Separate gateways for business units or environments, such as finance and engineering, so ownership and blast radius stay local.
Developer-side gateway
A local or team-level proxy that aggregates the servers a developer uses and applies a few safety rules. Light, but not a substitute for central control.
Extending an API gateway
Adding MCP-aware plugins to a gateway you already operate. Reuses authentication and rate limiting, but may lack tool-level policy.
Federated gateways
Gateways that register each other's catalogs so agents in one domain can reach approved servers in another.
A request through the gateway
Connect and sign in
The agent opens an MCP session with the gateway and presents a token from the identity provider.
List tools
The gateway returns only the tools this identity may see, drawn from the registry and filtered by policy.
Call a tool
The model picks a tool. The client sends the call to the gateway.
Check policy
The gateway verifies identity, scope, rate limit and any approval rule, and inspects the arguments.
Broker credentials and route
It gets a downstream credential for this user and forwards the call to the right backend server.
Inspect and return
It checks the result for secrets and injected instructions, then returns it to the agent.
Record
It writes a structured audit event and updates metrics, cost and traces.
{
"time": "2026-12-03T14:02:11Z",
"caller": { "user": "a.lee@example.com", "agent": "invoice-followup", "groups": ["finance"] },
"server": "billing", "tool": "find_overdue_invoices",
"arguments": { "minDays": 14 },
"decision": "allow", "policy": "finance-read-only",
"status": "ok", "latency_ms": 212, "tokens_out": 640,
"findings": []
}MCP gateway vs. API gateway
An API gateway understands HTTP. An MCP gateway understands tools, sessions and who is asking. Many organizations use both: the MCP gateway governs agents' tool access, and the API gateway still protects the APIs behind the servers.
| Question | API gateway | MCP gateway |
|---|---|---|
| What it understands | HTTP routes, methods and headers | MCP sessions, tool names, schemas and tool arguments |
| Granularity of policy | Endpoint and verb | Individual tool, argument values and caller identity |
| Traffic model | Stateless request and response, high volume | Long-lived sessions with streaming and notifications |
| Client population | Applications written by developers | Models choosing calls at runtime, so content inspection matters |
| Typical extras | Quotas, transforms, caching | Tool catalog, tool curation, injection checks, per-tool approval |
| Relationship | Still protects the underlying APIs | Sits in front of MCP servers; those servers still call APIs |
The landscape
The market is young and changing quickly. Products fall into a few groups, and many combine features from several.
Open-source gateways and registries
Projects that combine a catalog with routing, OAuth integration and audit logging, often self-hosted on Kubernetes or containers. They offer control and no license cost, and you operate them.
Container and developer-platform gateways
Gateways that run servers as managed containers and expose them through one endpoint, such as Docker's MCP Gateway. Strong for local and team use, check per-user authorization needs.
API-management vendors
Existing API and AI gateway products adding MCP support, such as Kong's AI Gateway, with authentication, access control lists and audit logs on MCP tool use.
Cloud and edge platforms
Cloud providers and edge networks offering hosted MCP gateways or remote-server hosting integrated with their identity and logging.
Dedicated commercial MCP gateways
Vendors focused on MCP governance, offering tool-level access control, guardrails, audit trails and cost controls as a service.
Feature claims in this space often come from vendor material. Verify capabilities that matter to you, such as per-user authorization, streaming support and audit export, against current documentation and a proof of concept.
Risks and trade-offs
- A new single point of failure. Run it highly available with health checks, and decide fail-closed versus fail-open per route.
- A concentration of power. The gateway holds credentials and sees every call. Harden it, restrict who administers it and monitor administrator actions.
- Added latency. Each hop and inspection adds time. Measure it, cache tool lists and keep inspection proportionate.
- Streaming and session support. Not every gateway handles MCP's streaming transports and notifications well. Test with your real clients.
- Lock-in and spec drift. The protocol and authorization specification are evolving. Prefer gateways that follow the spec and keep policy portable.
- False comfort. A gateway cannot fix a badly designed tool. Least-privilege tools and sound server security still matter, and injection checks reduce rather than eliminate risk.
- Over-filtering. Hiding too many tools can break agent workflows. Curate with the teams that use them.
Design checklist
- Terminate OAuth at the gateway and validate token audience, scope and expiry.
- Never pass client tokens through to downstream APIs. Exchange or broker a separate credential.
- Define authorization at tool level, with separate read and write permissions.
- Keep a registry with an owner, version, risk rating and review status for every server.
- Curate the tool list per agent and per team.
- Redact secrets and personal data, and check results for injected instructions.
- Rate-limit and budget per user, agent and tool.
- Emit one structured audit event per call, and send traces and metrics to your existing stack.
- Make it highly available, test failure modes and load test with realistic sessions.
- Treat gateway configuration as code, with review, versioning and rollback.
Rolling one out
Inventory
Find every MCP server and client in use, who owns them and what they can reach.
Stand up read-only
Put a gateway in front of a few low-risk, read-only servers with sign-in and logging only.
Add policy
Introduce per-tool authorization, curated tool lists and rate limits.
Bring in write tools
Expose state-changing tools behind approvals and tighter scopes.
Make it the only path
Block direct access to servers at the network layer so the gateway cannot be bypassed.
Measure and tune
Review audit data, tool-selection quality, latency and cost, then adjust policies.
Sources
- Governing AI Assets at Scale with MCP Gateway and RegistryAWS Open Source Blog
- MCP Gateway & Registry (open-source project)agentic-community on GitHub
- Best Enterprise MCP Gateways to Secure MCP Traffic in 2026Maxim AI (vendor comparison)
- MCP specification: AuthorizationModel Context Protocol
Key concepts
- Registry
- The governed catalog of approved MCP servers, with ownership, versions and health.
- Tool-level authorization
- Policy that decides which identities may see and call each individual tool.
- Credential brokering
- Obtaining downstream tokens on the caller's behalf instead of passing client tokens through.
- Tool curation
- Exposing only the subset of tools an agent needs, saving context and reducing risk.
- Guardrails
- Redaction and checks for secrets, personal data and prompt injection in requests and results.
- Federation
- Gateways sharing their catalogs so approved servers can be reached across domains.
- MCP gateway vs. API gateway
- One understands tools, sessions and callers. The other understands HTTP routes. Many estates run both.
- Bypass
- Direct access to servers that skips the gateway. Block it at the network layer.
Tools & platforms
Gateway types
Identity and secrets
Operations
Skills employers look for
- Explaining what a gateway adds over direct server connections, and when it is worth it.
- Designing per-tool authorization, tool curation and approval rules.
- Integrating a gateway with an identity provider and a secrets vault.
- Brokering downstream credentials without token passthrough.
- Designing audit events, metrics and cost controls for agent traffic.
- Operating a gateway: high availability, failure modes, bypass prevention and policy as code.
Enterprise use cases
Enterprise agent platform
One endpoint and catalog for every internal MCP server, with sign-in through the corporate identity provider.
Regulated industries
A single audit trail of which agent called which tool for which user, with approvals on sensitive actions.
Developer tooling at scale
Hundreds of engineers and coding agents reach approved servers without configuring credentials locally.
Cost and safety control
Per-user and per-agent quotas, with guardrails on data leaving through tool calls.
Common pitfalls
- Treating the gateway as the whole security story — tools and servers still need least privilege and sound design.
- Leaving direct paths open — if agents can reach servers without the gateway, the policy is optional.
- Passing client tokens downstream — broker a separate, narrowly scoped credential instead.
- Exposing every tool to every agent — curate lists to save context and limit the damage of a hijacked session.
- Skipping failure-mode design — decide what happens, fail closed or open, when the gateway is unavailable.
How MrAI.dev helps
We assess how your agents reach tools today, choose a gateway approach that fits your identity and platform stack, design per-tool policy, credential brokering and audit, and roll it out in stages with the old direct paths closed.
Book a discovery call