I’m trying to connect Claude.ai to my self-hosted n8n via Instance-level MCP (OAuth). The OAuth flow appears to complete — I get redirected to n8n, I authorize, and n8n shows Claude as a Connected client. But Claude always returns “Authorization with the MCP server failed.”
I also tried creating a separate workflow with an MCP Server Trigger node (no auth) and using that Production URL as a custom connector in Claude. Same error.
My setup
-
n8n version: 2.12.3
-
Database: SQLite (default)
-
n8n EXECUTIONS_PROCESS setting: default
-
Running n8n via: npm (global install, Node.js v22.21.1 via nvm)
-
Operating system: macOS 14.2.1 (Apple Silicon)
n8n runs as a macOS LaunchAgent and is exposed to the internet via Cloudflare Tunnel (cloudflared 2025.11.1) routing n8n.jeffzeb.com → http://127.0.0.1:5678.
What I’ve tried
-
Confirmed endpoint is reachable:
curl -Ireturns HTTP 401 with Bearer auth as expected -
Added
N8N_PROXY_HOPS=1andN8N_TRUST_PROXY=true(fixed anERR_ERL_UNEXPECTED_X_FORWARDED_FORerror in the MCP SDK) -
Created a Cloudflare Transform Rule to set
Origin: https://n8n.jeffzeb.com(known issue with tunnels stripping the scheme) -
Revoked old Connected clients and re-added the connector fresh
-
Tested in both Safari and Chrome
-
Tested both Instance-level MCP (OAuth) and MCP Server Trigger (no auth) — both fail with the same error
-
Workflows are enabled for MCP access and active
Key observation
OAuth completes on n8n’s side (Connected clients tab confirms it), but Claude doesn’t recognize the connection as successful. This happens with both the instance-level MCP URL and a standalone MCP Server Trigger URL.
Has anyone successfully connected Claude.ai (not Claude Desktop) to a self-hosted n8n behind a Cloudflare Tunnel? Any ideas what could be failing after the OAuth callback? Also possible issue is on the Claude side, so I’ve reached out to their help support as well.