ContextForge Gateway

A governed gateway that unifies MCP, A2A, REST, and gRPC services for AI clients.

Stars
★ 4.8k
Last updated
today
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Self-hosted serviceCLIMCP server
Works with
Universal · cross-platformClaude.ai · OpenAI API · Claude API
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
Python 3.11DockerShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A platform engineering team needs one authenticated, observable discovery endpoint for several internal MCP services.
Not a fit if
  • Teams wanting zero-config startup without secrets or a database
  • Apple Silicon users who need native production containers
  • Teams that want a hosted cloud service instead of self-hosting

What does this agent do, and when should you use it?

ContextForge is IBM's open-source registry and proxy for federating MCP servers, A2A servers, and REST/gRPC APIs. Its FastAPI application lives in mcpgateway/ and includes routers, middleware, service-layer components, and SSE, WebSocket, stdio, and streamable-HTTP transports. It can virtualize REST services and reflection-discovered gRPC services as MCP tools, then group registered tools into virtual MCP servers. The gateway adds authentication, retries, rate limiting, centralized discovery, and OpenTelemetry observability for Phoenix, Jaeger, Zipkin, and other OTLP backends. It can run from PyPI, containers, Docker Compose, or Helm; the full container stack uses PostgreSQL, Redis, Nginx, and multiple gateway replicas.

An administrator can register an MCP endpoint with POST /gateways, read the resulting catalog through GET /tools, and create a virtual server with POST /servers using associated_tools. A client then connects to /servers/UUID_OF_SERVER_1/mcp over streamable HTTP. mcpgateway.translate can run a stdio command such as uvx mcp-server-git and expose both /sse and /mcp; it can also discover gRPC services and methods through server reflection for gRPC-to-MCP translation. At runtime, the gateway can apply authentication, retries, rate limiting, and reverse-proxy behavior, while emitting OpenTelemetry traces for gateway, tool, prompt, and resource operations. mcpgateway.wrapper uses MCP_AUTH and MCP_SERVER_URL to present an authenticated remote gateway as a stdio process for MCP clients.

  1. A platform engineering team needs one authenticated, observable discovery endpoint for several internal MCP services.
  2. A backend team wants to expose an existing REST API as MCP tools without rewriting the service.
  3. A team operating gRPC services wants reflection-based service and method discovery for MCP clients.
  4. An organization routing OpenAI, Anthropic, and custom external agents needs an A2A-capable gateway layer.
  5. An infrastructure team needs to deploy tool infrastructure across Kubernetes clusters with Redis-backed caching and federation.
  6. A user of a stdio-only MCP client needs to reach an authenticated remote gateway through mcpgateway.wrapper.

How do you install or deploy this agent?

Python 3.11 or later is required. Install the PyPI package and generate the required secrets:

python3 -m venv .venv && source .venv/bin/activate
pip install --upgrade pip
pip install mcp-contextforge-gateway
curl -O https://raw.githubusercontent.com/IBM/mcp-context-forge/main/.env.example
cp .env.example .env
python3 -m mcpgateway.scripts.init_secrets --patch-env .env
mcpgateway --host 0.0.0.0 --port 4444

JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET must contain real values or the gateway will fail at startup.

How do you use this agent?

Read the JWT secret from .env and create a token:

export JWT_SECRET_KEY=$(grep '^JWT_SECRET_KEY=' .env | cut -d= -f2)
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username [email protected] --exp 10080 --secret "$JWT_SECRET_KEY")

Register an SSE MCP service:

curl -s -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" -H "Content-Type: application/json" -d '{"name":"fast_time","url":"http://localhost:8003/sse"}' http://localhost:4444/gateways

Then retrieve tool IDs with GET /tools, POST a server object with name, description, and associated_tools to /servers, and point an MCP client to http://localhost:4444/servers/UUID_OF_SERVER_1/mcp. A running instance also exposes /docs, /redoc, /health, and /version.

What are this agent's strengths and limitations?

Pros
  • Federates MCP, A2A, REST, and gRPC behind one gateway, with gRPC discovery based on server reflection.
  • Provides REST-to-MCP adaptation, virtual MCP servers, and a stdio wrapper for both HTTP and stdio client paths.
  • Centralizes gateway controls including authentication, retries, rate limiting, JWTs, and user-scoped OAuth tokens.
  • Supports OpenTelemetry with Phoenix, Jaeger, Zipkin, and other OTLP backends, including distributed tracing.
  • Offers PyPI, GHCR container, Docker Compose, and Helm deployment paths; the full stack includes PostgreSQL, Redis, and Nginx.
Limitations
  • JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET are mandatory; missing or placeholder values cause a fast startup failure.
  • A local Docker Compose gateway build depends on a CI-produced hermetic wheel closure; cryptography or dependency-resolution failures require pulling the prebuilt GHCR image.
  • Production containers currently do not support arm64, so Apple Silicon users must use Rosetta or install from PyPI.
  • Helm defaults to strict private-network SSRF settings, requiring allowlist configuration when registering in-cluster tool URLs.
  • The mcp-servers/ directory contains unsupported sample and test servers that are explicitly not suitable for production.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
