TL;DR
- An MCP gateway gives AI agents one endpoint for tools from many MCP servers, replacing a separate client configuration, credential, and transport for each server.
- The criteria that matter most for tool connectivity are supported upstream sources, upstream authentication, per-caller tool scoping, and how tool definitions affect context size.
- Bifrost ranks first: it is open source under Apache 2.0, connects to STDIO, HTTP, and SSE MCP servers, scopes tools per virtual key, and cuts input tokens by up to 92.8% with Code Mode.
- agentgateway and IBM ContextForge are open-source gateways that also federate REST and A2A traffic, while Amazon Bedrock AgentCore Gateway is a fully managed AWS service.
- Docker MCP Gateway fits local, container-based MCP server management, and Kong AI Gateway extends an existing Kong deployment to MCP traffic through enterprise plugins.
Every MCP server connected directly to an AI agent adds its own endpoint, credential, and tool schema, and the number of integrations grows with each new agent and each new server. An MCP gateway replaces those point-to-point connections with a single endpoint that handles tool discovery, upstream authentication, and access policy for every agent. Bifrost, the open-source AI and MCP gateway built in Go by Maxim AI, is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This guide compares six MCP gateways on how they connect agents to tools, how they authenticate to upstream servers, and how they control which tools each agent can call.
What Is an MCP Gateway for AI Agents?
An MCP gateway is a control layer between AI agents and MCP servers that exposes tools from many servers through one endpoint while centralizing authentication, access policy, and logging. Agents connect once to the gateway, and the gateway maintains the upstream connections to each MCP server.
The MCP architecture specification pairs each client with exactly one server, so an agent host reaching ten servers manages ten sessions, ten credentials, and ten sets of tool definitions. Across a team, that multiplies into an N-by-M integration problem that a gateway reduces to one connection per agent.
Tool definitions also carry a context cost. Anthropic's engineering team reported in its post on code execution with MCP that loading tool definitions only on demand reduced one workflow from 150,000 tokens to 2,000 tokens, a 98.7% saving. Gateways that control how tools reach the model therefore affect cost and accuracy, not only connectivity. The underlying pattern is covered in how an MCP gateway works.
How to Evaluate an MCP Gateway for Tool Connectivity
Evaluate an MCP gateway on five connectivity questions: which upstream sources it can reach, how it authenticates to them, whether it can give different agents different tool lists, how it limits tool-definition overhead, and where it runs. The answers separate local developer tools from gateways built for shared, production agent traffic.
| Criterion | What to check | Why it matters for agents |
|---|---|---|
| Upstream sources | MCP transports (stdio, HTTP, SSE, Streamable HTTP), plus REST, gRPC, or Lambda conversion | Determines which existing tools an agent can reach without new code |
| Aggregation and curation | One endpoint for all tools, and named bundles of selected tools | Keeps agent configuration to one entry per curated tool set |
| Upstream authentication | Shared credentials, per-user OAuth, token exchange | Decides whether upstream actions are attributed to a person |
| Per-caller tool scoping | Allow-lists per key, consumer, role, or user | Stops an agent from calling tools outside its task |
| Context overhead | Tool search, code execution, or filtering before definitions reach the model | Controls token cost as tool counts grow |
| Deployment model | Self-hosted, Kubernetes, in-VPC, or managed service | Determines where tool traffic and credentials live |
Tool-level permissions are examined in more depth in MCP RBAC for production AI agents, and the token side is quantified in the hidden cost of connecting multiple MCP servers.
MCP Gateways Compared at a Glance
The six MCP gateways below differ most in deployment model and in how finely they scope tool access per caller. The table lists only capabilities stated in each project's current documentation; "Not published" means the capability was not found in the pages reviewed, not that it is absent.
| Gateway | Deployment | License | Upstream sources | Per-caller tool scoping | LLM routing in same gateway |
|---|---|---|---|---|---|
| Bifrost | Self-hosted (npx, Docker, Kubernetes), in-VPC | Apache 2.0 | MCP over STDIO, HTTP, SSE | Virtual keys, deny-by-default filtering, Virtual MCPs | Yes, 25+ providers |
| agentgateway | Standalone binary or Kubernetes | Apache 2.0 | MCP over stdio, HTTP, SSE, Streamable HTTP; OpenAPI | RBAC with CEL policy engine | Yes |
| Amazon Bedrock AgentCore Gateway | Fully managed AWS service | Commercial service | MCP targets, OpenAPI, Smithy, Lambda | Fine-grained access control rules | Yes, inference targets |
| IBM ContextForge | PyPI, Docker, Kubernetes | Apache 2.0 | MCP, A2A, REST, gRPC | Virtual servers bundle selected tools | Not published |
| Docker MCP Gateway | Docker CLI plugin, Docker Desktop | MIT | Containerized MCP servers from Docker catalogs | Not published | Not published |
| Kong AI Gateway | Kong Gateway and Konnect | AI Gateway Enterprise license for MCP plugin | Upstream MCP servers, REST APIs converted to tools | ACLs per Consumer and Consumer Group | Yes, AI Proxy plugins |
The MCP gateway resource page summarizes how Bifrost combines these capabilities in one deployment.
1. Bifrost
Bifrost is an open-source AI gateway that acts as an MCP client to upstream tool servers and as an MCP server to agents, exposing every connected tool through a single /mcp endpoint. The same deployment routes LLM traffic to 25+ providers and 10,000+ models, and Bifrost adds 11 microseconds of overhead per request at 5,000 RPS in sustained benchmarks.
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.
Key capabilities for connecting tools to agents:
- Upstream connections. Bifrost connects to MCP servers over STDIO, HTTP, or SSE, retrying transient failures with exponential backoff and health-checking each server every 10 seconds by default.
-
One endpoint per tool set. The MCP gateway endpoint aggregates all tools, and Virtual MCPs bundle selected tools from several servers at
/mcp/<slug>. - Upstream authentication. Each server uses one of six MCP authentication types: None, Headers, OAuth 2.0, Per-User OAuth, Per-User Headers, or Token Exchange (enterprise).
- Inbound authentication. Agents authenticate with virtual key headers or a browser-based OAuth 2.1 flow, as described in gateway authentication.
- Per-caller tool scoping. Tool filtering stacks client, request, and virtual key levels, and an empty tool list exposes nothing.
- Context control. With Code Mode, the model writes Python that orchestrates tools in a sandbox; across 508 tools on 16 servers, input tokens fell from 75.1M to 5.4M (92.8%) with a 65/65 pass rate.
- Execution control. Bifrost does not auto-execute tool calls by default, and Agent Mode enables auto-execution only for tools that are explicitly listed.
- Enterprise deployment. Clustering and in-VPC deployments keep tool traffic and credentials inside the organization's own infrastructure.
Connecting a coding agent takes one entry. For Claude Code:
claude mcp add --transport http bifrost http://localhost:8080/mcp \
--header "Authorization: Bearer your-virtual-key" \
--scope user
A full walkthrough is in connecting Claude Code to 500 MCP tools through one gateway.
2. agentgateway
agentgateway is an open-source (Apache 2.0) gateway that handles service traffic, LLM traffic, MCP, and agent-to-agent (A2A) communication in one data plane. The project has joined the Agentic AI Foundation and runs as a standalone binary or on Kubernetes through a built-in controller and the Gateway API.
Key capabilities for connecting tools to agents:
- Tool federation. agentgateway federates MCP servers over stdio, HTTP, SSE, and Streamable HTTP transports.
- API conversion. OpenAPI integration exposes existing APIs as MCP tools.
- Access control. Authentication supports JWT, API keys, and OAuth, with fine-grained RBAC through a CEL policy engine.
- Adjacent traffic. An LLM gateway with budget controls and an A2A gateway share the same binary, along with guardrails and OpenTelemetry metrics, logs, and traces.
Best for: Platform teams already running Kubernetes Gateway API infrastructure who want MCP, A2A, LLM, and service traffic governed in one data plane.
Teams that weigh policy-as-code against key-based tool scoping can compare agentgateway's CEL model with the allow-list approach in open-source MCP gateways compared.
3. Amazon Bedrock AgentCore Gateway
Amazon Bedrock AgentCore Gateway is a fully managed AWS service that provides a single entry point connecting agents to tools, other agents, and LLMs. It converts APIs, Lambda functions, and existing services into MCP-compatible tools and runs as serverless infrastructure that scales with demand.
Key capabilities for connecting tools to agents:
- Tool sources. OpenAPI, Smithy, and Lambda are supported as tool input types, with one-click integrations for Salesforce, Slack, Jira, Asana, and Zendesk.
- Aggregation. MCP targets operate in aggregation mode, combining their capabilities into a single virtual MCP server; HTTP targets pass traffic through without translation.
- Authentication. Inbound and outbound authentication run in one service, with a separate credential provider attachable to each target.
- Tool discovery. Semantic tool selection lets agents search across available tools to limit prompt size.
Best for: Teams building agents on AWS who want a serverless tool gateway and accept running tool traffic through an AWS-managed service.
AgentCore Gateway is scoped to AWS. Organizations that must keep tool traffic in their own VPC, on-premises, or across clouds typically evaluate self-hosted options against the controls in the MCP gateway guide for regulated industries.
4. IBM ContextForge
IBM ContextForge is an open-source (Apache 2.0) registry and proxy that federates MCP servers, A2A agents, and REST or gRPC APIs into one endpoint for AI clients. It installs from PyPI or Docker and scales to multi-cluster Kubernetes environments with Redis-backed federation and caching.
Key capabilities for connecting tools to agents:
- Transports. ContextForge supports HTTP, JSON-RPC, WebSocket, SSE, and Streamable HTTP, with stdio available for server-side use.
- API virtualization. Legacy REST APIs become MCP-compliant tools, and gRPC services are translated to MCP through reflection-based discovery.
- Curated servers. Virtual servers bundle selected tools from the catalog behind their own endpoint.
- Operations. Built-in auth, retries, and rate limiting work with user-scoped OAuth tokens, alongside 40+ plugins, OpenTelemetry tracing, and an Admin UI that supports airgapped deployment.
Best for: Teams that need to expose REST and gRPC services as MCP tools next to existing MCP servers, using a self-hosted registry.
ContextForge virtual servers and Bifrost Virtual MCP bundles address the same curation need; the difference to test is how each ties a bundle to a specific caller's credentials.
5. Docker MCP Gateway
Docker MCP Gateway is an open-source (MIT) Docker CLI plugin that powers the MCP Toolkit in Docker Desktop. It runs and manages MCP servers from Docker MCP catalogs and gives MCP clients such as VS Code, Cursor, and Claude Desktop one shared gateway configuration.
Key capabilities for connecting tools to agents:
- Container isolation. Each local MCP server from the catalog runs in an isolated container, and npx and uvx servers receive minimal host privileges.
- Credentials. Secrets are kept out of environment variables through Docker Desktop secrets management, with built-in OAuth flows for servers that need them.
- Discovery. Tools, prompts, and resources are discovered automatically from running servers.
- Monitoring. Built-in logging and call tracing record tool activity.
Best for: Individual developers and small teams managing local MCP servers who already work in Docker Desktop.
The documented setup requires Docker Desktop 4.59 or later with the MCP Toolkit enabled. Teams moving from one developer's machine to shared agent traffic usually add per-caller scoping and audit, the controls covered in MCP gateway observability for every tool call.
6. Kong AI Gateway
Kong AI Gateway brings MCP traffic under Kong Gateway through the AI MCP Proxy plugin, available from Kong Gateway 3.12 as part of the AI Gateway Enterprise offering. The plugin runs between MCP clients and MCP servers, separate from the LLM request flow.
Key capabilities for connecting tools to agents:
- Three modes. The plugin proxies requests to upstream MCP servers, converts RESTful APIs into MCP tools, or exposes grouped tools as a managed MCP server.
- Authentication. The AI MCP OAuth2 plugin, OpenID Connect, and Key Auth secure MCP endpoints.
- Tool access control. ACLs restrict MCP tool usage by Consumer and Consumer Group.
- Observability. MCP audit logs and metrics capture session IDs, JSON-RPC methods, payloads, latencies, and errors, and an MCP Registry is available in Konnect as a tech preview.
Best for: Organizations that already standardize API management on Kong and want MCP traffic governed by the same plugins and consumers.
Kong applies API-management policy to MCP endpoints. Teams without an existing Kong footprint often compare that approach with gateways that manage MCP governance for AI traffic natively.
Common MCP Security and Connection Challenges for Agents
The most common problems when connecting MCP servers to agents are tool-definition bloat, shared upstream credentials, agents holding more tools than their task needs, and missing records of which agent called which tool. Each problem grows with the number of servers, and each is a reason teams move from direct connections to an MCP gateway.
- Context bloat. Every connected tool definition costs input tokens on every turn, which is why code execution and tool search matter once agents reach dozens of servers.
- Shared credentials. The MCP security best practices describe confused deputy attacks against proxy servers that act as a single OAuth client, and warn against passing client tokens through to downstream APIs.
- Over-broad tool access. Without per-caller allow-lists, a support agent and a deployment agent see the same write-capable tools.
- Missing audit. Upstream logs cannot attribute actions when every call arrives under one identity; the Bifrost observability layer records MCP tool calls alongside LLM requests.
The broader case for a central layer is laid out in what an MCP gateway does for production AI agents.
Frequently Asked Questions
What is an MCP gateway?
An MCP gateway is a control layer between AI agents and MCP servers. It exposes tools from many servers through one endpoint and centralizes upstream authentication, tool access policy, and logging. Agents configure a single connection instead of one per server, and the gateway maintains the upstream sessions, as shown in the Bifrost MCP gateway overview.
Is there an open-source MCP gateway?
Yes. Bifrost, agentgateway, and IBM ContextForge are open source under Apache 2.0, and Docker MCP Gateway is open source under MIT. Bifrost combines MCP and LLM gateway functions in one self-hosted deployment and is available on GitHub for teams that want to inspect or extend the code.
How does an MCP gateway reduce token usage?
An MCP gateway reduces token usage by controlling which tool definitions reach the model. Filtering removes tools an agent does not need, and code execution replaces loaded definitions with on-demand discovery. Bifrost Code Mode reduced input tokens by 92.8% across 508 tools in benchmarks, detailed in the MCP gateway benchmark writeup.
Do I need an MCP gateway for a single MCP server?
A single agent calling one MCP server can connect directly without a gateway. A gateway becomes useful once several agents share servers, a tool can write to production systems, or security teams need to know which tools each agent can call. At that point, virtual key tool rules replace per-client configuration.
Can an MCP gateway run in an air-gapped environment?
Self-hosted MCP gateways can run without public internet access when the upstream MCP servers are also reachable internally. Bifrost supports air-gapped, VPC-isolated, and on-premises deployments, which the Bifrost Enterprise offering covers for regulated industries. Fully managed services such as AgentCore Gateway run on the provider's infrastructure.
Which MCP gateway works with Claude Code and Cursor?
Any MCP gateway that exposes an HTTP endpoint works with Claude Code and Cursor. Bifrost connects to Claude Code with a single claude mcp add --transport http command and a virtual key header, and the same /mcp URL serves Cursor. Setup details are in the Claude Code integration guide.
Try Bifrost Today
The right MCP gateway depends on where tool traffic must run and how finely each agent's tool access must be scoped. Bifrost connects agents to STDIO, HTTP, and SSE MCP servers through one endpoint, scopes every tool per virtual key, and routes LLM traffic in the same open-source deployment. To see how Bifrost fits as the MCP gateway for your agents, book a demo with the Bifrost team.






Top comments (0)