What is an MCP gateway? How it differs from an AI gateway
Also called MCP gateways
Definition
An MCP gateway is a proxy that sits between MCP hosts and many MCP servers, exposing them through one endpoint and centralizing authentication, tool access policy, and audit logging.
An MCP gateway is a proxy that sits between MCP hosts, such as coding agents and chat apps, and an organization's MCP servers, and exposes those servers through one managed endpoint. The Model Context Protocol specification does not define gateways; they are an operational pattern. To a host, a gateway looks like one server, but it implements few or no tools of its own. It authenticates callers, decides which tools each user or agent may see, forwards each call to the server that owns the tool, and logs every invocation.
How an MCP gateway works#
An MCP gateway works as a policy point on the tool path. The host connects once, the gateway collects the tool lists of its registered servers, filters them for the caller, and routes each tools/call to the right backend with that server's credential attached. Every call passes through one place, so audit logs and rate limits apply to all servers.
The specification anticipates such intermediaries. Its tools page says proxies that aggregate several servers should resolve tool-name collisions, for example by prefixing names with a server identifier, and allows tools/list to vary with the authorization on the request, which is how per-user filtering works. The Streamable HTTP transport mirrors the method and tool name into Mcp-Method and Mcp-Name headers so a gateway can route without parsing JSON. List results carry a cacheScope: a shared gateway may cache and reuse a "public" response for any user, but must not share a "private" one across authorization contexts.
Some AI gateways double as MCP gateways. Bifrost, an open source AI gateway, exposes the servers it connects to through one /mcp endpoint that hosts such as Claude Desktop and Cursor can use, filters the tool list per virtual key, and does not execute tool calls on its own unless an operator turns on its agent mode. Model calls and tool calls then share one set of keys, policies, and logs.
Other open source examples include Docker MCP Gateway, which runs each server in an isolated container and injects its credentials; IBM's ContextForge, which federates MCP servers, A2A agents, and REST or gRPC APIs behind one endpoint; Microsoft MCP Gateway, a reverse proxy and management layer for MCP servers on Kubernetes; and agentgateway, a Linux Foundation project that proxies LLM, MCP, and A2A traffic. The MCP platforms directory lists more.
MCP gateway vs AI gateway#
An AI gateway governs traffic from applications to models; an MCP gateway governs traffic from agents to tools. Both centralize authentication, policy, and logs. An AI gateway meters tokens, routes between model providers, and caches completions, while an MCP gateway controls which tools each caller can discover and call and holds the credentials for each backend server.
| AI gateway | MCP gateway | |
|---|---|---|
| Sits between | Applications and model providers | MCP hosts and MCP servers |
| Request format | Usually an OpenAI-compatible model API | MCP JSON-RPC messages |
| Main policy | Model access, token budgets, rate limits | Tool allowlists and per-user tool filtering |
| Credentials held | Provider API keys | One credential per backend server |
| Typical log entry | Model, tokens, latency, cost | Tool, caller, arguments, result status |
The two categories overlap. Some products proxy both kinds of traffic, and several gateways in the AI gateways directory include MCP features. A gateway is also a natural place to pin approved tool definitions and block a tool whose description changes, a defense against tool poisoning. Like any shared proxy, it concentrates credentials and becomes a dependency for every agent, so it needs replicas and its own secret management.
What is Model Context Protocol explains where gateways fit in the protocol, and what is an AI gateway covers the model-side pattern.
Related terms
Guides that cover mcp gateway
Cite this definition
The AI Engineering Editors. "What is an MCP gateway? How it differs from an AI gateway." The AI Engineering, updated Nov 11, 2026. https://theaiengineering.com/glossary/mcp-gateway
- Title
- What is an MCP gateway? How it differs from an AI gateway
- Author
- The AI Engineering Editors
- Publisher
- The AI Engineering
- Updated