docs(mcp): add troubleshooting guidance and missing env vars#346
docs(mcp): add troubleshooting guidance and missing env vars#346
Conversation
|
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. 📝 WalkthroughWalkthroughAdded four environment variable options to server instructions and docs (OASTOOLS_ALLOW_PRIVATE_IPS, OASTOOLS_MAX_INLINE_SIZE, OASTOOLS_MAX_LIMIT, OASTOOLS_MAX_JOIN_SPECS), expanded troubleshooting guidance, and appended an allow-hint to error messages that block private/loopback IPs during safe client requests. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
=======================================
Coverage 84.78% 84.78%
=======================================
Files 193 193
Lines 27249 27255 +6
=======================================
+ Hits 23102 23108 +6
Misses 2828 2828
Partials 1319 1319
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/mcpserver/server.go`:
- Around line 36-41: Update the ambiguous inline-size error message in the
Troubleshooting text so the two numeric placeholders are distinct (e.g., replace
the duplicated "<N>" placeholders in "inline content size <N> bytes exceeds
maximum <N> bytes" with "<actual>" and "<limit>" or similar), ensuring the
message unambiguously shows the actual size and the configured limit; modify the
string in internal/mcpserver/server.go where that troubleshooting text is
declared so any validation or verification scripts that match the
plugin/CLAUDE.md wording continue to work.
In `@plugin/CLAUDE.md`:
- Line 191: Update the inline-size error template so the two placeholders are
distinct and unambiguous: replace the duplicated "<N>" placeholders in the
string "inline content size <N> bytes exceeds maximum <N> bytes" with clearly
named placeholders (e.g., "<ACTUAL_BYTES>" and "<MAX_BYTES>" or "{actual}" and
"{max}") and update any documentation examples to use the new placeholders and a
concrete example like "inline content size 15000000 bytes exceeds maximum
10485760 bytes" so readers can immediately map values to their meaning.
5f2da3b to
0a6bb1d
Compare
Add OASTOOLS_ALLOW_PRIVATE_IPS, OASTOOLS_MAX_INLINE_SIZE, OASTOOLS_MAX_LIMIT, and OASTOOLS_MAX_JOIN_SPECS to both the MCP protocol-level instructions and plugin CLAUDE.md. Add troubleshooting sections so agents know how to resolve SSRF blocks and inline size errors instead of falling back to workarounds like curl. Make error messages self-documenting for LLM agent consumption: - SSRF block errors include "set OASTOOLS_ALLOW_PRIVATE_IPS=true to allow" - Inline size errors include "use file input instead, or set OASTOOLS_MAX_INLINE_SIZE to increase" - Join spec limit errors include "set OASTOOLS_MAX_JOIN_SPECS to increase" - Invalid strategy errors list all valid values Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0a6bb1d to
94e93f2
Compare
Summary
OASTOOLS_ALLOW_PRIVATE_IPS,OASTOOLS_MAX_INLINE_SIZE,OASTOOLS_MAX_LIMIT,OASTOOLS_MAX_JOIN_SPECS) to both the MCP protocol-levelserverInstructionsandplugin/CLAUDE.mdconfig tablesafeclient.goandinput.go)isBlockedIP())Motivation
When an LLM agent uses
spec.urlto fetch a spec from a private/internal host, the SSRF protection blocks it with"blocked request to private/loopback IP: <host> (<ip>)". Without guidance, agents fall back to workarounds likecurl— bypassing the MCP tools entirely. The troubleshooting sections explicitly guide agents to the proper env var fix.Test plan
go build ./cmd/oastools— compiles cleanmake check— all 8498 tests pass, 0 lint errors, 0 markdown lint errorsinitializeresponse verified: built from source, sent JSON-RPC initialize request over stdio, confirmedinstructionsfield contains the new env vars and troubleshooting sectionsafeclient.go:36,58andinput.go:202config.go:59-62server.go,plugin/CLAUDE.md, anddocs/mcp-server.md🤖 Generated with Claude Code