- Updated
- Reading
- 11 min
- By
- Anlyon Team
What an MCP gateway is, how it differs from a proxy, and how to choose one
An MCP gateway puts one endpoint in front of many MCP servers and holds their credentials. What it solves, gateway vs proxy vs aggregator, and what to check.
- mcp
- mcp servers
- mcp gateway
- credentials
- approvals
- receipts
- comparison
Short answer: an MCP gateway is a service that sits between your MCP clients and your MCP servers. Clients connect to one endpoint, and the gateway holds the credentials, decides which tools each client may call, and records every call.
The MCP specification defines two roles, client and server. "Gateway" is a product category built on top of them, so two products with that name can do different jobs. This guide covers what a gateway solves, how it differs from a proxy and an aggregator, what to check before choosing one, and where Anlyon fits.
TL;DR
- A gateway gives you one endpoint, credentials out of the client, a tool allow-list, approval on risky calls and an audit record.
- A proxy forwards traffic. An aggregator merges tool lists. A gateway does both and adds policy.
- Gateways differ most in three places: where the servers run, whose credentials a call uses, and what happens to a tool that changes after you reviewed it.
- Open source gateways exist: Docker MCP Gateway, agentgateway, ContextForge and Microsoft's MCP Gateway.
- Anlyon is a hosted API that puts remote MCP servers behind one endpoint. A person adopts each tool, and each call goes through approvals and leaves a receipt.
What problems does an MCP gateway solve?
Connect an agent straight to five MCP servers and you get five configs, five credentials on the machine, and every tool on every server. A gateway moves those decisions to one place.
| Problem without a gateway | What a gateway does |
|---|---|
| One config per server, per client. Every laptop and agent has its own list of servers | Clients connect to one endpoint. Servers are added and removed behind it |
Credentials in the client. Tokens sit in mcp.json, .env files and process environments | The gateway holds each server's credential and adds it when it forwards a call |
Every tool is callable. The agent needed list_issues. The same server also has delete_issue | An allow-list decides which tools a client is offered |
| No pause on a risky call. The only prompt is in the client, in the session that is making the call | The gateway can hold a call until someone outside the session approves it |
| No record. What ran is whatever each client logged | Each call is recorded in one place, across every server |
The first two are convenience and hygiene. The last three are where a gateway changes what an agent can do when it is wrong or has been steered by text it read.
What is the difference between an MCP gateway, a proxy and an aggregator?
The three words are used loosely. This is the working distinction:
| MCP proxy | MCP aggregator | MCP gateway | |
|---|---|---|---|
| What it does | Forwards MCP traffic to one server | Merges several servers' tools into one list | Fronts many servers behind one endpoint, with policy |
| Typical reason | Change the transport, such as stdio to HTTP | Fewer entries in a client's config | Central credentials, access rules, approval and audit |
| Holds credentials | Sometimes | Sometimes | Yes |
| Decides which tools are offered | No | Rarely | Yes |
| Records calls | No | Rarely | Yes |
A gateway contains a proxy, and usually an aggregator. The reverse is not true. If a product only forwards and merges, it will not stop a call you would have wanted to review.
One detail matters when anything merges tool lists. The MCP specification notes that tool names are unique only within one server, and that clients or proxies that aggregate tools "SHOULD implement a disambiguation strategy such as prefixing tool names with a server identifier" (tools, revision 2026-07-28). Check how a gateway names tools, because two servers with a search tool is common.
The specification also has a rule for anything that sits in the middle of an OAuth flow: an MCP server must not pass the token it received from a client through to an upstream API. The upstream call uses a separate token (security considerations). A gateway that holds upstream credentials itself is following that rule. One that forwards the client's token is not. For the flow itself, see how MCP OAuth works.
What is the difference between an agent gateway and an MCP gateway?
An MCP gateway carries MCP traffic: tool lists and tool calls. An agent gateway is the wider term for one gateway that carries everything an agent sends, such as requests to model providers and agent-to-agent messages, with MCP as one protocol among them.
If your only question is "which tools may this agent call, with whose credentials", an MCP gateway is enough. If you also want one place for model routing, model spend and agent-to-agent traffic, look at an agent gateway.
Are there open source MCP gateways?
Yes. These four publish their source. Each row is from the project's own page, read on 2026-11-13.
| Project | Licence | What its own page says it is |
|---|---|---|
| Docker MCP Gateway | Open source (repository) | Docker's solution for orchestrating MCP servers. It runs servers in isolated containers with restricted privileges, network access and resource usage, and injects the credentials a server needs |
| agentgateway | Apache 2.0 | A Linux Foundation project: a proxy for AI agents and MCP servers. It lists MCP and A2A support, routing to model providers, access control with a CEL policy engine, OAuth, JWT and API-key auth, and OpenTelemetry |
| ContextForge | Apache 2.0 | An IBM project: a gateway, registry and proxy in front of MCP, A2A and REST or gRPC APIs. It lists federation across MCP and REST services, built-in authentication, rate limiting, an admin UI and OpenTelemetry tracing |
| Microsoft MCP Gateway | MIT | A reverse proxy and management layer for MCP servers in Kubernetes, with Entra ID authentication and application role authorization |
They solve different problems. Docker's is about running local servers safely on a developer machine. Microsoft's is about hosting servers on a cluster. agentgateway and ContextForge put several kinds of agent traffic behind one gateway. None of that is a ranking: read the page for the one that matches where your servers run.
Open source or managed is mostly a question of who operates it. Running a gateway yourself means you patch it, store its secrets and keep it available, and in return nothing leaves your network. A managed gateway takes that work and asks you to trust its operator with your credentials. Ask a managed vendor how credentials are stored and who can read them back.
What should you look for when choosing an MCP gateway?
There is no single best MCP gateway. Use these questions, and weight them by what your agent does. An agent that only reads needs less than one that sends email, merges code or moves money.
- Where do the servers run? Local stdio servers need a runtime, ideally an isolated one. Remote servers need only an https address. Many gateways handle one kind well.
- Whose credentials does a call use? One shared token for the team, one per developer, or one per end user of your product. If your agent acts for your customers, each call has to use that customer's own account. See per-user tokens.
- Can the model read a credential? The credential should be added on the gateway's side at the moment of the call, and no tool should return it.
- Who decides which tools are callable? Look for an allow-list per tool, not per server, and check whether an agent's own credential can extend it.
- What happens when a server changes a tool? A tool you reviewed last month can have a new description or a new argument today. Ask whether the gateway notices, and what it does with the next call.
- Where is a risky call approved? A prompt in the client is decided in the session that is making the call, and a permission mode can turn it off. An approval at the gateway holds whatever the client does. Ask what the approval is tied to: a tool name, or the exact request.
- What is recorded for each call? A log line, or a record that says who asked, who approved and what the server answered.
- Does it fail closed? If the gateway cannot check a rule, the call should not go out.
- Can an agent bypass it? A gateway governs only the calls routed through it. If the server is still in the agent's own config, or the token is still in its environment, the direct route is open.
Question 9 applies to every gateway, including the one below.
Where does Anlyon fit?
Anlyon is a hosted MCP gateway for remote servers. It governs which tools an agent may call, with whose credentials, what waits for approval and what is recorded.
One endpoint. A client connects to https://api.anlyon.com/mcp:
claude mcp add --transport http anlyon https://api.anlyon.com/mcp
Cursor and Codex take the same URL in their own config.
A person adopts each tool. You register a remote server by its URL. Anlyon lists the tools and adopts none. Registering a server lets an agent call nothing.
anlyon mcp add https://mcp.example.com/mcp --oauth --name tracker
anlyon mcp tools tracker
anlyon mcp adopt tracker list_issues delete_issue
Adopting a tool adds what an agent can do, so it stays a person's step. A credential can ask. The request prints a sign-off link, and no API key, CLI login or MCP session can approve it, including the one that asked. A tool you skip can't be called through Anlyon.
An adopted tool is pinned. Before every call Anlyon lists the server's tools and compares the tool with the definition you adopted. A tool that changes is refused until re-adopted.
Calls go through approvals. An adopted MCP tool is governed at the call: approval bound to the exact request and the reviewed tool definition, and a receipt graded acknowledged. Anlyon suggests a class for each tool from what the server says about it, and by default a tool suggested as irreversible or destructive waits for approval on every call. The credential that requested an approval can never be the one that decides it.
The credential stays with Anlyon. A token is stored as a secret with the server's host as its allowed host. A server that signs people in with OAuth is connected through a sign-in, and each of your users can sign in with their own account. Your agent never holds the key.
The full walkthrough is in how to put a remote MCP server behind Anlyon.
What Anlyon does not do
- Local servers. Only remote servers over MCP's Streamable HTTP transport, or the older SSE transport, at an https address. A stdio server cannot go behind Anlyon, and Anlyon runs no containers for you. If your problem is running local servers safely, a container-based gateway is the right tool.
- Calls that skip it. A tool your agent calls directly is not routed through Anlyon and is not governed by it. Remove the direct route.
- Read-back for MCP tools. Receipts for adopted tools grade
acknowledged: the server accepted the request, and nothing read it back. - A verdict on the tool. The suggested class comes from what the server says, which is untrusted. Read each tool before you adopt anything that writes.
- The moment between check and call. They are two requests, so a change made between them is not caught on that call.
- Model traffic. Anlyon does not route requests to model providers. For that, use an agent gateway or an LLM gateway.
If you want an open source gateway that you operate, use one of the four above. If your agent writes to systems where a wrong call is your problem, and you want a person to adopt each tool, approval on the exact request and a receipt per call without building it, that is what Anlyon is for.
Read next
- How to put a remote MCP server behind Anlyon: the five steps, with the commands
- MCP OAuth and MCP server authentication: how a client or a gateway signs in to a remote server
- Running Claude Code without permission prompts: why an approval at the server holds when the client's prompts are off
- Official MCP servers: vendors' own remote servers, with each endpoint
- Security: what Anlyon holds and what it never does
- Docs: Govern a remote MCP server · MCP servers
Frequently asked questions
- What is an MCP gateway?
- An MCP gateway is a service that sits between MCP clients and MCP servers. Clients connect to one endpoint, and the gateway holds the servers' credentials, decides which tools each client may call, and records the calls. The MCP specification defines clients and servers only, so gateway is a product category and products differ in what they enforce.
- What is the difference between an MCP proxy server and an MCP gateway?
- A proxy forwards MCP traffic to another server, often to change the transport, such as exposing a local stdio server over HTTP. A gateway does that for many servers behind one endpoint and adds policy: which tools are offered, whose credentials are used, what needs approval and what is logged. Every gateway contains a proxy, and a proxy alone is not a gateway.
- Is there an open source MCP gateway?
- Yes, several. As of 2026-11-13, Docker MCP Gateway, agentgateway (a Linux Foundation project, Apache 2.0), IBM's ContextForge (Apache 2.0) and Microsoft's MCP Gateway (MIT) all publish their source. They differ in where they run and what they enforce, so read each project's own page before choosing.
- What is the best MCP gateway?
- It depends on which problem you have. If you need to run local servers safely, look for container isolation. If you need one endpoint for a platform team, look for routing, identity and telemetry. If your agent writes to systems where a wrong call costs you, look for tool-by-tool adoption, approval bound to the exact request and a record of each call.
- What is the difference between an agent gateway and an MCP gateway?
- An MCP gateway handles MCP traffic: tool lists and tool calls between clients and servers. An agent gateway is the wider term for a gateway that also carries other agent traffic, such as model requests and agent-to-agent protocols. agentgateway, for example, describes support for MCP, A2A and routing to model providers.
