Skip to main content

Module gemini_mcp

Module gemini_mcp 

Source
Expand description

The MCP servers a Gemini turn gets: AgentMux’s own agentmux server and the catalog servers, from the .mcp.json the launch wrote in the agent’s folder, as a settings file Gemini loads on top of its own. SPEC_CONNECTORS_MCP_WHAT_AGENTS_RUN_2026_10_10.md §5.

The file is per agent, under srv’s data folder, and named by the GEMINI_CLI_SYSTEM_SETTINGS_PATH variable the turn is launched with. Gemini merges its mcpServers with the folder’s .gemini/settings.json and the user’s, so nothing the person set up is replaced.

A server’s env is expanded by Gemini from its own environment, and it hands a server none of the variables named like a key or token unless the server’s env asks for them. So a ${VAR} stays a reference, and the agentmux server asks for every AGENTMUX_ variable the agent was launched with by reference, not by value: a key the agent has is not copied into a second file. A header is expanded against the same stripped environment, so a server whose header holds a variable is left out (it would be sent empty) and named in the log.