Best Open Source MCP Gateways for Claude Code in 2026
An open source MCP gateway gives Claude Code one governed endpoint for every MCP server. This guide compares seven options, including Bifrost, Docker MCP Gateway, agentgateway, and IBM ContextForge, on Claude Code setup, authentication, tool filtering, and deployment.
TL;DR
- An open source MCP gateway gives Claude Code one endpoint for every MCP server, with credentials, tool access, and logging managed centrally instead of in each developer's config.
- Bifrost is an open source MCP gateway and LLM gateway in one deployment, so Claude Code's model calls and tool calls share one virtual key, one budget, and one log.
- Docker MCP Gateway, agentgateway, IBM ContextForge, Obot, Microsoft MCP Gateway, and MetaMCP are also open source, each built around a different deployment model.
- Claude Code connects to most gateways with
claude mcp add --transport http, while Docker MCP Gateway runs as a local stdio process. - Bifrost Code Mode cut input tokens by 92.8% at 508 tools across 16 MCP servers, which matters when Claude Code sessions load large tool catalogs.
Claude Code supports the Model Context Protocol natively, but every MCP server added to it brings its own config entry, credentials, and tool definitions, and none of it is shared across a team. An open source MCP gateway fixes that by putting one self-hosted endpoint between Claude Code and every tool server. Bifrost, the open-source MCP gateway on GitHub, is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This guide compares seven open source MCP gateways for Claude Code on setup, authentication, tool control, and deployment.
Why Claude Code Teams Need an MCP Gateway
Claude Code teams need an MCP gateway once more than a few developers share MCP servers. A gateway replaces per-laptop server configs and credentials with one endpoint, filters which tools each developer or CI job can call, and logs every tool call centrally, which direct Claude Code MCP connections cannot do.
Claude Code adds MCP servers through claude mcp add or an .mcp.json file, as described in the Claude Code MCP documentation. That model works for one developer. For a team, it means every laptop holds its own GitHub token and database credentials, nobody can see which agent called which tool, and once Claude Code is routed through a custom base URL, its built-in tool search turns off and every tool definition loads upfront. The general case for the pattern is covered in our guide to what an MCP gateway is.

Open source matters here for a practical reason: an MCP gateway sees every tool argument and result, including source code and internal data. Self-hosting the gateway keeps that traffic inside the team's own network and lets security teams read the code path that handles credentials. Our wider list of open source MCP gateways for any MCP client covers the category beyond Claude Code.
How to Evaluate an Open Source MCP Gateway for Claude Code
An open source MCP gateway for Claude Code should be judged on five things: how Claude Code connects to it, how it authenticates developers, how finely it filters tools, how it logs calls, and where it runs. The table below turns those into questions to ask of each option.
| Criterion | What to check for Claude Code |
|---|---|
| Claude Code connection | Streamable HTTP or SSE endpoint for claude mcp add --transport http, or a stdio command |
| Authentication | Per-developer keys or OAuth, plus how the gateway authenticates to upstream servers |
| Tool control | Allow-lists per developer, team, or CI job, not only per server |
| Logging | Each tool call recorded with arguments, result, and caller |
| Deployment | Local process, Docker, Kubernetes, or in-VPC |

The comparison below applies those criteria to the seven gateways in this guide. Cells marked "Not published" mean the project's own documentation does not state the capability. For reference, per-tool filtering in Bifrost is described in the MCP tool filtering docs.
| Gateway | License | Claude Code connection | Authentication | Deployment | Routes LLM traffic |
|---|---|---|---|---|---|
| Bifrost | Apache 2.0 | HTTP /mcp endpoint |
Virtual keys, OAuth 2.1 | npx, Docker, Kubernetes, in-VPC | Yes, 25+ providers |
| Docker MCP Gateway | Open source | stdio (docker mcp gateway run) |
Docker Desktop secrets, OAuth flows | Docker CLI plugin | No |
| agentgateway | Apache 2.0 | stdio, SSE, Streamable HTTP | JWT, API keys, OAuth, CEL RBAC | Standalone, Kubernetes | Yes |
| IBM ContextForge | Apache 2.0 | Streamable HTTP, SSE, stdio wrapper | JWT, Basic, user-scoped OAuth | PyPI, Docker, Kubernetes | Agent routing |
| Obot | MIT | Remote MCP endpoints | IdP groups, MCP OAuth | Docker, Kubernetes | Yes |
| Microsoft MCP Gateway | MIT | Streamable HTTP /mcp |
Entra ID with roles | Kubernetes, AKS | Not published |
| MetaMCP | MIT | SSE, Streamable HTTP | API keys, OAuth, OIDC | Docker | Not published |
1. Bifrost
Best for: Bifrost is built for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. It serves as a centralized AI gateway to route, govern, and secure all AI traffic across models and environments with ultra low latency. Bifrost unifies LLM gateway, MCP gateway, and Agents gateway capabilities into a single platform. Designed for regulated industries and strict enterprise requirements, it supports air-gapped deployments, VPC isolation, and on-prem infrastructure. It provides full control over data, access, and execution, along with robust security, policy enforcement, and governance capabilities.
The Bifrost AI gateway is an open source AI gateway written in Go that acts as both an MCP client and MCP server. It connects to upstream MCP servers over STDIO, HTTP, or SSE and exposes all of their tools to Claude Code through a single /mcp endpoint. Bifrost also routes Claude Code's model traffic across 25+ providers and 10,000+ models from the same deployment, with 11 microseconds of overhead per request at 5,000 RPS in published benchmarks.
Adding Bifrost to Claude Code is one command, documented in the Bifrost Claude Code integration:
claude mcp add --transport http bifrost http://localhost:8080/mcp \
--header "Authorization: Bearer your-virtual-key" \
--scope user
Features that matter for Claude Code teams:
- Per-developer tool control: virtual keys carry per-tool allow-lists, so one key can call
filesystem-read_filewithoutfilesystem-write_file. - Curated tool bundles: Virtual MCPs group tools from several servers behind their own endpoint and attach them to virtual keys.
- Authentication in both directions: Claude Code connects with a virtual key header or browser-based OAuth 2.1, and Bifrost supports six upstream MCP auth types, including per-user OAuth.
- Token reduction: Code Mode replaces direct tool exposure with four meta-tools, cutting input tokens by 92.8% at 508 tools.
- One key for models and tools: with
ANTHROPIC_BASE_URLpointed at Bifrost, the same virtual key governs Claude Code's model spend and its tool access. - Zero-config launch: the Bifrost CLI starts Claude Code against the gateway and auto-attaches the Bifrost MCP server.

