IBM/mcp-context-forge

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.

4,271 ★801 forksPythonUpdated 21h ago

What you need to know

ContextForge — an open source registry and proxy that federates MCP servers, A2A agents, and REST/gRPC APIs into one clean endpoint for AI clients, with centralized governance, discovery, observability, rate limiting/auth, and plugin extensibility.

Install

pip install mcp-contextforge-gateway
Docker: ghcr.io/ibm/mcp-context-forge:latest
Helm chart (charts/mcp-stack) for Kubernetes; VS Code dev container included

Usage

  • Generate required secrets first: python3 -m mcpgateway.scripts.init_secrets
  • Start the gateway: mcpgateway --host 0.0.0.0 --port 4444 (or uvicorn mcpgateway.main:app)
  • Register upstream MCP/REST servers via Admin UI or API, then bundle their tools into virtual servers
  • Connect clients to http://localhost:4444/servers/<UUID>/mcp, or use the stdio wrapper (python3 -m mcpgateway.wrapper)

Key features

  • Tools Gateway: MCP, REST, and gRPC-to-MCP translation (via server reflection) with TOON compression
  • Agent Gateway: A2A protocol plus OpenAI-compatible and Anthropic agent routing
  • API Gateway: rate limiting, auth (JWT/OAuth/Basic), retries, reverse proxy
  • OpenTelemetry observability with Phoenix, Jaeger, Zipkin and other OTLP backends
  • Admin UI (HTMX + Alpine), transport over HTTP/JSON-RPC/WebSocket/SSE/stdio/streamable-HTTP, 40+ plugins, Redis-backed multi-cluster federation

Caveats

  • JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET are required in every environment, including local dev
  • arm64 is not supported in production containers (Apple Silicon needs Rosetta or PyPI install)
  • Sample/test MCP servers in mcp-servers/ are unsupported and should not run in production; never run untrusted MCP servers directly on the local filesystem
  • Strict SSRF defaults (SSRF_ALLOW_PRIVATE_NETWORKS=false) on Helm
Platforms: Linux · macOS · Windows (PowerShell) · Kubernetes
Documentation ↗

Reviewed 2026-08-07

Topics

agentsaiapi-gatewayasyncioauthentication-middlewaredevopsdockerfastapifederationgatewaygenerative-aijwtkubernetesllm-agentsmcpmodel-context-protocolobservabilityprompt-engineeringpythontools
View on GitHub ↗
Stars
4,271★
Forks
801
Language
Python
License
Apache-2.0
Created
2025-05-08
Last push
2026-08-06