Skip to content

feat(cli): Adds the ability to run MCP prompt commands in non-interactive mode#10194

Merged
allenhutchison merged 2 commits intogoogle-gemini:mainfrom
capachino:headless-mcp-prompts
Oct 21, 2025
Merged

feat(cli): Adds the ability to run MCP prompt commands in non-interactive mode#10194
allenhutchison merged 2 commits intogoogle-gemini:mainfrom
capachino:headless-mcp-prompts

Conversation

@capachino
Copy link
Copy Markdown
Contributor

TLDR

Adds the ability to run MCP prompts (i.e. MCP slash commands) in non-interactive mode #10177

Note that #8305 added support for custom commands (e.g. extension .toml) but not MCP prompts.

Dive Deeper

CommandService was designed in such a way to make this very easy to add.

Reviewer Test Plan

Make sure 1) custom commands and 2) MCP prompts work e.g.

For https://github.com/gemini-cli-extensions/security
node gemini-cli/packages/cli -p "/security:analyze" --yolo

For https://github.com/GoogleCloudPlatform/cloud-run-mcp
node gemini-cli/packages/cli -p "/deploy" --yolo
node gemini-cli/packages/cli -p "/deploy" (when trust is true)

Testing Matrix

🍏 🪟 🐧
npm run X
npx
Docker
Podman - -
Seatbelt X - -

Linked issues / bugs

Fixes #10177

@capachino
Copy link
Copy Markdown
Contributor Author

@jerop @allenhutchison can one of you please take a look at this PR? It is a simple fix for #10177

cc: @codrienne

@capachino capachino force-pushed the headless-mcp-prompts branch from adec49f to cbb1319 Compare October 21, 2025 19:46
@capachino capachino force-pushed the headless-mcp-prompts branch from cbb1319 to e1c73b9 Compare October 21, 2025 20:14
Copy link
Copy Markdown
Contributor

@allenhutchison allenhutchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Sorry about the delay.

@allenhutchison allenhutchison added this pull request to the merge queue Oct 21, 2025
Merged via the queue into google-gemini:main with commit ed9f714 Oct 21, 2025
25 checks passed
mattKorwel pushed a commit that referenced this pull request Oct 22, 2025
…tive mode (#10194)

Co-authored-by: Allen Hutchison <adh@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Gemini CLI extensions (MCP prompts) in headless/non-interactive mode

2 participants