Skip to content

n8n self-hosted: "Authorization with the MCP server failed" after successful OAuth — ofid_413d9cbff0b8d515 #396

Description

@SamyJoe-1

What happened?

After completing the OAuth flow, Claude.ai returns:
"Authorization with the MCP server failed. You can check your credentials and permissions."
Reference code: ofid_413d9cbff0b8d515

OAuth completes successfully on n8n's side — the Connected clients tab shows "Claude" as authorized. But Claude.ai never completes the post-auth MCP handshake.

What did you expect to happen?

Connector shows as Connected in Claude.ai and n8n MCP tools become available in conversations.

Steps to reproduce

  1. Self-hosted n8n v2.18.5 on a VPS behind Nginx
  2. Enable Instance-level MCP in n8n Settings
  3. Mark at least one workflow as Available in MCP
  4. Go to Claude.ai → Settings → Connectors → Add custom connector
  5. Enter URL: https://n8n.e-global-trading.com/mcp-server/http
  6. Click Connect → OAuth flow starts → redirected to n8n → authorize → redirected back to Claude.ai
  7. Claude.ai shows: "Authorization with the MCP server failed"
  8. n8n Connected clients tab shows Claude as successfully connected

Area

MCP Connector (adding/managing servers)

MCP Server (if applicable)

https://n8n.e-global-trading.com/mcp-server/http

Error messages or logs

Claude.ai error: "Authorization with the MCP server failed. You can check your credentials and permissions."
Reference: ofid_413d9cbff0b8d515

curl test result (confirms server works correctly):
POST https://n8n.e-global-trading.com/mcp-server/http
Headers: Authorization: Bearer <mcp_token>, Accept: application/json, text/event-stream
Response: HTTP 200 — valid MCP initialize response received ✅

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions