ContextForge MCP Gateway

v1.0.0Cloud Servicesstable

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

agentsaiapi-gatewayasyncioauthentication-middleware
Share:
3,756
Stars
0
Downloads
0
Weekly
0/5

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

Federate MCP, REST, and gRPC services
Unified endpoint with security and rate-limiting
IBM

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx contextforge-mcp-gateway

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 32
2

Start 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-3
3

Generate 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-here
4

Register 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/gateways
5

Configure 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"
      }
    }
  }
}
6

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 | jq

ContextForge 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.

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.

Quick Config Preview

{ "mcpServers": { "contextforge-mcp-gateway": { "command": "npx", "args": ["-y", "contextforge-mcp-gateway"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides