ContextForge MCP Gateway
A feature-rich gateway and proxy that federates MCP, REST, and gRPC services into a unified endpoint for AI clients. It enables virtualization of legacy APIs as MCP-compliant tools while providing built-in security, rate-limiting, and OpenTelemetry o
What is ContextForge MCP Gateway?
ContextForge MCP Gateway is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to feature-rich gateway and proxy that federates mcp, rest, and grpc services into a unified endpoint for ai clients. it enables virtualization of legacy apis as mcp-compliant tools while providing built...
A feature-rich gateway and proxy that federates MCP, REST, and gRPC services into a unified endpoint for AI clients. It enables virtualization of legacy APIs as MCP-compliant tools while providing built-in security, rate-limiting, and OpenTelemetry o
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A feature-rich gateway and proxy that federates MCP, REST, a
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx contextforge-mcp-gatewayConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use ContextForge MCP Gateway
ContextForge MCP Gateway (by IBM) is a production-grade API gateway and proxy that federates MCP, REST, and gRPC services into a single unified MCP endpoint for AI clients. It virtualizes legacy REST APIs and gRPC services as MCP-compliant tools — complete with auto-schema extraction — while providing centralized JWT/OAuth authentication, rate limiting, retry policies, and OpenTelemetry observability. Teams use it to expose their entire internal API surface to AI agents through one governed, auditable endpoint without rewriting existing services.
Prerequisites
- Docker and Docker Compose installed (recommended deployment method), or Python 3.10+ with uv/pip for local install
- OpenSSL available to generate a secure JWT_SECRET_KEY (32+ characters)
- An MCP client such as Claude Desktop or MCP Inspector to connect to the gateway
- Network access to the backend MCP servers or REST/gRPC APIs you want to federate
Generate a secure JWT secret key
Before starting the gateway, generate a cryptographically secure secret. This is required for JWT token signing and must be at least 32 characters.
openssl rand -hex 32Start the gateway with Docker
Run the gateway container with the required security environment variables. Replace the placeholders with real credentials. The admin UI will be available at port 4444.
docker run -d --name mcpgateway -p 4444:4444 \
-e MCPGATEWAY_UI_ENABLED=true \
-e JWT_SECRET_KEY=your-32-plus-char-secret-here \
-e [email protected] \
-e PLATFORM_ADMIN_PASSWORD=changeme \
ghcr.io/ibm/mcp-context-forge:1.0.0-RC-3Generate an API token for client authentication
Create a JWT token using the provided utility. This token is used to authenticate MCP client requests to the gateway. The --exp flag sets the expiry in minutes (10080 = 7 days).
python3 -m mcpgateway.utils.create_jwt_token \
--username [email protected] \
--exp 10080 \
--secret your-32-plus-char-secret-hereRegister a backend MCP server or REST API
Use the REST admin API (or the admin UI at http://localhost:4444) to register your backend services. For an MCP server, POST to /gateways with its SSE URL. For REST APIs, provide the OpenAPI spec URL for automatic schema extraction.
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"my_server","url":"http://localhost:8003/sse"}' \
http://localhost:4444/gatewaysConfigure your MCP client to connect to the gateway
Point your MCP client at the unified gateway endpoint. Each registered server gets a UUID-based MCP path. Use the Swagger UI at /docs to discover endpoint UUIDs, or list them via the admin API.
{
"mcpServers": {
"contextforge-gateway": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:4444/mcp"],
"env": {
"BEARER_TOKEN": "your-jwt-token-here"
}
}
}
}Verify tools are discoverable
List available tools through the admin API to confirm registered backend services are exposed. You can also use MCP Inspector with Streamable HTTP transport pointed at the gateway URL.
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:4444/tools | jqContextForge MCP Gateway Examples
Client configuration
MCP client config connecting to a locally running ContextForge gateway via mcp-remote with bearer token authentication.
{
"mcpServers": {
"contextforge-gateway": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:4444/mcp",
"--header",
"Authorization:Bearer your-jwt-token-here"
]
}
}
}Prompts to try
Example prompts once backend services are registered with the gateway.
- "List all available tools registered in the gateway"
- "Call the customer-lookup tool with customer_id=12345"
- "Show me the observability metrics for requests to the payments API in the last hour"
- "Register a new REST API at https://api.example.com/openapi.json as an MCP tool set"
- "What gRPC services are currently federated through the gateway?"Troubleshooting ContextForge MCP Gateway
Container fails to start with JWT_SECRET_KEY error
The JWT_SECRET_KEY must be at least 32 characters. Generate one with 'openssl rand -hex 32' and pass it exactly as generated. Do not use the example placeholder values in production.
Registered backend server shows as unreachable
Ensure the backend MCP server or REST API URL is reachable from within the Docker container network. Use the host's Docker bridge IP (typically 172.17.0.1) instead of 'localhost' when the backend runs on the host machine.
MCP client cannot authenticate to the gateway
Verify the Bearer token has not expired (check the --exp value used when generating it). Regenerate a token with a longer expiry and update the client configuration. Ensure the JWT_SECRET_KEY matches between the token generator and the running gateway.
Frequently Asked Questions about ContextForge MCP Gateway
What is ContextForge MCP Gateway?
ContextForge MCP Gateway is a Model Context Protocol (MCP) server that feature-rich gateway and proxy that federates mcp, rest, and grpc services into a unified endpoint for ai clients. it enables virtualization of legacy apis as mcp-compliant tools while providing built-in security, rate-limiting, and opentelemetry o It connects AI assistants to external tools and data sources through a standardized interface.
How do I install ContextForge MCP Gateway?
Follow the installation instructions on the ContextForge MCP Gateway GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with ContextForge MCP Gateway?
ContextForge MCP Gateway works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is ContextForge MCP Gateway free to use?
Yes, ContextForge MCP Gateway is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
ContextForge MCP Gateway Alternatives — Similar Cloud Services Servers
Looking for alternatives to ContextForge MCP Gateway? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up ContextForge MCP Gateway in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use ContextForge MCP Gateway?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.