Best MCP gateways 2026: open-source and self-hosted options
Short answer: there is no single best MCP gateway; the right one depends on the job. To run third-party MCP servers safely, look at Docker MCP Gateway (container isolation, signed images). For MCP, A2A and REST/gRPC behind one endpoint with enterprise maturity, IBM ContextForge. For a complete user-facing platform with its own chat client, Obot. For traffic visibility and rate limits across many agents, lunar.dev MCPX (now Boomi MCP Gateway). To turn REST APIs into MCP tools without writing a server, with authorization on by default and grants a person approves, ToolMesh. As a routing layer for MCP servers you already run on Kubernetes, Microsoft MCP Gateway or agentgateway.
Which MCP gateway for which job
Section titled “Which MCP gateway for which job”| If you need … | Look at | Why | License |
|---|---|---|---|
| REST APIs as MCP tools, without writing an MCP server | ToolMesh | One declarative DADL file per API; authorization on by default, credential injection, output gate, SQL audit trail, time-limited grants a person signs | Apache-2.0 |
| MCP, A2A and REST/gRPC behind one endpoint | IBM ContextForge | Broadest open-source gateway; RBAC, encrypted per-user credentials, 40-plugin guardrail framework; Python service | Apache-2.0 |
| A complete, user-facing platform with a chat client | Obot | Self-service catalog, RBAC, credential isolation; some enterprise SSO is a paid add-on | MIT (open-core) |
| Running untrusted third-party MCP servers safely | Docker MCP Gateway | Each server in its own container, Docker-signed images with SBOM, large curated catalog; needs a Docker runtime | MIT |
| Visibility and rate limits across many agents | lunar.dev MCPX | Metrics and traffic control; risk scoring is Enterprise; now part of Boomi | MIT (open-core) |
| Routing MCP servers you already run on Kubernetes | Microsoft MCP Gateway | Session-aware routing and lifecycle management; does not convert REST APIs | MIT |
| Container isolation with a policy language | Stacklok ToolHive | Each MCP server in its own container, Cedar policies, OIDC, audit | Apache-2.0 core + commercial |
| A data plane for MCP and A2A | agentgateway | Linux Foundation project; RBAC and tool federation | Apache-2.0 |
| MCP on an existing Envoy stack | Envoy AI Gateway | LLM-traffic gateway that added MCP aggregation, OAuth and tool filtering | Apache-2.0 |
| REST APIs as MCP tools, for APIs already in Kong | Kong AI Gateway | AI MCP Proxy plugin; Kong policies apply | Commercial |
| Zero-trust access in front of MCP servers | Pomerium | Identity-aware proxy with OAuth and tool-level access policy; does not create tools | Apache-2.0 + managed |
| A small self-hosted registry and gateway | MCPJungle | Aggregates several MCP servers behind one endpoint | MPL-2.0 |
| Config-driven REST or gRPC to MCP, small footprint | Unla | Lightweight Go gateway driven by config files | MIT |
The first five are compared feature by feature, with sources, in the MCP gateway comparison.
What is an MCP gateway?
Section titled “What is an MCP gateway?”An MCP gateway sits between AI agents and the tools they call. Agents (MCP clients such as Claude, ChatGPT or Cursor) connect to one endpoint instead of to every MCP server or API separately. The gateway decides which tools each caller sees and may call, holds the credentials for the backends, and records every call. Without a gateway, each agent connects to each server directly, each connection carries its own credentials, and no single place shows who called what.
What an MCP gateway typically does:
- One endpoint for many MCP servers or APIs (aggregation, also called federation).
- Client authentication, for example OAuth 2.1 as the MCP authorization spec describes it, or API keys.
- Authorization per user and per tool, ideally deny by default.
- Credential isolation: API keys stay on the gateway; the model never sees them.
- Output filtering: redact secrets or personal data before a result reaches the model.
- Audit: a record of every call, with caller, tool, parameters and result status.
- Context economy: load tool definitions on demand instead of sending hundreds of schemas to the model.
MCP gateway, MCP proxy, API gateway. An API gateway manages HTTP APIs for any kind of client. An MCP proxy forwards MCP traffic, often to bridge transports. An MCP gateway works at the level of MCP tools: it knows which tool a call targets and applies identity, policy, credentials and audit to it. Several API gateways (Kong, Envoy) have added MCP features, which is why the categories overlap.
How to choose an MCP gateway
Section titled “How to choose an MCP gateway”Six questions settle most choices:
- Where do your tools come from? If you already run MCP servers, any aggregating gateway works. If your systems only have REST APIs, you need a gateway that turns REST into MCP tools: ToolMesh (one declarative file per API), Kong (for APIs onboarded into Kong), Unla (config files), or IBM ContextForge (one endpoint at a time).
- Who may call what? Check whether per-user, per-tool authorization is on out of the box, or whether a fresh install allows everything until someone configures it.
- Where do credentials live? The model should never see an API key. Check whether this also holds for REST tools, not only for OAuth-connected servers.
- Do you run servers you did not write? Then container isolation and signed images matter most: Docker MCP Gateway, ToolHive.
- What must the audit show later? A log line per call, a queryable trail, or proof of who approved an agent’s rights.
- How do you want to run it? A single binary, Docker Compose, Kubernetes, or a managed service.
Open source, self-hosted or managed?
Section titled “Open source, self-hosted or managed?”A self-hosted gateway keeps tool definitions, credentials and audit data in your own environment. That is usually the reason to self-host one. Open source does not always mean the whole feature set is free: several gateways are open-core, with SSO, risk scoring or deeper governance in a paid tier. The table above names these cases. Managed MCP gateways from API and AI platform vendors (for example Composio and TrueFoundry) take the operations work off your hands, in exchange for running your tool traffic through someone else’s service.
Where ToolMesh fits
Section titled “Where ToolMesh fits”ToolMesh is a self-hosted MCP gateway in a single Go binary, Apache 2.0. It turns REST APIs into MCP tools from one declarative DADL file per API and puts existing MCP servers behind the same endpoint. Every call passes the same pipeline: authentication, authorization (on by default), credential injection, output gate, audit. Agents can ask for the rights a task needs; a person approves the kit for a limited time and signs the approval.
What it does not do: run MCP servers in per-server containers (use Docker MCP Gateway or ToolHive for that, ToolMesh can sit in front), or speak A2A and gRPC (IBM ContextForge does). To try it, open the live demo or follow Getting Started.
Frequently asked questions
Section titled “Frequently asked questions”What is the best MCP gateway in 2026?
It depends on the job. Docker MCP Gateway is strongest for running untrusted MCP servers safely; IBM ContextForge for MCP, A2A and REST/gRPC behind one endpoint; Obot for a complete user-facing platform; lunar.dev MCPX for traffic visibility across many agents; ToolMesh for turning REST APIs into governed MCP tools without writing a server; Microsoft MCP Gateway and agentgateway as routing layers on Kubernetes.
What is the best open-source MCP gateway?
Fully open source with governance in the core: ToolMesh (Apache-2.0, single Go binary, authorization on by default) and IBM ContextForge (Apache-2.0, Python, broad protocol support). Docker MCP Gateway (MIT) is open source and focuses on container isolation. Obot and lunar.dev MCPX are open-core: the core is MIT, some features such as enterprise SSO or risk scoring are paid.
Do I need an MCP gateway?
Not for one local MCP server used by one person. A gateway pays off once several people or agents share tools, once more than a few MCP servers or APIs are involved, or once API keys must stay away from the model and every call must be logged.
What is the difference between an MCP gateway and an API gateway?
An API gateway manages HTTP APIs for any client: routing, rate limits, keys. An MCP gateway works at the level of MCP tools: it knows which tool an agent calls and applies identity, per-tool authorization, credential injection, output filtering and audit to that call. Some API gateways, such as Kong and Envoy, have added MCP features.
Can I combine MCP gateways?
Yes. ToolMesh can sit in front of MCP servers that Docker MCP Gateway, Obot or IBM ContextForge runs and apply its own authorization, credential, output gate and audit layers on top.
Maintained by Dunkel Cloud GmbH, the team behind ToolMesh. Last updated: 21 November 2026. The MCP gateway category moves fast; check current feature sets before deciding. Corrections are welcome via GitHub.