feat(opencode): add claude-code-mcp server#103
Conversation
The preflight loop was comparing the full output (including colored log lines) against 'PASS' instead of just the final status line. This caused preflight to always fail even when all checks passed. - Use tail -n 1 to extract only the PASS/FAIL result - Suppress stderr from run_preflight_checks to keep capture clean - Align ShellCheck severity with linters-local.sh (warnings only)
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughTwo shell scripts are updated: agent config generation adds claude-code-mcp entries and per-agent tool defaults for macOS, while quality-loop execution adjusts ShellCheck severity, makes secretlint conditional, and refactors preflight result extraction and loop exit logic. Changes
Sequence Diagram(s)(omitted — changes are scripting and control-flow refinements that don't introduce multi-component sequential interactions warranting a diagram) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1).agent/scripts/*.sh⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-12-22T01:24:53.937ZApplied to files:
📚 Learning: 2025-12-22T01:25:03.138ZApplied to files:
📚 Learning: 2025-12-22T01:24:53.937ZApplied to files:
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the OpenCode environment by integrating the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Thu Jan 15 00:59:11 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request introduces the claude-code-mcp server and enables its tools for primary agents. It also fixes a bug in the preflight check loop in quality-loop-helper.sh. The changes look good overall. I've identified a couple of areas for improvement. First, in generate-opencode-agents.sh, pinning the version for the new MCP server package instead of using @latest would improve stability. Second, in quality-loop-helper.sh, the fix for the preflight loop silences all stderr output, which could hide important errors and make debugging difficult. I've provided suggestions for both points.
| if [[ "$result" == "PASS" ]]; then | ||
| local result_status | ||
| result_status=$(run_preflight_checks "$auto_fix" 2>/dev/null | tail -n 1 | tr -d '\r') |
There was a problem hiding this comment.
Redirecting stderr to /dev/null with 2>/dev/null will suppress all error messages from run_preflight_checks and the tools it calls. This can make debugging failures very difficult, as the reason for a failure (e.g., a missing command) will be hidden. To maintain debuggability, it's better to let stderr be printed to the console. The tail -n 1 already correctly isolates the result from stdout.
| result_status=$(run_preflight_checks "$auto_fix" 2>/dev/null | tail -n 1 | tr -d '\r') | |
| result_status=$(run_preflight_checks "$auto_fix" | tail -n 1 | tr -d '\r') |
| if 'claude-code-mcp' not in config['mcp']: | ||
| config['mcp']['claude-code-mcp'] = { | ||
| "type": "local", | ||
| "command": ["npx", "-y", "@steipete/claude-code-mcp@latest"], |
There was a problem hiding this comment.
Using @latest for the npm package can introduce unexpected breaking changes, making the script less stable. It's a best practice to pin dependencies to a specific version to ensure predictable behavior. Please consider replacing @latest with a specific version of @steipete/claude-code-mcp, for example 0.1.0 which appears to be the current version.
| "command": ["npx", "-y", "@steipete/claude-code-mcp@latest"], | |
| "command": ["npx", "-y", "@steipete/claude-code-mcp@0.1.0"], |
🤖 Augment PR SummarySummary: Adds the Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
| """ | ||
| tools = AGENT_TOOLS.get(display_name, DEFAULT_TOOLS.copy()) | ||
| # Enabled in all main agents (user request) | ||
| tools.setdefault("claude-code-mcp_*", True) |
There was a problem hiding this comment.
| if 'claude-code-mcp' not in config['mcp']: | ||
| config['mcp']['claude-code-mcp'] = { | ||
| "type": "local", | ||
| "command": ["npx", "-y", "@steipete/claude-code-mcp@latest"], |
There was a problem hiding this comment.
| if [[ "$result" == "PASS" ]]; then | ||
| local result_status | ||
| result_status=$(run_preflight_checks "$auto_fix" 2>/dev/null | tail -n 1 | tr -d '\r') |
There was a problem hiding this comment.
2>/dev/null here will suppress any stderr output from run_preflight_checks (including diagnostics from tools invoked inside it), which can make failures harder to understand. Since the PASS/FAIL parsing is already based on stdout, consider whether dropping stderr is intentional.
🤖 Was this useful? React with 👍 or 👎
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Thu Jan 15 01:04:44 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
claude-code-mcp_*tools globally for all primary agents (Build+, AI-DevOps, SEO, Plan+, etc.)quality-loop-helper.shChanges
generate-opencode-agents.shclaude-code-mcpMCP server entry withbunxcommandclaude-code-mcp_*: Trueto all primary agent tool configsquality-loop-helper.shtail -n 1linters-local.shTesting
./setup.shto deploy changes~/.config/opencode/opencode.jsonPost-merge
Users need to:
claude --dangerously-skip-permissionsonce to accept upstream termsSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.