ContextForge Gateway This agent 49 · Major gaps Self-hosted serviceFree ★ 4.8k today Python Claude.ai · OpenAI API · Claude API
Archestra 71 · Some gaps Self-hosted serviceFreemium ★ 4.4k today TypeScript Codex · Claude Code · OpenAI API · Claude API
Jarvis Registry 40 · Major gaps Self-hosted serviceFree ★ 3.8k today Python —
Nasiko Agent Control Plane 39 · Major gaps Self-hosted serviceFree + model costs ★ 12k 14d ago Rust OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
49/ 100 5-point scale 2.5 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 6 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 11/29
Reliability 8/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

Evidence shows security validators, SSRF protection, template injection protection, but no user confirmation mechanism or clear data flow transparency documentation. Dependency security has scanning and pinned versions, but actual execution not verified. External effects have SSRF protection but not comprehensive. Rollback has migration tests but not comprehensive. Source attribution has author info but not verified.

Reliability8 / 14 · 2.9/5

Self-consistency is good, docs and config align. Dependency availability has pinned versions and locks, but actual installation not verified. Failure messages partially documented but not comprehensive.

Adaptability10 / 18 · 2.8/5

Audience clearly developers, scenarios cover MCP, A2A, REST. Capability boundaries described but not comprehensive. Trigger precision has configuration but not explicit. Environment fit has Docker, K8s, etc.

Convention10 / 18 · 2.8/5

Information architecture clear with TOC and docs. Install notes detailed. Naming stability has version but not explicit. Examples and FAQ present. Known limitations have Beta notes. License clear. Versioning and changelog present. Maintenance responsibility has author but not verified.

Effectiveness7 / 13 · 2.7/5

Output usability has API and UI. Marginal value high, provides unified gateway. Cost benefit has performance optimizations but not verified.

Verifiability3 / 8 · 1.9/5

Claims supported by docs but not independently verified. Cross-source limited. Fact-inference separation not clear.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Publisher identity not verified, treat with caution.
  • Static review cannot confirm actual security and reliability.
  • Admin UI is development-only, disable in production.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision eaf295e64457 New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.1.0 v1.1.0 - Release 2026-10-20 - Modern MCP Protocol, New Redesigned Web UI, Federated Completions, and Catalog Pagination
    Release notes excerpt
    [1.1.0] - 2026-10-19 - Modern MCP Protocol, New Redesigned Web UI, Federated Completions, and Catalog Pagination Overview Release 1.1.0 delivers modern MCP protocol negotiation on by default, federated completions, MCP catalog pagination, MCP Origin/Host transport security enforcement, federated gateway tool-name collision detection, and configuration import ownership enforcement. It also removes deprecated anyio monkey-patch settings and the in-tree mcp-servers/ directory. This release consolidates 69 PRs across: …
    View on GitHub ↗
  2. v1.0.11 v1.0.11 - Release 2026-09-28 - MCP Python SDK 2.x, Tool Preview, SSO Controls, and Live E2E Coverage
    Release notes excerpt
    Overview Release 1.0.11 consolidates 57 PRs focused on the MCP Python SDK 2.x migration, tool preview, SSO linking and group-mapping controls, catalog and OAuth registration fixes, CORS and schema-validation hardening, and live black-box E2E coverage: - Protocol & Transport - Moved to mcp>=2.0.0 with mcp-types, added modern protocol negotiation to legacy(MCP_CLIENT_CONNECT_MODE, MCP_INBOUND_PROTOCOL_MODE, GATEWAY_MODERN_LISTENERS_ENABLED, all legacy by default), and paginated every upstream list_* call. …
    View on GitHub ↗
  3. v1.0.7-20260921 v1.0.7-20260921 - Patch Fix - Upstream MCP Pagination Fix and Security Dependency Updates
    Release notes excerpt
    [1.0.7-20260921] - 2026-09-21 - Upstream MCP Pagination Fix and Security Dependency Updates Overview Maintenance patch release for the v1.0.7 support line addressing upstream MCP pagination discovery and patching vulnerable dependencies and container base images. Fixed - Upstream MCP Pagination ([#6809](https://github.com/IBM/mcp-context-forge/pull/6809)) - Follow nextCursor when discovering tools, resources, and prompts from upstream MCP servers across SSE, OAuth SSE, and Streamable HTTP transports rather than only fetching the first page. Security …
    View on GitHub ↗

FAQ

What must be configured before the gateway starts?
Valid JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET values are required. The documented python3 -m mcpgateway.scripts.init_secrets command generates them; production deployments should also set a strong PLATFORM_ADMIN_PASSWORD.
Can it expose non-MCP services to MCP clients?
Yes. It adapts REST APIs into MCP tools and can use server reflection to discover gRPC services for gRPC-to-MCP translation.
How can it be deployed?
It can run from PyPI, a GHCR container, a full Docker Compose stack, or Helm on Kubernetes. Uvicorn with SQLite is also documented for development.
Are the bundled sample MCP servers production-ready?
No. The repository states that mcp-servers/ examples and test servers commonly lack session management, persistent state, multi-tenancy, and authentication, and do not receive the core codebase's level of security review.
View on GitHub ↗ Install ↓

Related agents