N8n MCP Behind Cloudflare Challenges and Cloudflare Tunnels

I spent 4+ hours debugging why Claude Desktop’s built-in n8n MCP connector kept failing with “Couldn’t reach the MCP server” when my n8n instance sits behind Cloudflare Tunnel + Cloudflare Access WAF rules.

The fix turned was the custom rule syntax, it didn’t cover everything the MCP connector from Claude needed, I want to share this solution because I didn’t find it quickly and funny enough I fixed it with Kimi Coding, not Claude.

I create a custom rule to skip the challenges that covers the following:

(http.request.uri.path wildcard “/mcp-server/*”) or
(http.request.uri.path wildcard “/mcp-oauth/*”) or
(http.request.uri.path wildcard “/rest/push*”) or
(http.user_agent eq “Claude-User”)

Hope you find this useful!

1 Like