fix: ship discover-and-add-mcps as a builtin command#409
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review.
Tip: disable this comment in your organization's Code Review settings.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded a new built-in command Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/configure/mcp-servers.md`:
- Around line 92-94: The docs incorrectly state project-scoped configs (e.g.,
`.vscode/mcp.json`) are "discovered but disabled by default"; update the copy to
reflect the actual behavior: discovered project-scoped MCP servers are
auto-loaded at startup unless the opt-out flag `experimental.auto_mcp_discovery:
false` is set, and keep mention of the interactive `/discover-and-add-mcps`
command as an alternative discovery/review flow; adjust the sentence near the
existing lines that reference "Project-scoped configs" and ensure
`experimental.auto_mcp_discovery` and the example `.vscode/mcp.json` are
referenced so users know how to opt out or manually review.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c7833869-ed6f-4318-a1f4-6ac8462601ba
📒 Files selected for processing (4)
.opencode/skills/discover-and-add-mcps/SKILL.mddocs/docs/configure/mcp-servers.mdpackages/opencode/src/installation/index.tspackages/opencode/test/installation/installation.test.ts
docs/docs/configure/mcp-servers.md
Outdated
| - **Home-directory configs** (e.g., `~/.claude.json`) are auto-enabled since they are user-owned. | ||
| - **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered but **disabled by default** — run `/discover-and-add-mcps` to review and enable them. | ||
|
|
There was a problem hiding this comment.
Docs appear to contradict current project-scope auto-discovery behavior.
The statement that project-scoped configs are “discovered but disabled by default” looks inconsistent with current behavior, which auto-loads discovered project-scope MCP servers unless experimental.auto_mcp_discovery is set to false. Please align this wording to avoid misleading users on security expectations.
Suggested doc adjustment
-- **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered but **disabled by default** — run `/discover-and-add-mcps` to review and enable them.
+- **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered and auto-loaded at startup. Run `/discover-and-add-mcps` to review what was found and manage entries.Based on learnings: auto_mcp_discovery intentionally auto-loads project-scoped MCP servers at startup without a per-server trust prompt, and experimental.auto_mcp_discovery: false is the opt-out.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Home-directory configs** (e.g., `~/.claude.json`) are auto-enabled since they are user-owned. | |
| - **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered but **disabled by default** — run `/discover-and-add-mcps` to review and enable them. | |
| - **Home-directory configs** (e.g., `~/.claude.json`) are auto-enabled since they are user-owned. | |
| - **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered and auto-loaded at startup. Run `/discover-and-add-mcps` to review what was found and manage entries. | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/docs/configure/mcp-servers.md` around lines 92 - 94, The docs
incorrectly state project-scoped configs (e.g., `.vscode/mcp.json`) are
"discovered but disabled by default"; update the copy to reflect the actual
behavior: discovered project-scoped MCP servers are auto-loaded at startup
unless the opt-out flag `experimental.auto_mcp_discovery: false` is set, and
keep mention of the interactive `/discover-and-add-mcps` command as an
alternative discovery/review flow; adjust the sentence near the existing lines
that reference "Project-scoped configs" and ensure
`experimental.auto_mcp_discovery` and the example `.vscode/mcp.json` are
referenced so users know how to opt out or manually review.
43e0e18 to
31d19c7
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/docs/configure/mcp-servers.md (1)
92-94:⚠️ Potential issue | 🟠 MajorDocumentation contradicts actual auto-load behavior.
Line 93 states project-scoped configs are "discovered but disabled by default" — this contradicts the actual behavior where project-scoped MCP servers are auto-loaded at startup without a per-server trust prompt. Users may incorrectly believe these servers won't run automatically, creating false security expectations.
Based on learnings:
auto_mcp_discoveryintentionally auto-loads project-scoped MCP servers at startup without a per-server trust prompt, andexperimental.auto_mcp_discovery: falseis the opt-out.📝 Proposed correction
- **Home-directory configs** (e.g., `~/.claude.json`) are auto-enabled since they are user-owned. -- **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered but **disabled by default** — run `/discover-and-add-mcps` to review and enable them. +- **Project-scoped configs** (e.g., `.vscode/mcp.json`) are discovered and **auto-loaded at startup**. Run `/discover-and-add-mcps` to review what was found and manage entries.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/docs/configure/mcp-servers.md` around lines 92 - 94, The docs incorrectly state project-scoped MCP configs are "disabled by default"; update the wording to reflect the actual behavior: project-scoped MCP servers are auto-loaded at startup without a per-server trust prompt, controlled by the auto_mcp_discovery setting, and can be opted out by setting experimental.auto_mcp_discovery: false (or the equivalent auto_mcp_discovery flag); locate and update the section referencing "project-scoped configs" / ".vscode/mcp.json" to clearly state auto-load behavior and the opt-out configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/docs/configure/mcp-servers.md`:
- Around line 92-94: The docs incorrectly state project-scoped MCP configs are
"disabled by default"; update the wording to reflect the actual behavior:
project-scoped MCP servers are auto-loaded at startup without a per-server trust
prompt, controlled by the auto_mcp_discovery setting, and can be opted out by
setting experimental.auto_mcp_discovery: false (or the equivalent
auto_mcp_discovery flag); locate and update the section referencing
"project-scoped configs" / ".vscode/mcp.json" to clearly state auto-load
behavior and the opt-out configuration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8707ce65-2256-40b9-b231-0b314877cbf0
📒 Files selected for processing (2)
.opencode/skills/discover-and-add-mcps/SKILL.mddocs/docs/configure/mcp-servers.md
✅ Files skipped from review due to trivial changes (1)
- .opencode/skills/discover-and-add-mcps/SKILL.md
7faaea0 to
36d59fa
Compare
Toast suggests `/discover-and-add-mcps` but the command only existed as a project-level `.opencode/command/` file not shipped with the package. Register it as a hardcoded command with a `.txt` template (same pattern as configure-claude) so it ships with every install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36d59fa to
dee4895
Compare
The command now ships as a builtin (merged in #409), so keep the docs and toast referencing it instead of removing them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tics Guard against AI-5975 regression (sql.analyze success:false on issues) and verify the new discover-and-add-mcps builtin command (#409) is registered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> https://claude.ai/code/session_01BUHCukhUhWNtR82r8iedHG
Summary
/discover-and-add-mcpsbut the command only existed as a project-level.opencode/command/file not shipped with the package. Register it as a hardcoded command with a.txttemplate (same pattern asconfigure-claude) so it ships with every install.Test plan
bun turbo typecheck— clean (pre-existingtracing-viewer-e2e.test.tserror on main, unrelated)/discover-and-add-mcpsresolves as a slash command in a fresh install🤖 Generated with Claude Code
Summary by CodeRabbit