Blog

n8n MCP Client node: connect a remote MCP server, and fix a missing auth header

Aperisa ยท 8 min read

If n8n can't resolve your MCP credential, it doesn't stop and tell you. In n8n 2.44.7 the code that builds the auth header catches the failure, returns no headers, and sends the request anyway. The first error you see is your server's 401.

So most "n8n MCP client auth" problems are really one question: what did n8n actually send? This post covers both n8n MCP nodes against a remote server over Streamable HTTP, then the known causes of a missing Authorization header, what n8n's source does in each case, and the one workaround an n8n engineer has given. Our view: treat a 401 from the n8n MCP Client as a client problem until a curl request proves the server wrong.

Checked on 2026-10-27 against n8n 2.44.7. The latest stable is now 2.45.7 (checked November 1, 2026), and the behavior described here is unchanged. Sources: the n8n docs, and the GitHub issues and forum threads linked below. We didn't run n8n for this post: every n8n behavior here comes from the docs, the 2.44.7 source or the linked threads.

Which n8n MCP node do you need?

n8n ships two client nodes, and they solve different problems.

  • MCP Client (mcpClient, current version 1.1) runs one tool as a normal workflow step. You pick the tool, then fill its parameters manually or as JSON. n8n added it in November 2025 (PR #21942).
  • MCP Client Tool (mcpClientTool, current version 1.4) is a sub-node for the AI Agent. It exposes the server's tools to the agent, which decides what to call.

One documentation trap: the MCP Client Tool docs still describe a single SSE Endpoint field. That is node version 1 only. In the 2.44.7 source, version 1.1 and later shows Endpoint plus Server Transport, and from 1.2 the transport defaults to HTTP Streamable, with Server Sent Events (Deprecated) as the other option. If your node only shows "SSE Endpoint", it is an old instance of the node at version 1.

How do you connect the n8n MCP Client Tool to a remote MCP server?

Five fields, in this order.

  1. Endpoint: the server's MCP URL, for example https://your-server.example/mcp.
  2. Server Transport: HTTP Streamable, unless the server only speaks the old SSE transport.
  3. Authentication: Bearer Auth, Header Auth, Multiple Headers Auth, MCP OAuth2 or None on node version 1.2 and later. Versions 1 and 1.1 offer only Bearer Auth, Header Auth and None. For a server that takes a static key, pick Bearer Auth.
  4. Credential: in a Bearer Auth credential, paste the raw token only. No Bearer prefix.
  5. Tools to Include: All, Selected or All Except. All is the default in the 2.44.7 source.

The MCP Client node has the same authentication list, a field called MCP Endpoint URL, and a Tool picker that takes a tool from the list or by ID. Both nodes have a Timeout option that defaults to 60,000 ms.

Run the agent once with a prompt that forces a tool call before building on it.

Why does the n8n MCP Client send no Authorization header?

There are three known causes. They look identical from the server side.

The credential can't be resolved, so the header is dropped

In getAuthHeaders, the credential lookup ends in .catch(() => null), and a null credential returns an empty header map. No credential means no headers, and the request still goes out.

The most common way to hit it is an expression in the credential. Two GitHub issues show the pattern:

  • #23421, opened December 18, 2025 on n8n 2.0.3: a Bearer credential set to an expression with a fallback token worked with Tools to Include set to All, but with Selected "no Authorization header is sent to the MCP server." A second user replied on January 26, 2026 that on 2.2.3 it happens "even when I allow for all tools." n8n's stale bot closed the issue on February 10, 2026 for lack of feedback. GitHub shows it as completed, but the stale bot closed it, with no linked commit or PR.
  • #30076, May 2026: a Bearer credential reading $('Get Access Token').item... failed with "No path back to node." An n8n engineer explained that when the MCP Client is attached to an AI Agent, the credential expression "is evaluated from the tool context," so .item has no paired-item path. The change released in 2.22.0 (PR #30465) only corrected the Bearer credential's notice, from "Custom Auth" to "Header Auth". The error text and the resolution itself were left unchanged.

The header has the wrong shape

The header builder treats the two single-header credential types differently:

  • Bearer Auth sends Authorization: Bearer <token>. It adds the prefix, so a token pasted as Bearer abc arrives as Bearer Bearer abc. An empty token sends no header at all.
  • Header Auth sends the Name and Value exactly as typed. With Name Authorization, the Value must include Bearer itself.

The header arrived, and the server rejected it

In a July 2026 forum thread, a user on n8n Cloud confirmed the header reached n8n intact and still got rejected by an MCP Server Trigger. The thread closed unresolved, which is why step 1 below leaves n8n out.

How do you fix a missing auth header in the n8n MCP Client?

Stop when the 401 goes away.

1. Test the server without n8n

curl -i https://your-server.example/mcp \
  -H "Authorization: Bearer $MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'

The Accept header is required by the Streamable HTTP spec. If this returns 401 or 403, the token or the server is the problem, and nothing in n8n will fix it. If it returns 200 with an InitializeResult, the fault is on the n8n side.

2. Check the credential's shape

Per the header builder, a Bearer Auth credential must hold the raw token with no Bearer prefix, and a Header Auth credential named Authorization must include Bearer in its Value. An empty token sends no header.

3. If the token comes from an earlier node, use .first()

Credentials accept expressions. For an MCP node attached to an AI Agent, an n8n engineer wrote in #30076 (May 14, 2026) that "the MCP Client is attached as a tool to the AI Agent, so the Bearer credential expression is evaluated from the tool context rather than as a normal downstream main node," and said to "please use a non-paired reference instead":

{{ $('Get Access Token').first().json.access_token }}

A 2025 forum thread reached the same answer: the user "was just missing first()". We haven't run this ourselves; it is the n8n engineer's guidance.

4. If you use Selected or All Except with a dynamic credential

Selected and All Except fetch the server's tool list to fill their pickers. #23421 reports that path dropping the header with a dynamic credential, and the reporter wrote that "everything works correctly" with All. Switching to All may help, but that is unconfirmed: the second user saw the failure with All too, and the reporter's expression used .item, the same pattern #30076 says fails in tool context. The issue was closed as stale without an n8n fix or workaround. If you hit it, add your version and a repro to a new issue.

5. Rule out an old node version

If the node shows "SSE Endpoint", it is version 1 and SSE only. In the 2.44.7 source the node's default version is 1.4, which has Endpoint and Server Transport.

Where does Aperisa fit?

Aperisa is a remote MCP server. Your data is available to any harness that connects over Streamable HTTP with a Bearer key: OpenClaw, Hermes, Cursor, Codex, Antigravity, n8n or your own code. Give each agent its own key and set what it can reach: which data areas, work or personal, and how much detail, from full records down to totals only. Aperisa enforces those limits on the server.

Debug the request, then the workflow

The header is the part of an n8n MCP request most likely to go missing without an error. Prove the server with curl, check the credential's shape, and for a token from an earlier node, follow the n8n engineer's .first() guidance. If you're new to the server side of this, start with what an MCP server is. For running several agents against one data source, see one record, many agents, and for why agents invent client facts in the first place, see AI agent hallucination.

Aperisa connects as a remote MCP server over Streamable HTTP with a Bearer key, and each key can be limited by data area and level of detail. Try it out.

FAQ

What is the difference between the n8n MCP Client node and the MCP Client Tool node? The MCP Client node runs one MCP tool as a normal workflow step, with the parameters you set. The MCP Client Tool node attaches to an AI Agent and lets the agent choose which of the server's tools to call. Both take an endpoint, a transport and the same authentication options.

Why does my n8n MCP Client get a 401 when the token is correct? Usually the request left n8n without the header you expected. In n8n 2.44.7, if the credential can't be resolved the node sends no Authorization header and does not fail first. A Bearer Auth credential also adds the word Bearer itself, so pasting "Bearer abc" produces "Bearer Bearer abc".

Can I use a token from an earlier node in an n8n MCP credential? Yes, credentials accept expressions. When the MCP node is attached to an AI Agent, use .first() instead of .item, for example {{ $('Get Token').first().json.access_token }}. n8n staff recommended this in GitHub issue #30076 because the tool context has no paired-item path back to that node.

Is the n8n bug about Selected tools dropping the auth header fixed? Not that we can find. Issue #23421 was closed by n8n's stale bot in February 2026 for lack of feedback, not by a fix (GitHub shows it as completed, but the stale bot closed it), and a second user reported the same problem on 2.2.3. n8n has not posted a fix or workaround on that issue.

Sources

Questions

What is the difference between the n8n MCP Client node and the MCP Client Tool node?

The MCP Client node runs one MCP tool as a normal workflow step, with the parameters you set. The MCP Client Tool node attaches to an AI Agent and lets the agent choose which of the server's tools to call. Both take an endpoint, a transport and the same authentication options.

Why does my n8n MCP Client get a 401 when the token is correct?

Usually the request left n8n without the header you expected. In n8n 2.44.7, if the credential can't be resolved the node sends no Authorization header and does not fail first. A Bearer Auth credential also adds the word Bearer itself, so pasting 'Bearer abc' produces 'Bearer Bearer abc'.

Can I use a token from an earlier node in an n8n MCP credential?

Yes, credentials accept expressions. When the MCP node is attached to an AI Agent, use .first() instead of .item, for example {{ $('Get Token').first().json.access_token }}. n8n staff recommended this in GitHub issue #30076 because the tool context has no paired-item path back to that node.

Is the n8n bug about Selected tools dropping the auth header fixed?

Not that we can find. Issue #23421 was closed by n8n's stale bot in February 2026 for lack of feedback, not by a fix (GitHub shows it as completed, but the stale bot closed it), and a second user reported the same problem on 2.2.3. n8n has not posted a fix or workaround on that issue.

Published

Keep reading