docs: add MCP auto-discovery section to security FAQ#346
Conversation
Documents the new auto-discovery feature (#311) in the security FAQ, covering supported config sources, trust model for home vs project-scoped servers, security hardening, and how to disable the feature. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a new "What is MCP auto-discovery?" section to the security FAQ documenting automatic discovery of MCP server definitions from installed AI tools, including the security model (home-directory configs auto-enabled, project-scoped configs require approval), hardening measures against injection attacks, and configuration options. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 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🧪 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/reference/security-faq.md`:
- Line 171: Update the sentence about project-scoped MCP configs to reflect that
they are auto-loaded by default (not disabled); mention the opt-out flag
experimental.auto_mcp_discovery: false to disable auto-loading, and clarify that
the /discover-and-add-mcps tool is used for manual discovery/approval workflows
or when auto-discovery is turned off rather than as a required step for every
server.
🪄 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: 1db58543-eb67-469d-9cf0-3dabebcc00fc
📒 Files selected for processing (1)
docs/docs/reference/security-faq.md
| **Security model:** | ||
|
|
||
| - **Home-directory configs** (your personal machine config) are treated as trusted and auto-enabled, since you installed them. | ||
| - **Project-scoped configs** (checked into a repo) are discovered but **disabled by default**. You must explicitly approve them via the `/discover-and-add-mcps` tool before they run. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for the discover-and-add-mcps tool definition
# Search for tool registrations and definitions related to MCP discovery
rg -n 'discover.*add.*mcp|discover-and-add-mcp' packages/opencode/src/
# Also check tool registration patterns
ast-grep --pattern 'name: "discover-and-add-mcps"' packages/opencode/src/
ast-grep --pattern '"discover-and-add-mcps"' packages/opencode/src/Repository: AltimateAI/altimate-code
Length of output: 420
Project-scoped MCP configs are auto-loaded by default, not disabled.
The documentation states that project-scoped configs are "disabled by default" and must be "explicitly approved via the /discover-and-add-mcps tool before they run." However, the implemented behavior auto-loads them at startup without per-server trust prompts. The opt-out is the experimental.auto_mcp_discovery: false flag. The tool name /discover-and-add-mcps is correctly referenced; update the description to match the actual default behavior (auto-loaded) and clarify when the tool is used versus when auto-discovery occurs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/docs/reference/security-faq.md` at line 171, Update the sentence about
project-scoped MCP configs to reflect that they are auto-loaded by default (not
disabled); mention the opt-out flag experimental.auto_mcp_discovery: false to
disable auto-loading, and clarify that the /discover-and-add-mcps tool is used
for manual discovery/approval workflows or when auto-discovery is turned off
rather than as a required step for every server.
81d34b1 to
934fdf5
Compare
What does this PR do?
Adds a new "What is MCP auto-discovery?" section to the security FAQ documenting the feature introduced in #311. Covers:
auto_mcp_discovery: falseType of change
How did you verify your code works?
src/mcp/discover.tsand adversarial tests to ensure accuracy of documented security controlsChecklist
🤖 Generated with Claude Code
Summary by CodeRabbit