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.
What is Context Forge?
Context Forge is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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...
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.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An AI Gateway, registry, and proxy that sits in front of any
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-context-forgeConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Context Forge
Context Forge (IBM MCP Context Forge) is an AI gateway, registry, and proxy that federates MCP, A2A (Agent-to-Agent), and REST/gRPC APIs behind a single governed endpoint. It provides centralized tool discovery, authentication (JWT/OAuth/Basic), rate limiting, retry policies, and OpenTelemetry observability across all connected services. Organizations use it to expose their entire internal API and tool ecosystem to AI agents in a secure, auditable way without rewriting existing services as MCP servers.
Prerequisites
- Docker and Docker Compose installed (recommended), or Python 3.10+ with uv for PyPI install
- A secure JWT_SECRET_KEY of 32+ characters (generate with openssl rand -hex 32)
- An MCP client such as Claude Desktop or MCP Inspector
- Network connectivity to the backend APIs or MCP servers you want to federate
Clone the repository and start with Docker Compose
Docker Compose brings up the full stack including the gateway, database, and admin UI. This is the fastest way to get a working deployment.
git clone https://github.com/IBM/mcp-context-forge.git
cd mcp-context-forge
docker compose up -dSet required environment variables
Configure the critical security variables before production use. At minimum, set JWT_SECRET_KEY, PLATFORM_ADMIN_EMAIL, and PLATFORM_ADMIN_PASSWORD. The gateway binds to port 4444 by default.
export JWT_SECRET_KEY=$(openssl rand -hex 32)
export [email protected]
export PLATFORM_ADMIN_PASSWORD=changemeGenerate an API bearer token
Create a JWT token for authenticating MCP client requests. The --exp parameter controls expiry in minutes (10080 = 7 days).
python3 -m mcpgateway.utils.create_jwt_token \
--username [email protected] \
--exp 10080 \
--secret $JWT_SECRET_KEYRegister backend services via the admin API
Register existing MCP servers, REST APIs, or gRPC services. For REST APIs the gateway auto-extracts the schema from OpenAPI specs. For MCP servers, provide the SSE endpoint URL.
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"my_mcp_server","url":"http://localhost:8003/sse"}' \
http://localhost:4444/gatewaysConfigure your MCP client to use the unified gateway
Point your MCP client at the gateway's unified MCP endpoint. All registered tools are accessible through this single connection.
{
"mcpServers": {
"mcp-context-forge": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:4444/mcp",
"--header", "Authorization:Bearer your-jwt-token"]
}
}
}Explore the admin UI and Swagger docs
The web admin UI is available at http://localhost:4444 and the Swagger API reference at http://localhost:4444/docs. Use these to manage registered services, view metrics, and test tool calls.
Context Forge Examples
Client configuration
MCP client configuration for connecting to a locally running Context Forge gateway with JWT authentication.
{
"mcpServers": {
"mcp-context-forge": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:4444/mcp",
"--header",
"Authorization:Bearer your-jwt-token-here"
]
}
}
}Prompts to try
Example prompts for working with the Context Forge gateway once services are registered.
- "List all tools currently registered in the gateway and group them by service"
- "Use the inventory-lookup tool to find stock levels for product SKU-42"
- "Register the REST API at https://api.internal.example.com/openapi.json as a set of MCP tools"
- "Show me a summary of tool call success rates and latencies from the last 24 hours"
- "What A2A agents are currently connected through the gateway?"Troubleshooting Context Forge
Gateway fails to start: JWT_SECRET_KEY too short
The key must be at least 32 characters. Run 'openssl rand -hex 32' to generate a valid key, set it in your environment or Docker run command, and restart the container.
Backend MCP server registered but shows offline
When running in Docker, use the host machine's Docker bridge IP (e.g., 172.17.0.1) instead of 'localhost' for backend service URLs. Verify the backend service is actually running and accepting connections on its SSE endpoint.
Bearer token rejected with 401 Unauthorized
Confirm the token was generated with the same JWT_SECRET_KEY that the gateway is using. Check token expiry with a JWT decoder at jwt.io. Regenerate a token if expired.
Frequently Asked Questions about Context Forge
What is Context Forge?
Context Forge is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Context Forge?
Follow the installation instructions on the Context Forge GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Context Forge?
Context Forge works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Context Forge free to use?
Yes, Context Forge is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Context Forge Alternatives — Similar Cloud Services Servers
Looking for alternatives to Context Forge? 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 Context Forge 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 Context Forge?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.