fix: isolate review MCP config from project .mcp.json#114
Conversation
Use --mcp-config + --strict-mcp-config CLI flags to pass only the review-progress MCP server, ignoring the project's .mcp.json entirely. This fixes intermittent "outils MCP indisponibles" errors during reviews caused by third-party MCP servers (e.g. gitnexus remote URL) in the project config timing out and blocking all MCP initialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
src/tests/units/frameworks/claude/ensureProjectMcpConfig.test.ts
Outdated
Show resolved
Hide resolved
Code Review - PR #114 (fix: isolate review MCP config from project .mcp.json)Date: 2026-03-06 | Reviewer: Claude Code (Mentor Mode) | Branch: Executive Summary
Overall Score: 8/10 - Clean, focused fix that solves a real operational problem. Minor cleanup needed. AnalysisThis MR solves a concrete operational problem: third-party MCP servers (e.g. gitnexus) defined in the project's Solution: Instead of writing to the project's The approach is correct and clean. Important Corrections (before merge)1. Dead code:
|
| Aspect | Observation |
|---|---|
| Problem solving | --strict-mcp-config is the correct fix - isolates without side effects |
| Test coverage | buildMcpConfigJson tested with 3 focused cases (happy path, structure, error) |
| Code clarity | JSDoc + inline comments explain the rationale |
| Minimal diff | Focused change, minimal blast radius |
Pre-Merge Checklist
- Remove dead
ensureProjectMcpConfigfunction and its tests - Fix relative import to use
@/alias in test file - Clean up
.gitignorecomment referencingensureProjectMcpConfig -
yarn verifypasses without error
[REVIEW_STATS:blocking=0:warnings=2:suggestions=1:score=8]
Address PR #114 review feedback: - Remove unused ensureProjectMcpConfig() and its 5 tests (dead code after --mcp-config switch) - Fix relative import to use @/ alias convention - Clean up .gitignore comment referencing removed function Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Follow-up Review - PR #114Date: 2026-03-06 Blocking Issues Verification
New Problems DetectedNo new problems detected in the modifications. The refactor is clean:
Final Verdict
[REVIEW_STATS:blocking=0:warnings=0:suggestions=0:score=9] ✅ READY TO MERGE |
Summary
--mcp-config+--strict-mcp-configCLI flags to inject only thereview-progressMCP server during automated reviewsensureProjectMcpConfig()call frominvokeClaudeReview()— the project's.mcp.jsonis no longer read or modifiedbuildMcpConfigJson()function with 3 dedicated testsRoot cause
MR 4883 reported
"outils MCP indisponibles"during an initial review. Investigation revealed the project's.mcp.jsoncontained a remotegitnexusMCP server (manually added, unrelated to ReviewFlow). When that server was unreachable, Claude Code's MCP initialization timed out entirely, making all MCP tools unavailable — includingreview-progress.Test plan
buildMcpConfigJson()(valid JSON, single server, throws on missing path)ensureProjectMcpConfigtests still pass🤖 Generated with Claude Code