Repository navigation
docs(mcp): troubleshoot Cloudflare blocking self-hosted MCP connections - #9554
BhagyaAmarasinghe wants to merge 1 commit into
Conversation
Add a setup-guide troubleshooting entry for self-hosted instances behind Cloudflare: AI bot policies (Agent), Bot Fight Mode vs Super Bot Fight Mode, WAF rules and Access, the paths MCP clients call without a browser, and the JWKS fetch that a Cloudflare challenge turns into 401s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughAdds troubleshooting guidance for self-hosted MCP servers behind Cloudflare. It identifies relevant requests, paths, and Cloudflare settings. It also documents the Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The troubleshooting guidance is ready to merge after normal documentation checks; the Cloudflare dashboard paths and page rendering remain unverified. 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
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 |
|



Fixes ENG-2221
What & why
Was: a self-hosted instance behind Cloudflare could fail to connect to ChatGPT or claude.ai with what looked like an OAuth error, and the docs never mentioned Cloudflare.
Now: the MCP setup guide explains why the browser works while the client fails, and which Cloudflare settings to change without disabling protection site-wide.
401on every tool call.Where to look
setup.mdx:210— Cloudflare menu paths and the list of paths clients callBreaking changes
None. Docs only.
Migrations & env
How this was tested
Rerun: none — docs only, no executable change.
Coverage
.well-knownroutes,/api/auth/oauth2/*and/api/mcponmainmodules/mcp/auth.tsreturns401and logsfailureSource: "jwks_fetch"Open gaps
keycloak-oidc.mdx.Risks
Note
AI model used —
claude-opus-5-5, reasoning effortxhigh.🤖 Generated with Claude Code