Skip to main content
MCP server CX Codex

mcp-gateway — Claude Code MCP server: what it does, how to install

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.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env STORAGE_BACKEND=<STORAGE_BACKEND> --env REDIS_URL=<REDIS_URL> --env SERVER_CONFIG_PATH=<SERVER_CONFIG_PATH> --transport stdio rupinder2-mcp-gateway -- uvx mcp-orchestration-gateway
Open on GitHub

What mcp-gateway does

The gateway unites downstream MCP servers running over stdio or HTTP into one interface. Instead of dumping every tool definition directly into the model context, it provides search utilities: tool_search, discover_tools, and call_remote_tool. Finding relevant actions works through BM25 natural language ranking or Python regular expressions.

Downstream tools receive an automatic namespace formatted as server_name__tool_name. External endpoints and their authentication tokens are configured in a JSON file. Schema caching runs in memory or connects to Redis when STORAGE_BACKEND is configured. Without a valid config file path in SERVER_CONFIG_PATH, the hub starts with an empty registry.

The process runs locally via stdio or serves requests over HTTP with configurable host and port settings. Execution is handled through uvx mcp-orchestration-gateway or standard Python modules.

What it helps with

  • Aggregate multiple MCP servers behind a single endpoint
  • Search tool schemas on demand without bloating prompt context
  • Route execution requests using namespaced tool identifiers
  • Connect downstream services across stdio and HTTP transports

Example prompts for the agent

  • Search for weather lookup tools using tool_search.
  • Inspect available functions on local-server using discover_tools.
  • Execute api-server__fetch_data through call_remote_tool with query arguments.

How to install mcp-gateway

Platform CLI

claude mcp add --env STORAGE_BACKEND=<STORAGE_BACKEND> --env REDIS_URL=<REDIS_URL> --env SERVER_CONFIG_PATH=<SERVER_CONFIG_PATH> --transport stdio rupinder2-mcp-gateway -- uvx mcp-orchestration-gateway

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-orchestration-gateway <command>

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 to install mcp-gateway in Claude Code?

Run claude mcp add mcp-gateway -- uvx mcp-orchestration-gateway. To supply environment variables, run `claude mcp add --env STORAGE_BACKEND=<STORAGE_BACKEND> --env REDIS_URL=<REDIS_URL> --env SERVER_CONFIG_PATH=<SERVER_CONFIG_PATH> --transport stdio rupinder2-mcp-gateway -- uvx mcp-orchestration-gateway`.

What does mcp-gateway do?

It acts as a central hub for downstream MCP servers, aggregating their schemas behind search and deferred loading tools. This keeps the agent context window lean.

Which storage backends does mcp-gateway support?

It defaults to an in-memory backend for development. For persistent schema caching, set STORAGE_BACKEND to redis and configure the connection via REDIS_URL.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor