home / mcp / contextforge mcp gateway
Gateway that federates MCP and REST services, enabling discovery, auth, retries, observability, and admin tooling from a single endpoint.
Configuration
View docs{
"mcpServers": {
"ibm-mcp-context-forge": {
"url": "http://localhost:8003/sse"
}
}
}ContextForge MCP Gateway is a feature-rich gateway, proxy and MCP Registry that federates MCP and REST services, unifying discovery, auth, rate-limiting, observability, virtual servers, multi-transport protocols, and an admin UI into a single endpoint for your MCP clients. It supports federation across MCP and REST backends, A2A agent integration, gRPC-to-MCP translation, virtualized REST/gRPC services, and transport over HTTP, JSON-RPC, WebSocket, SSE, stdio, and streamable-HTTP. Use it to register remote MCP servers, expose tools and virtual servers, and manage everything from a centralized admin UI or via programmatic endpoints.
You deploy ContextForge MCP Gateway to sit in front of your MCP servers or REST services. You can register remote MCP servers, expose their tools, and bundle them into virtual MCP servers. Use the Admin UI for real-time management if you enable it, or interact with the gateway programmatically via its HTTP APIs or the stdio wrapper for MCP clients that can’t use SSE streams.
Prerequisites: Python 3.10 or newer, and access to install Python packages. You can run the gateway from PyPI or in containers.
# 1️⃣ Create a project directory and a virtual environment
mkdir mcpgateway && cd mcpgateway
python3 -m venv .venv && source .venv/bin/activate
# 2️⃣ Install the gateway from PyPI
pip install --upgrade pip
pip install mcp-contextforge-gateway
# 3️⃣ Copy a sample environment file and customize it
cp .env.example .env
# Edit .env to set your admin credentials, JWT secret, database URL, and other settings
# 4️⃣ Run the gateway (example using uvx hot-start helper)
BASIC_AUTH_PASSWORD=pass \
MCPGATEWAY_UI_ENABLED=true \
MCPGATEWAY_ADMIN_API_ENABLED=true \
[email protected] \
PLATFORM_ADMIN_PASSWORD=changeme \
PLATFORM_ADMIN_FULL_NAME="Platform Administrator" \
uvx --from mcp-contextforge-gateway mcpgateway --host 0.0.0.0 --port 4444The gateway supports a wide set of configuration options via environment variables or a .env file. You can enable the Admin UI, API endpoints for admin tasks, and authentication settings, among many other features. Review settings for UI, authentication, federation, transport, A2A, tools, servers, and observability to tailor the gateway to your deployment. For example, you can enable OpenTelemetry traces to send data to Phoenix, Jaeger, or Zipkin, or you can enable the Admin UI to manage tools and virtual servers from a browser.
End-to-end demo shows how to expose a local MCP server through the gateway and register it as a virtual server. You can expose multiple protocols and transports, and you can invoke tools through the MCP client or via the stdio wrapper.
You can integrate an MCP server by either hiding behind an HTTP URL or by providing a stdio-based translate workflow that starts a local MCP server and exposes it through the gateway. A typical flow: start a local MCP server (for example, a time server) and expose it through a SSE endpoint, then register it with the gateway so clients can discover and invoke its tools.