Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ibm-mcp-context-forge docker run -i ghcr.io/ibm/mcp-context-forge \
  --env DEBUG="Enable verbose logging (true/false)" \
  --env REDIS_URL="Redis connection string for federation and caching (e.g., redis://localhost:6379)" \
  --env OTLP_ENDPOINT="OpenTelemetry collector URL (e.g., http://localhost:4317)"

How to use

ContextForge is an open source registry and proxy that federates MCP servers, A2A agents, and REST/gRPC APIs into a single, governed endpoint. It provides centralized discovery, observability, and tooling orchestration, including translation between MCP, REST, and gRPC, as well as agent routing and plugin extensibility. The gateway is designed to run as a PyPI package or inside a container, and it can be deployed in multi-cluster environments with Redis-backed federation. Tools, agents, and resources are registered and discovered through the gateway, while OpenTelemetry enables tracing across federated services. You can use ContextForge to expose diverse backends through a unified MCP interface, with built-in auth, retries, and rate limiting, plus admin UI for real-time management.

How to install

Prerequisites:

  • Docker installed and running (recommended for container deployment)
  • Optional: Python 3.8+ if you prefer installing via PyPI and running locally
  • Redis server for caching/federation (recommended for multi-cluster deployments)

Option A: Run via Docker

  1. Ensure you have Docker logged in if you’re pulling private images.
  2. Start the ContextForge container: docker run -i ghcr.io/ibm/mcp-context-forge
  3. (Optional) Mount config or environment variables as needed, and set OTLP_ENDPOINT/REDIS_URL via -e flags if required.

Option B: Install via PyPI (local development)

  1. prerequisites: Python 3.8+ and pip
  2. Install the gateway package: pip install mcp-contextforge-gateway
  3. Run the gateway (example): mcp-contextforge-gateway --config /path/to/config.yaml

Option C: Local development with uvx (Python) or other supported runtimes

  1. Install requirements: pip install -r requirements-dev.txt
  2. Run the server using the provided entry points or module invocation as documented in the repository.

Note: Refer to the official documentation for environment-specific configuration and runtime options, including how to wire MCP inputs, A2A routing, and REST/gRPC translations.

Additional notes

Tips and common considerations:

  • Environment variables like OTLP_ENDPOINT and REDIS_URL should be configured for production deployments to enable observability and federation caching.
  • When running via Docker, consider mounting a persistent volume for configuration and logs, and provide a redis:// URL for Redis-backed federation.
  • The gateway supports multiple protocol adapters (MCP, REST, gRPC) and can host plugins to extend transports and integrations.
  • If you use the PyPI route, ensure you’re pulling the latest release to benefit from security patches and new features.
  • For troubleshooting, enable DEBUG mode and consult the OpenTelemetry traces to identify bottlenecks across federated services.

Related MCP Servers

Sponsor this space

Reach thousands of developers