Files
claude-code-action/test/modes
kashyap murali 45408b4058 feat: make MCP servers conditional in agent mode (#513)
* feat: make MCP servers conditional in agent mode

In agent mode, MCP servers (github_comment, github_ci) are now only included
when explicitly requested via allowedTools, rather than being auto-provisioned.

This change gives agent mode workflows complete control over which MCP
servers are included, preventing unwanted automatic provisioning of GitHub
integration tools.

Changes:
- Add agent mode detection in prepareMcpConfig
- Make github_comment server conditional based on allowedTools in agent mode
- Make github_ci server conditional based on allowedTools in agent mode
- Tag mode behavior remains unchanged (auto-inclusion)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: update agent mode test for conditional MCP behavior

Updated test expectation to match the new conditional MCP server behavior
where agent mode only includes MCP config when servers are actually needed.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Kashyap Murali <13315300+katchu11@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-29 16:40:14 -07:00
..
2025-07-23 20:35:11 -07:00