Repository navigation
Allow selecting which MCP tools to expose - #203
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe MCP command now supports tool allowlists and exclusions through CLI options or ChangesMCP tool filtering
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Client as MCP client
participant CLI as kagi mcp CLI
participant Runner as run_mcp
participant Config as McpServerConfig
Client->>CLI: Start with filter arguments
CLI->>Runner: Pass MCP arguments
Runner->>Config: Apply inclusion and exclusion filters
Client->>CLI: Request tools/list
CLI-->>Client: Return filtered tool catalog
Client->>CLI: Call a hidden tool
CLI-->>Client: Return unknown-tool JSON-RPC error
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The tool filters appear ready to merge after normal checks; empty filter values are rejected at startup. 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (5 passed)Full details: Docstring CoverageExplanation Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 3 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closes #201.
Add mutually exclusive --tools and --exclude-tools comma-separated filters, with KAGI_MCP_TOOLS as an environment allowlist. Either CLI flag overrides the environment. Trim whitespace, deduplicate names, reject unknown or empty names at startup, and retain deterministic catalog ordering.
Filter the shared tool catalog so stable and draft discovery and calls agree; hidden tools return an unknown-tool JSON-RPC error. An allowlist containing a mutating tool requires --enable-mutating-tools. With no filter, preserve existing behavior.
Add seven integration tests covering both wire protocols, exclusions, CLI/environment precedence, startup errors, mutation permission, hidden calls and server liveness, and empty catalogs. Document usage and update the changelog.
Validation for 4c6269b:
Summary by CodeRabbit
kagi mcpby allowing specific tools or excluding selected tools. Configure an allowlist withKAGI_MCP_TOOLSor command-line options.