MCP Gateway · mikkoparkkola — Claude Code MCP server: one gateway for all tools
MCP Gateway is an MCP server that keeps the tool catalog behind a small set of meta-tools and calls backends on demand.
no license ★ 91 updated 2026-10-24
claude mcp add mcp-gateway -- docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1What MCP Gateway does
MCP Gateway keeps the full tool catalog off the context window. Instead of loading every backend definition, the agent works with 9 to 17 meta-tools: gateway_search_tools locates a backend tool and gateway_invoke calls it. Only the tools actually used end up in context.
Each connected MCP tool costs around 150 tokens of overhead per request, whether it runs or not. Twenty servers with a hundred tools burn about 15 000 tokens before the conversation even starts. The gateway removes that constant drain, but the search step adds a hop: a benchmark in the repo found no completed-task token saving. So the real reason to run it is catalog capacity, policy and routing.
The binary is written in Rust with no unsafe code. Behind it you can connect MCP servers over stdio or HTTP plus more than 110 REST capabilities such as GitHub or Stripe. Personal use is free; running it commercially needs a separate license.
What it helps with
- keep hundreds of tools out of the context window
- find backend tools with a search call instead of loading all definitions
- route calls across MCP and REST backends from one place
- drop the fixed token cost of unused tools
Example prompts for the agent
- Search for a documentation tool with
gateway_search_toolsand call it throughgateway_invoke. - Put all my MCP servers behind MCP Gateway and list what tools are reachable.
- Run
mcp-gateway doctorand tell me what is failing.
How to install MCP Gateway
Platform CLI
claude mcp add mcp-gateway -- docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1Platform CLI
codex mcp add mcp-gateway -- docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1Config file
{
"mcpServers": {
"mcp-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/mikkoparkkola/mcp-gateway:3.5.1"
]
}
}
}Config file
{
"servers": {
"mcp-gateway": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/mikkoparkkola/mcp-gateway:3.5.1"
]
}
}
}Platform CLI
gemini mcp add mcp-gateway docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MCP Gateway
How do I install MCP Gateway in Claude Code?
Run claude mcp add mcp-gateway -- docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1. The agent can then talk to the gateway.
What does MCP Gateway do?
It hides all connected MCP servers and REST APIs behind a compact surface of 9 to 17 meta-tools. The agent finds tools with gateway_search_tools and runs them with gateway_invoke.
How is the gateway different from connecting servers directly?
Direct connections load every tool definition into each request, even unused ones. The gateway loads only the meta-surface and calls backends on demand. The extra search hop can cost tokens on completed tasks.
Similar MCP servers
All MCP servers for Agent setup: memory, context, orchestration →MCP Gateway by other authors comes first.