mcp-context-forge is a free, open source api development & testing project written in Python and released under Apache-2.0. It has 4,487 GitHub stars, 870 forks and 912 open issues, and was last pushed 10 hours ago. On this registry it ranks #53 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 10 stars over the last 3 tracked days.

What is mcp-context-forge?

What it is

ContextForge is an open-source AI gateway, registry, and proxy for MCP, A2A, and REST/gRPC services. It sits in front of tools, agents, and APIs, and exposes one endpoint for AI clients. The project lives in the Python developer-tools ecosystem, and it is licensed under Apache-2.0.

It solves the problem of fragmented AI infrastructure. Teams run many MCP servers, agent endpoints, REST APIs, and gRPC services. Each has its own discovery, authentication, rate limiting, and observability path. ContextForge centralizes controls. Clients call one governed endpoint. The gateway routes, translates, and observes underlying services.

Key capabilities

  • It federates MCP, A2A, and REST/gRPC APIs into a unified endpoint with centralized discovery, guardrails, and management.
  • It provides a tools gateway for MCP, REST, gRPC-to-MCP translation, and TOON compression.
  • It provides an agent gateway for the A2A protocol, OpenAI-compatible routing, and Anthropic agent routing.
  • It provides an API gateway with rate limiting, authentication, retries, and reverse-proxy behavior for REST services.
  • It supports plugin extensibility, with 40+ plugins for additional transports, protocols, and integrations.
  • It uses OpenTelemetry tracing and can send data to Phoenix, Jaeger, Zipkin, and other OTLP backends.
  • It runs as a compliant MCP server and scales to multi-cluster Kubernetes environments with Redis-backed federation and caching.

Who uses it and how

  • AI application teams use it as a single endpoint for clients that need tools, agents, and APIs without direct access to each backend.
  • Platform teams use it to add authentication, rate limiting, retries, and reverse-proxy controls around REST services.
  • Kubernetes operators deploy it in multi-cluster setups and rely on Redis-backed federation and caching to coordinate gateways.
  • Developers use Docker images, PyPI installation, VS Code dev containers, Docker Compose, or local development workflows to run and test it.
  • Observability users connect it to OpenTelemetry backends such as Phoenix, Jaeger, or Zipkin to trace gateway behavior.

Getting started

Typical installation uses the PyPI package mcp-contextforge-gateway or the Docker image ghcr.io/ibm/mcp-context-forge. The README also points to quick-start paths with uvx, Docker Compose, and a VS Code dev container.

When to use it — and when not to

Use ContextForge when teams need an open-source gateway that unifies MCP, A2A, and REST/gRPC traffic with centralized governance, discovery, and observability. Do not choose it when teams need only one MCP server and no Redis, Kubernetes, tracing, or plugin layer, because those are part of the documented deployment model. The repository is one year old, the contributor count is not listed, and the open-issue count is 912, so teams should expect operational responsibility.

project readme (upstream, from github) — read inline

ContextForge

An open source registry and proxy that federates MCP, A2A, and REST/gRPC APIs with centralized governance, discovery, and observability. Optimizes Agent & Tool calling, and supports plugins.

ContextForge Banner

Build Python Package  Dependency Review  Tests & Coverage  Lint & Static Analysis

Async License  PyPI  Docker Image 

ContextForge is an open source registry and proxy that federates tools, agents, and APIs into one clean endpoint for your AI clients. It provides centralized governance, discovery, and observability across your AI infrastructure:

  • Tools Gateway — MCP, REST, gRPC-to-MCP translation, and TOON compression
  • Agent Gateway — A2A protocol, OpenAI-compatible and Anthropic agent routing
  • API Gateway — Rate limiting, auth, retries, and reverse proxy for REST services
  • Plugin Extensibility — 40+ plugins for additional transports, protocols, and integrations
  • Observability — OpenTelemetry tracing with Phoenix, Jaeger, Zipkin, and other OTLP backends

It runs as a fully compliant MCP server, deployable via PyPI or Docker, and scales to multi-cluster environments on Kubernetes with Redis-backed federation and caching.

ContextForge

Table of Contents


📌 Quick Links

Resource Description
5-Minute Setup Get started fast — uvx, Docker, Compose, or local dev
Getting Help Support options, FAQ, community channels
Issue Guide How to file bugs, request features, contribute
Full Documentation Complete guides, tutorials, API reference
Deprecations Deprecated runtime paths and migration guidance

Overview & Goals

ContextForge is an open source registry and proxy that federates any Model Context Protocol (MCP) server, A2A server, or REST/gRPC API, providing centralized governance, discovery, and observability. It optimizes agent and tool calling, and supports plugins. See the project roadmap for more details.

