fix: MCP ツール未設定によるオートレビュー・アシスタント失敗を修正#113
Open
MarikoMorimoto wants to merge 1 commit into
Open
Conversation
Claude Code v2.1.183 以降、allowedTools に未設定の MCP サーバーのツールが 含まれると即エラーになる挙動に変更された。 - claude-review.yml: mcp__github_inline_comment__create_inline_comment を --allowedTools から削除。このツールは action が allowedTools への明示的な 指定を検知してサーバーをセットアップする仕組みのため、削除することで セットアップ自体が行われなくなり問題を解消する。 - claude-assistant.yml: actions: read 権限を追加。これにより github_ci MCP サーバーが正常にセットアップされ、「Skipping CI server installation」 警告とそれに伴う即時エラーが解消される。 by Claude
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Claude Code v2.1.183 以降、
allowedToolsに未設定の MCP サーバーのツールが含まれると即エラーになる挙動に変更された。これにより、オートレビューと@claudeコメント両方が失敗していた問題を修正する。原因の詳細
claude-review.yml(オートレビュー)
claude_argsの--allowedToolsにmcp__github_inline_comment__create_inline_commentを手動指定していた。claude-code-actionはこのツール名を検知してインラインコメントサーバーをセットアップする仕組みになっているが、セットアップ後に.mcp.jsonが trusted ブランチの内容で上書き復元され、サーバー設定が消えた状態でツールがallowedToolsに残るため、v2.1.183+ が即クラッシュしていた。claude-assistant.yml(@claude コメント)
actions: read権限がないためgithub_ciMCP サーバーのインストールがスキップされるが、そのツール群(mcp__github_ci__*)はallowedToolsに残り、同様のエラーが発生していた。permissions: contents: read pull-requests: write issues: write id-token: write + actions: read影響範囲
@claude auto-review)が正常に動作するようになる@claudeコメントへの返答が正常に動作するようになる@claudeが CI ステータスを参照できるようになる(github_ciMCP サーバーが有効化されるため)by Claude