ContextForge
An IBM gateway and registry that federates MCP servers, A2A agents and REST or gRPC APIs behind one endpoint with auth and observability
Install
pip install mcp-contextforge-gateway
python3 -m mcpgateway.scripts.init_secrets --patch-env .env
mcpgateway --host 0.0.0.0 --port 4444Install from PyPI, generate secrets and start the gateway.
This is third-party code. Review the repository files before installing.
What it does
ContextForge sits in front of a set of MCP servers and APIs and gives clients a single MCP endpoint. It wraps REST and gRPC services as MCP tools, bridges stdio servers to SSE or streamable HTTP, composes virtual servers from selected tools and routes A2A agents. It has an admin UI, JWT and OAuth auth, rate limiting, retries, OpenTelemetry tracing and 40+ plugins. It deploys via PyPI, Docker or Kubernetes with Redis-backed federation.
Who it is for. For platform teams that manage MCP servers and agent access to them centrally.
Good fit when
- Your company runs many MCP servers and needs one authenticated entry point
- You need to turn internal REST or gRPC APIs into MCP tools
- You need logs and tracing of agent tool calls
Not a fit when
- You only need one or two servers for personal use
- You have no capacity to operate a separate service
Example request
Run ContextForge locally and register our git MCP server in itLimitations
The gateway will not start without JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET, which must be generated first. It is a full service with a database; production needs Redis, auth and monitoring setup. It runs on your infrastructure and needs no external services by itself.
How to disable. Stop the container with docker stop mcpgateway or the mcpgateway process, and remove the gateway URL from client configs.
MCP
- Transport
- http, sse, stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| JWT_SECRET_KEY required, secret | Secret for signing JWT tokens |
| AUTH_ENCRYPTION_SECRET required, secret | Secret for encrypting stored credentials |
| PLATFORM_ADMIN_EMAIL | Admin UI administrator login |
| PLATFORM_ADMIN_PASSWORD secret | Admin UI administrator password |
| DATABASE_URL secret | Database connection string, for example SQLite |
Security check
- Stores credentials and tokens for connected services
- Proxies tool calls that write to external systems
README in short
The README describes the gateway by layer: protocols, API virtualization, registries, admin UI and observability. It gives quick starts via uvx, pip and Docker with secret and JWT token generation, plus API examples for registering servers. Then come configuration, cloud deployment, testing and troubleshooting. Apache-2.0 licensed.
FAQ
How do I connect a stdio server?
Via the mcpgateway.translate module, which exposes a stdio server over SSE or HTTP so it can be registered in the gateway.
Is there an offline option?
Yes, the README describes an airgapped image build with MCPGATEWAY_UI_AIRGAPPED=true.
Related
An MCP server built into the Netdata agent: metrics, logs, alerts and live process, service and container data for an AI assistant
GitHub's official MCP server: code, issues, pull requests, Actions and security alerts straight from the agent
A GitHub Action that runs Claude Code in pull requests and issues: answers mentions, reviews and makes changes
An AI assistant for Kubernetes that turns plain-language requests into kubectl operations and doubles as an MCP server