It currently supports:

  • Federation across multiple MCP and REST services
  • A2A (Agent-to-Agent) integration for external AI agents (OpenAI, Anthropic, custom)
  • gRPC-to-MCP translation via automatic reflection-based service discovery
  • Virtualization of legacy APIs as MCP-compliant tools and servers
  • Transport over HTTP, JSON-RPC, WebSocket, SSE (with configurable keepalive), and Streamable HTTP; stdio transport available for server-side use
  • An Admin UI for real-time management, configuration, and log monitoring (with airgapped deployment support)
  • Built-in auth, retries, and rate-limiting with user-scoped OAuth tokens and unconditional X-Upstream-Authorization header support
  • OpenTelemetry observability with Phoenix, Jaeger, Zipkin, and other OTLP backends
  • Scalable deployments via Docker or PyPI, Redis-backed caching, and multi-cluster federation

ContextForge Architecture

For a list of upcoming features, check out the ContextForge Roadmap


🔌 Gateway Layer with Protocol Flexibility
  • Federates any MCP server or REST API
  • Lets you choose your MCP protocol version (e.g., 2025-11-25)
  • Exposes a single, unified interface for diverse backends
🧩 Virtualization of REST/gRPC Services
  • Wraps non-MCP services as virtual MCP servers
  • Registers tools, prompts, and resources with minimal configuration
  • gRPC-to-MCP translation via server reflection protocol
  • Automatic service discovery and method introspection
🔁 REST-to-MCP Tool Adapter
  • Adapts REST APIs into tools with:

    • Automatic JSON Schema extraction
    • Support for headers, tokens, and custom auth
    • Retry, timeout, and rate-limit policies
🧠 Unified Registries
  • Prompts: Jinja2 templates, multimodal support, rollback/versioning
  • Resources: URI-based access, MIME detection, caching, SSE updates
  • Tools: Native or adapted, with input validation and concurrency controls
📈 Admin UI, Observability & Dev Experience
  • Admin UI built with HTMX 2.0.3 (bundled) + Alpine.js
  • Real-time log viewer with filtering, search, and export capabilities
  • Auth: Basic, JWT, or custom schemes
  • Structured logs, health endpoints, metrics
  • 7,000+ tests, Makefile targets, live reload, pre-commit hooks
🔍 OpenTelemetry Observability
  • Vendor-agnostic tracing with OpenTelemetry (OTLP) protocol support
  • Multiple backend support: Phoenix (LLM-focused), Jaeger, Zipkin, Tempo, DataDog, New Relic
  • Distributed tracing across federated gateways and services
  • Automatic instrumentation of tools, prompts, resources, and gateway operations
  • LLM-specific metrics: Token usage, costs, model performance
  • Zero-overhead when disabled with graceful degradation

See Observability Documentation for setup guides with Phoenix, Jaeger, and other backends.


Quick Start - PyPI

ContextForge is published on PyPI as mcp-contextforge-gateway.


⚠️ JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET are required in every environment — including local development. The gateway will not start without them. Generate real secrets with python3 -m mcpgateway.scripts.init_secrets before first run.

TLDR — single command using uv:

# 1️⃣  Generate secure secrets (creates .env.secrets)
python3 -m mcpgateway.scripts.init_secrets

# 2️⃣  Export the generated values
export JWT_SECRET_KEY="$(grep '^JWT_SECRET_KEY=' .env.secrets | cut -d= -f2)"
export AUTH_ENCRYPTION_SECRET="$(grep '^AUTH_ENCRYPTION_SECRET=' .env.secrets | cut -d= -f2)"

# 3️⃣  Start the gateway
JWT_SECRET_KEY="$JWT_SECRET_KEY" \
AUTH_ENCRYPTION_SECRET="$AUTH_ENCRYPTION_SECRET" \
MCPGATEWAY_UI_ENABLED=true \
MCPGATEWAY_ADMIN_API_ENABLED=true \
[email protected] \
uvx --from mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444
📋 Prerequisites
  • Python ≥ 3.11
  • curl + jq - only for the last smoke-test step

1 - Install & run (copy-paste friendly)

## 1️⃣  Create an isolated env and install from PyPI
mkdir m

readme truncated — read the full docs on github

Frequently asked questions

Is mcp-context-forge free to use?

mcp-context-forge is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mcp-context-forge do?

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

What is mcp-context-forge written in?

mcp-context-forge is primarily written in Python. Its source is publicly available at https://github.com/IBM/mcp-context-forge, and it has 4,487 GitHub stars.