-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
The github_inline_comment MCP server cannot be enabled in tag mode even when users explicitly request inline comment tools in their allowedTools. This is because tag mode passes an empty allowedTools array to prepareMcpConfig(), which prevents the MCP server installation logic from detecting that inline comment tools are requested.
To Reproduce
Steps to reproduce the behavior:
- Set up a GitHub Action workflow with Claude Code in tag mode
- Configure
claude_argsto include inline comment tools like --allowedTools
"mcp__github_inline_comment__create_inline_comment" - Trigger the action with @claude mention on a pull request
- Observe that the
github_inline_commentMCP server is not started and inline comment tools are not available
Expected behavior
When users explicitly request inline comment tools via claude_args or other configuration, the
github_inline_comment MCP server should be started and the tools should be available to Claude,
even in tag mode.
Screenshots
If applicable, add screenshots to help explain your problem.
Workflow yml file
name: Claude Code
on:
pull_request:
types: [opened, synchronize]
issue_comment:
types: [created]
jobs:
claude:
runs-on: ubuntu-latest
steps:
- uses: anthropics/claude-code-action@main
with:
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment"
API Provider
[ ] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex
Additional context
The root cause is in src/modes/tag/index.ts:123 where tag mode passes an empty array allowedTools: [] to prepareMcpConfig(). The MCP server installation logic in src/mcp/install-mcp-server.ts:73-74 only checks this passed array to determine if inline comment tools are requested, ignoring any tools specified in the user's claude_args.
The issue affects the logic at install-mcp-server.ts:131-135 where the github_inline_comment server is only included if hasInlineCommentTools is true, but this will always be false in tag mode regardless of user configuration.