Help Connecting Claude Desktop (n8n-mcp) to n8n Cloud - API Key Issue

Hello everyone,

I’m setting up the n8n-mcp server to connect Claude Desktop with my n8n Cloud instance, and I’ve hit a final wall with the API authentication. I’m hoping someone who has connected to n8n Cloud from an external tool can point me in the right direction.

My Setup & The Issue:

I’m following the n8n-mcp setup guide, which requires an N8N_API_URL and N8N_API_KEY to be configured.

When I go to my n8n Cloud dashboard and generate a key from Settings > API, the key I receive is in a JWT format (it starts with eyJ...). I’ve seen some other community discussions that mention this key format, so it seems to be standard for some accounts.

However, when I use this JWT-style key, the n8n-mcp tool is unable to connect.

The Specific Error:

When I test the connection manually in my terminal (using npx n8n-mcp with the credentials set as environment variables), the tool immediately fails with the error: failed to do n8n health check.

This seems to confirm that the n8n-mcp tool cannot authenticate with my n8n instance using this type of key.

My Question:

For connecting to an n8n Cloud instance from an external application like this, what is the correct procedure?

  1. Is there a different method or a different screen to generate a long-lived, permanent static API key?
  2. Or, is there a specific configuration I need to use for n8n-mcp to make it compatible with this JWT-style key?

I’ve already tried regenerating the key multiple times using different browsers and incognito mode, but the result is always the same eyJ... key. Any help or clarification on how n8n Cloud authentication is supposed to work for these external tools would be greatly appreciated!

Summary of My Setup:

  • Goal: Connect Claude Desktop to n8n Cloud.
  • Tool: n8n-mcp from GitHub.
  • n8n Instance: Cloud (https://jonahabis.app.n8n.cloud)
  • API Key Format I Receive: JWT (starts with eyJ...)
  • Error Message: failed to do n8n health check

Thank you!

I am not sure I had the same issue as you, but I have been trying to get Claude Desktop on Windows 11 to connect to the MCP trigger node on my selfhosted N8N with authentication. I followed the docs and was seeing server disconnect messages in the claude MCP logs. Looking at the example templates, they didn’t use authentication. With authentication set to ‘none’ Claude desktop would form a stable connection and could query the tools and access them when prompted.

Not quite sure of the root cause but suspect a timing issue causing the token to be rejected or malformed in some way.

in the docs MCP Trigger node it suggests the following mcp config for Claude.

{
  "mcpServers": {
    "n8n": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "<MCP_URL>",
        "--header",
        "Authorization: Bearer ${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "<MCP_BEARER_TOKEN>"
      }
    }
  }
}

mcp-remote should be dynamically downloaded and run by npx, but I think at this point it goes wrong.

Work around

first install mcp-remote on the machine where you are using Claude desktop and test it. Open CMD or powershell and:

npm install -g mcp-remote

mcp-remote --version

You probably need to add the folder mcp-remote is installed in to to you path environment variable certainly if you see something like the term ‘mcp-remote’ is not recognized… when checking the version you will

To work out which folder it in run

npm root -g

That should return something like C:\Users\\AppData\Roaming\npm\node_modules

You need to add that path but up one folder to your path variable i.e.

  1. Press Win + R, type sysdm.cpl
  2. Go to Advanced → Environment Variables
  3. Under User variables, edit Path
  4. Add: C:\Users\\AppData\Roaming\npm
  5. close

Try to test again, ensure you get the version reported.

mcp-remote --version

Now modify the Claude MCP config for command to call mcp-remote directly like:

{
  "mcpServers": {
    "n8n": {
      "command": "mcp-remote",
      "args": [
        "<MCP_URL>",
        "--header",
        "Authorization: Bearer <MCP_BEARER_TOKEN>}"
      ]
    }
  }
}

I put my bearer token directly on the Authorization argument. I have not tried putting it in the env section per the docs but that might work.

From here usual stuff ensure the token is the same both sides and the N8N credential is set to bearer. I have the workflow active and use the production URL.

Make sure you quit Claude in the sys tray and restart. I found reloading the MCP config from the developer menu in Claude desktop a bit unreliable your milage may vary.

Prompt Claude as see if it can recognise the MCP server and can query the tools available

Good luck AK

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.