The full setup, including .mcp.json config and troubleshooting, is in our guide on how to connect Claude Code to an MCP gateway. The access-control and cost model is covered in the Bifrost MCP gateway deep dive.
2. Docker MCP Gateway
Docker MCP Gateway is Docker's open source MCP gateway that runs each MCP server in its own container and exposes them to clients through one gateway process. It fits Claude Code developers who already use Docker Desktop and want container isolation for local MCP servers.
Each server runs in an isolated container with restricted privileges, network access, and resource usage, and servers from the Docker MCP Catalog are built and signed by Docker with provenance and SBOM metadata. The gateway injects credentials managed through Docker Desktop and supports OAuth flows for upstream services. Clients connect over stdio by running docker mcp gateway run, which Claude Code can register as a local stdio MCP server. Dynamic MCP lets agents find and add servers at runtime without loading every tool definition into context.
Best for: individual developers and small teams running Claude Code locally with container-isolated MCP servers. Docker MCP Gateway is also compared in our list of MCP gateways for developers.
3. agentgateway
agentgateway is an open source gateway for agent traffic, written in Rust, licensed under Apache 2.0, and hosted as a Linux Foundation project. It governs agent-to-tool traffic over MCP, agent-to-agent traffic over A2A, and agent-to-LLM traffic through an OpenAI-compatible API.
For Claude Code, agentgateway federates multiple MCP servers and supports stdio, HTTP, SSE, and Streamable HTTP transports. Authorization uses fine-grained RBAC with a CEL policy engine, alongside JWT, API key, and OAuth authentication. It can also convert OpenAPI services into MCP tools, and it emits OpenTelemetry metrics, logs, and traces. Deployment runs standalone or on Kubernetes through a built-in controller and the Gateway API.
Best for: platform teams standardizing on Kubernetes Gateway API who need MCP and A2A governance in the same proxy. Other self-hosted options appear in our roundup of open source MCP gateways for self-hosted AI infrastructure.
4. IBM ContextForge
IBM ContextForge is an open source MCP gateway, proxy, and registry licensed under Apache 2.0, designed to federate MCP servers, A2A agents, and REST or gRPC APIs behind one endpoint. It is maintained by IBM contributors and is not an official IBM commercial product.
Claude Code can connect to ContextForge virtual servers through Streamable HTTP endpoints at /servers/{id}/mcp, over SSE, or through a stdio wrapper. Virtual server composition bundles tools from several registered servers into one logical endpoint. Authentication supports JWT bearer tokens, Basic Auth, user-scoped OAuth tokens, and custom headers, with stored credentials encrypted. Multi-gateway federation uses mDNS auto-discovery and Redis-backed state, and installation runs through PyPI, Docker, or Kubernetes with an admin UI.
Best for: teams federating many MCP servers and legacy REST APIs across environments, with in-house capacity to operate a community-supported project. The difference between a registry, a proxy, and a gateway is covered in MCP gateway vs MCP proxy vs MCP server.
5. Obot MCP Gateway
Obot is an MIT-licensed open source platform whose MCP gateway proxies MCP servers, whether hosted by Obot or running elsewhere, and controls access by user or identity-provider group. It pairs the gateway with MCP and Skills registries for discovering and installing approved servers.
For Claude Code teams, Obot manages MCP OAuth plus user and shared credentials, and can inspect, reject, or modify MCP requests and responses with filters. Audit logs record MCP requests and responses, filterable by user, server, tool, client, or session. Obot runs on Docker for development and Kubernetes for production.
Best for: organizations that want a self-service MCP catalog where developers pick approved servers for Claude Code. Security-focused options are compared in our list of MCP gateways for security and compliance.
6. Microsoft MCP Gateway
Microsoft MCP Gateway is an MIT-licensed reverse proxy and management layer for MCP servers in Kubernetes, with session-aware routing that keeps all requests in a session on the same MCP server instance. It separates a data plane for routing from a control plane for managing adapters and tools.
Claude Code connects over Streamable HTTP to the tool gateway at /mcp or to individual adapters at /adapters/{name}/mcp. In Azure deployments, the gateway authenticates with Microsoft Entra ID and applies role-based access such as mcp.admin. Local deployment uses Docker Desktop with Kubernetes enabled, and cloud deployment targets Azure Kubernetes Service.
Best for: Azure-centric teams running stateful MCP servers on Kubernetes. Enterprise-focused options are ranked in our guide to the best MCP gateways for enterprises.
7. MetaMCP
MetaMCP is an MIT-licensed MCP proxy that aggregates MCP servers into namespaces, exposes each namespace as a unified endpoint, and applies middleware to requests and responses. It focuses on aggregation and tool curation rather than enterprise governance.
MetaMCP endpoints are remote, served over SSE, Streamable HTTP, or OpenAPI, and Claude Code connects to the Streamable HTTP endpoint with claude mcp add --transport http. Authentication supports API keys, OAuth per the MCP specification, and OpenID Connect for SSO. Teams can override tool names and descriptions per namespace, and deployment runs on Docker or Docker Compose.
Best for: small teams that want to group MCP servers into shared endpoints with minimal infrastructure. Teams that outgrow aggregation can add per-tool governance with Bifrost Virtual MCPs, part of the open-source release.
How to Choose the Right Open Source MCP Gateway
The right open source MCP gateway for Claude Code depends on what else the gateway must do. Teams that also need to govern Claude Code's model traffic should pick a gateway that handles both; teams that only need tool aggregation can choose by deployment model.

