MCP Gateway
@IBM
An AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/gRPC APIs, exposing a unified endpoint with centralized discovery, guardrails and management. Optimizes Agent & Tool calling, and supports plugins.
概要
What is MCP Gateway?
MCP Gateway is an open source registry and proxy that federates Model Context Protocol (MCP) servers, A2A agents, and REST/gRPC APIs into a single unified endpoint. It provides centralized governance, discovery, observability, and protocol translation for AI clients.
How to use MCP Gateway?
Install the mcp-contextforge-gateway package via PyPI or use the Docker image. Configure settings through a .env file or environment variables, then launch the server with the mcpgateway command. A quick start using uvx is also supported.
Key features of MCP Gateway
- Federation across MCP, A2A, REST, and gRPC services
- REST-to-MCP and gRPC-to-MCP automatic tool translation
- Built-in auth, rate-limiting, retries, and OAuth token support
- Admin UI for real-time configuration and log monitoring
- OpenTelemetry observability with Phoenix, Jaeger, Zipkin, and other backends
- Redis-backed caching and multi-cluster federation for scalability
Use cases of MCP Gateway
- Federating multiple MCP servers under a single gateway for AI agents
- Exposing legacy REST or gRPC APIs as MCP-compliant tools without code changes
- Routing agent-to-agent (A2A) requests across OpenAI, Anthropic, or custom agents
- Centralizing governance, auth, and observability for enterprise AI infrastructure
- Airgapped deployments with a bundled Admin UI and offline capability
FAQ from MCP Gateway
What are the prerequisites to run MCP Gateway?
Python ≥ 3.11 is required. For quick-start smoke tests, curl and jq are recommended.
How do I authenticate with the gateway?
MCP Gateway supports Basic auth, JWT tokens, and OAuth tokens scoped per user. An X-Upstream-Authorization header can be set unconditionally for backend services.
What transports does MCP Gateway support?
It supports HTTP, JSON-RPC, WebSocket, SSE (with configurable keepalive), stdio, and streamable-HTTP.
Does MCP Gateway support OpenTelemetry?
Yes. It provides vendor-agnostic tracing via OTLP protocol and works with Phoenix, Jaeger, Zipkin, Tempo, DataDog, and New Relic backends.
Where is data stored?
MCP Gateway uses Redis for caching and federation. There is no embedded database; configuration and state are managed via files, environment variables, and Redis.