From bef768d8139caaba82c95213dff29f9125ba2eda Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 19 Jun 2026 19:09:21 +0000 Subject: [PATCH] pilot(mcp): thread REVIEW_MCP_ALLOWED_TOOLS into the review job env (#681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_agentic already passes --mcp-config for every claude tier (REVIEW_MCP_CONFIG auto-defaults to the committed .github/review-mcp.json), but engine.sh only adds the configured MCP tools to --allowed-tools when REVIEW_MCP_ALLOWED_TOOLS is set. The reusable workflow never mapped that variable into the job env, so the CLI connected the GitHub MCP server yet blocked run_secret_scanning as "not permitted" on every tier — the secret scan never actually executed. Map it via the same `vars.X || default` pattern used by the rest of the env block. Set the repo variable REVIEW_MCP_ALLOWED_TOOLS=mcp__github__* to permit the secret-scanning tools. REVIEW_MCP_CONFIG is intentionally NOT set here: it auto-defaults in engine.sh to the committed config, and an empty env value would disable that default. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e --- .github/workflows/pr-review.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 7d943b1e1..9d58434b3 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -171,6 +171,13 @@ jobs: MAX_REVIEW_CYCLES: ${{ vars.MAX_REVIEW_CYCLES || '3' }} MAX_PRS: ${{ vars.MAX_PRS || '10' }} CANDIDATE_LIMIT: ${{ vars.CANDIDATE_LIMIT || '250' }} + # Opt-in GitHub MCP review (issue #679 / pilot #681). REVIEW_MCP_CONFIG + # auto-defaults in engine.sh to the committed .github/review-mcp.json when + # present (do NOT set it here — an empty value would disable that default). + # The configured MCP tools must be allow-listed or the CLI connects the + # server yet blocks the tool calls ("not permitted"); set the repo variable + # REVIEW_MCP_ALLOWED_TOOLS (e.g. `mcp__github__*`) to permit them. + REVIEW_MCP_ALLOWED_TOOLS: ${{ vars.REVIEW_MCP_ALLOWED_TOOLS || '' }} # Pin via vars.CLAUDE_CODE_VERSION for fully reproducible caching; default # 'latest' caches an install indefinitely under that key — flush via the # Actions cache UI or bump the variable to pick up new releases.