Summary
Please add a way to disable or scope MCP servers per-invocation in headless print mode (-p / --print) — e.g. a --no-mcp flag and/or a --mcp-config <path> override.
Motivation
We run agy -p programmatically (CI, multi-agent orchestration, scripted code reviews) where the prompt is self-contained and the model is explicitly instructed not to use tools. In that mode, the globally-configured MCP servers (~/.gemini/config/mcp_config.json) are pure startup overhead — every headless call still initializes all of them.
Concretely: on this machine a trivial agy -p "reply OK" takes ~9s, the same as a substantial review, because startup (incl. loading 6 MCP servers) dominates over the model round-trip. There is currently no CLI surface to skip MCP for a single call — --dangerously-skip-permissions only auto-approves, and there is no --no-mcp / --mcp-config flag (verified against agy --help on 1.0.6).
Proposed solutions (any one would help)
--no-mcp — start the print-mode session with zero MCP servers loaded.
--mcp-config <path> — point a single invocation at an alternate (e.g. empty) MCP config, leaving the global interactive config untouched.
- An env var (e.g.
AGY_CLI_NO_MCP=1) honored in print mode.
Why per-invocation (not global)
Disabling MCP globally would degrade the operator's interactive sessions, which legitimately use those tools. Automation just needs a per-call opt-out so headless calls aren't taxed by tooling they never invoke.
Environment
Thanks!
Summary
Please add a way to disable or scope MCP servers per-invocation in headless print mode (
-p/--print) — e.g. a--no-mcpflag and/or a--mcp-config <path>override.Motivation
We run
agy -pprogrammatically (CI, multi-agent orchestration, scripted code reviews) where the prompt is self-contained and the model is explicitly instructed not to use tools. In that mode, the globally-configured MCP servers (~/.gemini/config/mcp_config.json) are pure startup overhead — every headless call still initializes all of them.Concretely: on this machine a trivial
agy -p "reply OK"takes ~9s, the same as a substantial review, because startup (incl. loading 6 MCP servers) dominates over the model round-trip. There is currently no CLI surface to skip MCP for a single call —--dangerously-skip-permissionsonly auto-approves, and there is no--no-mcp/--mcp-configflag (verified againstagy --helpon 1.0.6).Proposed solutions (any one would help)
--no-mcp— start the print-mode session with zero MCP servers loaded.--mcp-config <path>— point a single invocation at an alternate (e.g. empty) MCP config, leaving the global interactive config untouched.AGY_CLI_NO_MCP=1) honored in print mode.Why per-invocation (not global)
Disabling MCP globally would degrade the operator's interactive sessions, which legitimately use those tools. Automation just needs a per-call opt-out so headless calls aren't taxed by tooling they never invoke.
Environment
Thanks!