Skip to content

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

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

allenhutchison merged 2 commits into
google-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

@allenhutchison allenhutchison left a comment

Copy link
Copy Markdown
Contributor

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
mattKorwel pushed a commit that referenced this pull request Oct 22, 2025
…tive mode (#10194)

Co-authored-by: Allen Hutchison <adh@google.com>
thacio added a commit to thacio/auditaria that referenced this pull request Oct 23, 2025
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
…tive mode (#10194)

Co-authored-by: Allen Hutchison <adh@google.com>
@sripasg sripasg added the size/s A small PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants