Skip to main content
MCP server CX Codex

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

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-gateway -- docker run -i --rm ghcr.io/mikkoparkkola/mcp-gateway:3.5.1
Open on GitHub

What 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_tools and call it through gateway_invoke.
  • Put all my MCP servers behind MCP Gateway and list what tools are reachable.
  • Run mcp-gateway doctor and 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.1

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

MCP Gateway PanosSalt A gateway that sits between the AI assistant and your databases, checking identity, filtering tools by role and writing every call to an audit log. CX Codex +1 ★ 6repo stars Agent MCP Gateway roddutra Agent MCP Gateway is an MCP server proxy between agents and MCP servers. It loads three tools instead of every definition and grants each subagent access by policy. CX Codex +1 ★ 42repo stars mcp-gateway rupinder2 mcp-gateway connects multiple downstream MCP servers into a single hub. It searches tools via BM25 or regex and loads schemas on demand to keep the model context window clean. CX Codex +1 ★ 6repo stars gateway-workers cloudflare gateway-workers — a skill for building, debugging, and reviewing Cloudflare Workers triggered by Forward actions in Gateway HTTP policies. Work with GatewayMiddleware, context types, and request continuation. CX Codex +1 25,500installs gpt2api-openai-gateway reason-machines The gpt2api-openai-gateway skill walks your agent through deploying a self-hosted Anthropic-compatible gateway over chatgpt.com and wiring up an account pool. CX Codex +1 385installs llm-gateway devops-skills The llm-gateway skill walks you through deploying one API gateway in front of several LLMs: load balancing, rate limits, keys, caching and spend tracking. CX Codex +1 370installs logfire-gateway pydantic The logfire-gateway Claude Code skill routes an application's model requests through Pydantic AI Gateway. It activates for requests to connect a Gateway key or configure a provider snippet. CX Codex +1 232installs

Project sponsors

Companies that keep this analytics open