MCP OAuth registration fails when connecting Claude.ai

I’m trying to connect Claude.ai to my self-hosted n8n instance (v2.30.7) using the Instance-level MCP (Preview) feature, but I keep getting this error from Claude:
“Couldn’t register with n8n’s sign-in service. You can try again, or add an OAuth Client ID in the connector settings.”
Setup details:

  • n8n is self-hosted, running locally, exposed via ngrok (https tunnel)
  • Instance-level MCP is Enabled
  • I’ve added the required redirect URL (https://claude.ai/api/mcp/auth_callback) under OAuth settings and saved it successfully
  • I have one workflow published with a Chat Trigger, and MCP access is enabled for it
  • ngrok logs show Claude successfully fetching /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource (200 OK), but no POST request to a /register endpoint ever appears — followed by 401 Unauthorized on /mcp-server/http
  • “Connected clients” tab always shows “No OAuth clients connected”
    It looks like Claude isn’t able to complete dynamic client registration with my n8n instance. Is this a known limitation of the Preview MCP feature, or is there a manual way to register an OAuth client / get a Client ID and Secret for n8n so I can enter it manually on the Claude side?
    Thanks in advance!

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Elma_Akter Welcome!
n8n builds the OAuth endpoint URLs it advertises in the .well-known documents (authorize, token, and the dynamic-registration endpoint) from its own base URL, which behind ngrok is still defaulting to http://localhost:5678. Claude fetches those docs fine over the tunnel, which is your 200s, then POSTs client registration to the localhost registration endpoint it read from them, so the request never reaches your instance, no /register call shows up in ngrok, and /mcp-server/http returns 401 with no client connected.

Point the public URL at your ngrok https address so the advertised endpoints are reachable, then restart:

N8N_HOST=<your-subdomain>.ngrok-free.app
N8N_PROTOCOL=https
N8N_EDITOR_BASE_URL=https://<your-subdomain>.ngrok-free.app/
WEBHOOK_URL=https://<your-subdomain>.ngrok-free.app/
N8N_PROXY_HOPS=1

Restart n8n, reopen Settings > Instance-level MCP, copy the OAuth server URL again, and reconnect from Claude. Dynamic client registration will now POST to the public ngrok endpoint and the client will register, so you won’t need to enter a client ID manually.