MCP ServerSTDIOOfficialv0.2.5

Agent MCP Gateway MCP Server

Route tool calls across multiple MCP servers with per-agent context isolation and on-demand discovery. For developers managing complex multi-agent systems who need fine-grained control over which tools each agent can access.

io.github.roddutra/agent-mcp-gateway

Agent MCP Gateway runs locally over stdio. Test it on your machine with MCP Playground Desktop:

Hosted URL

Local install

Transport

STDIO

Auth

No auth required

What the Agent MCP Gateway MCP server does

How models use it and what it is built for.

Route tool calls across multiple MCP servers with per-agent context isolation and on-demand discovery. For developers managing complex multi-agent systems who need fine-grained control over which tools each agent can access.

Connect to Agent MCP Gateway

Local install — runs as a subprocess.

uvx agent-mcp-gateway==0.2.5

Environment variables

Configuration this server reads at startup.

  • GATEWAY_MCP_CONFIG

    Path to MCP servers configuration file (default: .mcp.json)

  • GATEWAY_RULES

    Path to gateway access control rules file (default: .mcp-gateway-rules.json)

  • GATEWAY_DEFAULT_AGENT

    Default agent ID when not provided in tool calls

  • GATEWAY_DEBUG

    Enable debug mode and expose diagnostic tools (default: false)

Resources

Where to find authoritative docs and source for Agent MCP Gateway.

Example prompts for Agent MCP Gateway

Paste any of these into Agent Studio after connecting Agent MCP Gateway.

  • List all available tools across my configured MCP servers
  • Set up access control rules so the data-agent can only call database tools
  • Show me which MCP servers are currently connected and their status
  • Enable debug mode to see diagnostic information about tool routing

Agent MCP Gateway MCP server — FAQ

Common questions about connecting and running Agent MCP Gateway.

  • What is the agent-mcp-gateway and why would I use it?

    It's a gateway that routes tool calls to multiple MCP servers and enforces per-agent access control. Use it when you have multiple agents that need different subsets of tools to avoid wasting context window on irrelevant capabilities.

  • How do I configure which MCP servers the gateway connects to?

    Create a `.mcp.json` configuration file (or set GATEWAY_MCP_CONFIG to a custom path) that lists your MCP servers. The gateway will discover and route tools from all configured servers.

  • How do I restrict which tools each agent can access?

    Create a `.mcp-gateway-rules.json` file (or set GATEWAY_RULES to a custom path) that defines access control rules per agent. The gateway will enforce these rules when routing tool calls.

  • What does the GATEWAY_DEFAULT_AGENT environment variable do?

    It sets a fallback agent ID when a tool call doesn't explicitly specify which agent is making the request. This ensures tool routing works even if the agent context is missing.

  • How do I troubleshoot tool routing or connection issues?

    Set GATEWAY_DEBUG=true to enable debug mode, which exposes diagnostic tools and logs. This will help you see which servers are connected, which tools are available, and how calls are being routed.

Skip the local setup — run MCP in your browser

MCP Playground runs 10,000+ hosted MCP servers — GitHub, Linear, Notion, Stripe, Sentry and more — across Claude, GPT, Gemini, DeepSeek and 60+ AI models. Compare model answers side-by-side, save agent presets, share runs. Zero install.

Open Agent Studio

In your browser

MCP Agent Studio

Server has a public URL? Chat with 90+ models on it, watch every tool call, and compare models side by side.

Open MCP Agent Studio →

On your computer

MCP Playground Desktop

Server runs on localhost or over stdio? The browser can’t reach it. The desktop app can, with 90+ models in Agent Studio. Download free

Related servers

More on MCP Playground