-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Non-interactive mode leaves MCP servers enabled #4372
Copy link
Copy link
Closed
Labels
Stalearea/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualityarea/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationpriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.
Metadata
Metadata
Assignees
Labels
Stalearea/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualityarea/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationpriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.
Type
Fields
Give feedbackNo fields configured for issues without a type.
What happened?
If you run a non-interactive session with
gemini -p, it promises to keep only read-only tools enabled:gemini-cli/packages/cli/src/gemini.tsx
Lines 290 to 296 in ac8e985
However, it leaves all configured MCP servers enabled.
This will work when the Playwright MCP server is configured:
gemini -p "Use playwright to navigate to https://www.wietsevenema.eu and take a screenshot"What did you expect to happen?
Only read-only tools are enabled in non-interactive mode, unless you use the yolo flag.
Client information
Login information
No response
Anything else we need to know?
No response