As Figure 4 shows, the first question is whether Claude Code's model calls should pass through the same control point. If they should, the Bifrost MCP gateway covers both with one virtual key; agentgateway (built around the Kubernetes Gateway API) and Obot (which pairs its MCP gateway with an LLM gateway) also route model traffic. For more on running Claude Code through a gateway in practice, see our practical guide to using an MCP gateway with Claude Code, and for gateways that route Claude Code's model traffic, our roundup of open source Claude Code gateways.
Frequently Asked Questions
What is an MCP gateway?
An MCP gateway is a control layer between AI clients such as Claude Code and the MCP servers they call. It gives clients one endpoint for tool discovery, centralizes credentials, enforces which tools each user can call, and logs every call. An open source MCP gateway does this with code the team can self-host and audit. The MCP gateway resource page covers the architecture in more depth.
How do I add an MCP gateway to Claude Code?
For a gateway with an HTTP endpoint, run claude mcp add --transport http <name> <url> with an authorization header, or add the same entry to .mcp.json. For a stdio gateway such as Docker MCP Gateway, register the gateway's run command as a stdio server. Then run /mcp inside Claude Code to confirm the tools load.
Which open source MCP gateway is best for Claude Code?
Bifrost is the best open source MCP gateway for Claude Code teams that also want to govern model traffic, because it combines per-tool virtual key scoping, Code Mode, and 11 microseconds of overhead at 5,000 RPS in one deployment. Docker MCP Gateway suits local container workflows, agentgateway and ContextForge suit Kubernetes and federation, and Obot suits self-service catalogs. Our open source MCP gateway comparison covers more options.
Does an MCP gateway reduce Claude Code token usage?
An MCP gateway reduces Claude Code token usage when it limits which tool definitions reach the model. Tool filtering removes tools a developer does not need, and Bifrost Code Mode loads tool signatures on demand through four meta-tools, which matters most when Claude Code runs behind a custom base URL and its own tool search is off. Anthropic describes the same approach in its post on code execution with MCP, and our guide to Code Mode covers the benchmarks.
Can an open source MCP gateway handle OAuth for Claude Code?
Yes. Most gateways in this guide support OAuth in at least one direction. Bifrost can act as an OAuth 2.1 authorization server for Claude Code and also run per-user OAuth to upstream servers such as GitHub or Notion, so each developer calls tools under their own identity. Our guide to MCP authentication with OAuth and API keys explains the patterns.
Is Bifrost free to self-host?
Yes. Bifrost is open source under the Apache 2.0 license and runs with a single npx -y @maximhq/bifrost command or a Docker container, as shown in the gateway setup guide. The MCP gateway, virtual keys, tool filtering, Virtual MCPs, and Code Mode are part of the open source release, and Bifrost Enterprise adds clustering, guardrails, and identity integrations.
Get Started with Bifrost
A self-hosted gateway turns Claude Code's MCP setup from per-laptop configuration into a shared, governed endpoint. Bifrost does that and governs Claude Code's model traffic in the same deployment, with per-tool virtual keys, Code Mode, and 11 microseconds of overhead at 5,000 RPS. Start from the Bifrost GitHub repository or book a demo to see Bifrost as the MCP gateway for your Claude Code team.