Skip to content
Gemini CLI

Agent MCP Gateway for Gemini CLI

io.github.roddutra/agent-mcp-gateway

On-demand tool discovery for all your MCPs and per-subagent MCP controls to preserve context window.

client:Gemini CLI transport:stdio runtime:pypi

Install Agent MCP Gateway in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "agent-mcp-gateway": {
      "command": "uvx",
      "args": [
        "agent-mcp-gateway"
      ],
      "env": {
        "GATEWAY_MCP_CONFIG": "<GATEWAY_MCP_CONFIG>",
        "GATEWAY_RULES": "<GATEWAY_RULES>",
        "GATEWAY_DEFAULT_AGENT": "<GATEWAY_DEFAULT_AGENT>",
        "GATEWAY_DEBUG": "<GATEWAY_DEBUG>"
      }
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

Agent MCP Gateway in other clients