mcp-gateway
MCP Gateway and Registry for AI agents.
claude mcp add --transport http tomeai-mcp-gateway https://registry.wemcp.cn/mcp/{mcp_server_name}How to use
MCP-Gateway acts as a central connector that exposes multiple MCP server endpoints either directly via public online endpoints or through remote accessors. The gateway provides two online server types: streamable_http (fetch) for on-demand, streamable data from the registry and sse (amap-maps) for server-sent events from the same registry. For remote usage, you can connect to MCP servers through the mcp-remote tool via npx, pointing to either the standard registry URL or its /sse variant, enabling access to MCP servers without hosting them locally. The gateway configuration demonstrates how to reference these endpoints and how to supply necessary authentication tokens when using remote access (GITHUB_PERSONAL_ACCESS_TOKEN). When you start the gateway with this configuration, it will route requests to the appropriate upstream MCP server depending on the endpoint you query. Tools available include: streamable_http fetch endpoints, sse map endpoints, and remote access via mcp-remote through npx with optional GitHub token authentication.
How to install
Prerequisites:
- Node.js (18.x recommended) and npm installed on your machine
- Optional: Docker if you prefer containerized deployment
Installation steps:
- Install Node.js and npm from the official website or via your system package manager.
- (Optional) If you want a local package install, install the gateway package globally: npm install -g mcp-gateway
- Create a configuration file (for example config.json) and populate it with the mcp_config content from this README.
- Run the gateway:
- If using a global package or local npm install: npx mcp-gateway --config config.json
- If you prefer Docker (assuming an image named mcp-gateway is available): docker run -i --rm -v $(pwd)/config.json:/app/config.json mcp-gateway:latest --config /app/config.json
- Verify the gateway is running by querying the exposed endpoints described in the config (fetch, amap-maps, or the remote mcpjungle variants).
Notes:
- Ensure your GITHUB_PERSONAL_ACCESS_TOKEN is kept secret when using remote mcp-remote via npx, and do not commit it to repository or share in public files.
- Adjust URLs in the config to your actual registry if you are not using the default registry.wemcp.cn.
Additional notes
Tips and common issues:
- If you see authentication errors with remote endpoints, double-check your GITHUB_PERSONAL_ACCESS_TOKEN and token scopes.
- For the streamable_http and sse endpoints, ensure the registry supports cross-origin requests if you’re calling from a browser-based client.
- When using the remote mcp-remote through npx, network latency can affect how quickly MCP updates propagate; consider caching or preferring local endpoints if ultra-low latency is required.
- The placeholder {mcp_server_name} in URLs is replaced at runtime by the actual MCP server you’re targeting. Ensure you provide the correct server name in requests.
Related MCP Servers
metamcp
MCP Aggregator, Orchestrator, Middleware, Gateway in one docker
MCPJungle
Self-hosted MCP Gateway for AI agents
dynamic-shell
Dynamic Shell Command MCP Server
hoot
MCP Testing Tool — Like Postman, but for the Model Context Protocol.
MCP-Manager-GUI
MCP Toggle is a simple GUI tool to help you manage MCP servers across clients seamlessly.
muster
MCP tool management and workflow proxy