n8n - 💡(How to fix) Fix MCP Client Tool cannot connect to external MCP servers verified spec-compliant by MCP Inspector [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28924Fetched 2026-04-23 07:44:08
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
commented ×1labeled ×1mentioned ×1referenced ×1

n8n's built-in MCP Client Tool node cannot connect to external MCP servers that are verified spec-compliant by the official MCP Inspector. This report provides a reproducible test case and a standalone harness so maintainers can verify the failure mode without setting up an MCP server of their own.

Possibly related / possibly distinct from:

  • #19835 — Cannot read properties of undefined (reading 'inputType') in v1.112.0
  • #14539 — Could not connect to your MCP server (closed as not planned)

Error Message

  • Executing the node produces "Error in 31ms" in Executions history with no further detail available in the UI.
  • Tool dropdown fails in ~1 second with error: "Could not load list — Could not connect to your MCP server. Authentication failed."
  • Executing the node produces "Error in 31ms" in Executions history, no further UI detail.
  • error: all

Root Cause

n8n's built-in MCP Client Tool node cannot connect to external MCP servers that are verified spec-compliant by the official MCP Inspector. This report provides a reproducible test case and a standalone harness so maintainers can verify the failure mode without setting up an MCP server of their own.

Possibly related / possibly distinct from:

  • #19835 — Cannot read properties of undefined (reading 'inputType') in v1.112.0
  • #14539 — Could not connect to your MCP server (closed as not planned)

Fix Action

Fix / Workaround

Happy to run any diagnostic branch, share additional server logs, or test proposed patches.

Code Example

// legacy-sse-harness.js
const BASE_URL = "https://mcp.brilliantdirectories.com";

async function run() {
  const sseResp = await fetch(`${BASE_URL}/sse`, {
    method: "GET",
    headers: { accept: "text/event-stream" },
  });
  if (!sseResp.ok) { console.log("FAIL:", sseResp.status); process.exit(1); }

  const reader = sseResp.body.getReader();
  const decoder = new TextDecoder();
  let buffer = "", endpoint = null;

  while (true) {
    const { value, done } = await reader.read();
    if (done) break;
    buffer += decoder.decode(value, { stream: true });

    let frameEnd;
    while ((frameEnd = buffer.indexOf("\n\n")) !== -1) {
      const frame = buffer.slice(0, frameEnd);
      buffer = buffer.slice(frameEnd + 2);
      const lines = frame.split("\n");
      let event = "message", data = "";
      for (const line of lines) {
        if (line.startsWith("event:")) event = line.slice(6).trim();
        else if (line.startsWith("data:")) data += line.slice(5).trim();
      }

      if (event === "endpoint" && !endpoint) {
        endpoint = data;
        const postUrl = new URL(endpoint, BASE_URL).toString();
        fetch(postUrl, {
          method: "POST",
          headers: { "content-type": "application/json" },
          body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
        }).catch(() => {});
      } else if (event === "message") {
        const parsed = JSON.parse(data);
        if (parsed.result?.tools) {
          console.log(`PASS — ${parsed.result.tools.length} tools`);
          process.exit(0);
        }
      }
    }
  }
}
run();

---

GET /sse HTTP 200, content-type=text/event-stream
<-- frame event="endpoint" data=/messages?sessionId=4f8b3f16-...
--> POST https://mcp.brilliantdirectories.com/messages?sessionId=...
POST /messages HTTP 202
<-- frame event="message" data={"jsonrpc":"2.0","id":1,"result":{"tools":[...
PASS173 tools, 172ms total
RAW_BUFFERClick to expand / collapse

Bug Description

MCP Client Tool cannot connect to external MCP servers verified spec-compliant by MCP Inspector

Summary

n8n's built-in MCP Client Tool node cannot connect to external MCP servers that are verified spec-compliant by the official MCP Inspector. This report provides a reproducible test case and a standalone harness so maintainers can verify the failure mode without setting up an MCP server of their own.

Possibly related / possibly distinct from:

  • #19835 — Cannot read properties of undefined (reading 'inputType') in v1.112.0
  • #14539 — Could not connect to your MCP server (closed as not planned)

Server under test

Publicly reachable (no auth required for initialize / tools/list):

  • https://mcp.brilliantdirectories.com/sse — legacy two-endpoint SSE transport
  • https://mcp.brilliantdirectories.com/ — modern Streamable HTTP transport

Advertises 173 tools. Stateless per-request auth on tools/call via X-Api-Key + X-BD-Site-URL headers (not required for connection handshake).

What works against this server

  • MCP Inspector (reference implementation) — SSE transport → tools populate → successful
  • Claude Desktop (remote MCP) — Streamable HTTP → successful
  • Cursor (remote MCP) — Streamable HTTP → successful
  • Claude Code CLI (claude mcp add --transport http) — successful
  • Windsurf, Cline — Streamable HTTP → successful
  • curl — direct JSON-RPC POST — successful
  • Standalone SSE handshake harness (Node, reproduction below) — successful in ~170ms

What doesn't work

n8n MCP Client Tool node, tested with:

  • Transport: SSE (Deprecated) → URL https://mcp.brilliantdirectories.com/sse
  • Transport: HTTP Streamable → URL https://mcp.brilliantdirectories.com/
  • Authentication: Multiple Headers Auth credential with X-Api-Key + X-BD-Site-URL
  • Tested on current n8n Cloud (version not surfaced in UI, tested within the last 24h)

Symptoms:

  • Clicking the Tool dropdown fails in ~1 second with generic "Could not load list — Could not connect to your MCP server. Authentication failed."
  • Zero requests reach the server, verified via Cloudflare Workers real-time logs on the destination. The failure happens inside n8n's process before any HTTP request is made.
  • Executing the node produces "Error in 31ms" in Executions history with no further detail available in the UI.

Standalone reproduction harness

A Node.js script that drives the full legacy SSE two-endpoint handshake against the same URL n8n is pointed at. Runs against any Node 18+ with global fetch, no dependencies:

// legacy-sse-harness.js
const BASE_URL = "https://mcp.brilliantdirectories.com";

async function run() {
  const sseResp = await fetch(`${BASE_URL}/sse`, {
    method: "GET",
    headers: { accept: "text/event-stream" },
  });
  if (!sseResp.ok) { console.log("FAIL:", sseResp.status); process.exit(1); }

  const reader = sseResp.body.getReader();
  const decoder = new TextDecoder();
  let buffer = "", endpoint = null;

  while (true) {
    const { value, done } = await reader.read();
    if (done) break;
    buffer += decoder.decode(value, { stream: true });

    let frameEnd;
    while ((frameEnd = buffer.indexOf("\n\n")) !== -1) {
      const frame = buffer.slice(0, frameEnd);
      buffer = buffer.slice(frameEnd + 2);
      const lines = frame.split("\n");
      let event = "message", data = "";
      for (const line of lines) {
        if (line.startsWith("event:")) event = line.slice(6).trim();
        else if (line.startsWith("data:")) data += line.slice(5).trim();
      }

      if (event === "endpoint" && !endpoint) {
        endpoint = data;
        const postUrl = new URL(endpoint, BASE_URL).toString();
        fetch(postUrl, {
          method: "POST",
          headers: { "content-type": "application/json" },
          body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
        }).catch(() => {});
      } else if (event === "message") {
        const parsed = JSON.parse(data);
        if (parsed.result?.tools) {
          console.log(`PASS — ${parsed.result.tools.length} tools`);
          process.exit(0);
        }
      }
    }
  }
}
run();

Observed output on commodity consumer internet:

GET /sse HTTP 200, content-type=text/event-stream
<-- frame event="endpoint" data=/messages?sessionId=4f8b3f16-...
--> POST https://mcp.brilliantdirectories.com/messages?sessionId=...
POST /messages HTTP 202
<-- frame event="message" data={"jsonrpc":"2.0","id":1,"result":{"tools":[...
PASS — 173 tools, 172ms total

MCP Inspector verification

npx @modelcontextprotocol/inspector → Transport: SSE → URL: https://mcp.brilliantdirectories.com/sse → tools list populates with 173 entries. Same URL n8n fails against.

Diagnostic questions

  1. Pre-flight validation: is there a credential-validation or node-config validation step in the MCP Client Tool node that can fail silently before attempting the HTTP call? Users report sub-second failures with no outbound network traffic (verified by inspecting the destination server's edge logs).

  2. Response-size sensitivity: does the node have internal buffer limits on initialize or tools/list responses? The server under test returns a 77KB initialize response (includes a 76KB instructions field, valid per MCP spec), and a ~400KB tools/list response.

  3. Header forwarding on SSE transport: when using Multiple Headers Auth + SSE transport, are the custom headers attached to both the GET /sse request and the follow-up POST /messages?sessionId=X request? Or only one of them?

Happy to run any diagnostic branch, share additional server logs, or test proposed patches.

Environment

  • n8n Cloud, tested within the last 24 hours (exact version not surfaced in UI)
  • Client: MCP Client Tool node, SSE and Streamable HTTP transports both tested
  • n8n Cloud web UI (any desktop browser)

To Reproduce

  1. In n8n Cloud, add an MCP Client Tool node to a workflow
  2. Set Server Transport to SSE (Deprecated)
  3. Set MCP Endpoint URL to https://mcp.brilliantdirectories.com/sse (a publicly reachable MCP server, no auth required for initialize or tools/list)
  4. Authentication: Multiple Headers Auth (or None — not required for connection handshake)
  5. Save the node, then click the Tool dropdown to populate the available tools

Also tested with Transport = HTTP Streamable → URL https://mcp.brilliantdirectories.com/ — same failure.

Result:

  • Tool dropdown fails in ~1 second with error: "Could not load list — Could not connect to your MCP server. Authentication failed."
  • Executing the node produces "Error in 31ms" in Executions history, no further UI detail.
  • Zero HTTP requests reach the server, verified via the destination server's real-time edge logs. Failure happens inside n8n before any network call.

Standalone reproduction (no n8n required):

This Node.js script (Node 18+, no deps) drives the same legacy SSE handshake against the same URL and succeeds in ~170ms with all 173 tools. Proves the server is reachable and spec-compliant:

const BASE_URL = "https://mcp.brilliantdirectories.com";

async function run() {
  const sseResp = await fetch(`${BASE_URL}/sse`, {
    method: "GET",
    headers: { accept: "text/event-stream" },
  });
  if (!sseResp.ok) { console.log("FAIL:", sseResp.status); process.exit(1); }

  const reader = sseResp.body.getReader();
  const decoder = new TextDecoder();
  let buffer = "", endpoint = null;

  while (true) {
    const { value, done } = await reader.read();
    if (done) break;
    buffer += decoder.decode(value, { stream: true });

    let frameEnd;
    while ((frameEnd = buffer.indexOf("\n\n")) !== -1) {
      const frame = buffer.slice(0, frameEnd);
      buffer = buffer.slice(frameEnd + 2);
      const lines = frame.split("\n");
      let event = "message", data = "";
      for (const line of lines) {
        if (line.startsWith("event:")) event = line.slice(6).trim();
        else if (line.startsWith("data:")) data += line.slice(5).trim();
      }
      if (event === "endpoint" && !endpoint) {
        endpoint = data;
        const postUrl = new URL(endpoint, BASE_URL).toString();
        fetch(postUrl, {
          method: "POST",
          headers: { "content-type": "application/json" },
          body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" }),
        }).catch(() => {});
      } else if (event === "message") {
        const parsed = JSON.parse(data);
        if (parsed.result?.tools) {
          console.log(`PASS — ${parsed.result.tools.length} tools`);
          process.exit(0);
        }
      }
    }
  }
}
run();


### Expected behavior

The MCP Client Tool's Tool dropdown should populate with tools advertised by the external MCP server's `tools/list` response. When pointed at a spec-compliant MCP server (one that passes MCP Inspector), the node should:

1. Open the SSE stream (for SSE transport) or complete the Streamable HTTP `initialize` handshake (for HTTP Streamable transport)
2. Send a `tools/list` JSON-RPC request
3. Populate the Tool dropdown from the response

**Observed against the same URL in other MCP clients:**

-**MCP Inspector** (official reference implementation): successful, 173 tools listed
-**Claude Desktop** (remote MCP): successful
-**Cursor** (remote MCP): successful
-**Claude Code CLI**: successful
-**Windsurf, Cline**: successful
-**Direct curl JSON-RPC POST**: successful
-**Standalone Node.js SSE handshake harness** (included in the reproduction steps): successful in ~170ms
-**n8n MCP Client Tool**: fails in ~1 second with no outbound HTTP traffic

**Expected:** n8n's MCP Client Tool node should connect successfully, as the server is verified spec-compliant and publicly reachable.


### Debug Info

# Debug info

## core

- n8nVersion: 2.17.3
- platform: docker (cloud)
- nodeJsVersion: 24.14.1
- nodeEnv: production
- database: sqlite
- executionMode: regular
- concurrency: 5
- license: enterprise (sandbox)
- consumerId: 00000000-0000-0000-0000-000000000000

## storage

- success: all
- error: all
- progress: false
- manual: true
- binaryMode: filesystem

## pruning

- enabled: true
- maxAge: 168 hours
- maxCount: 2500 executions

## client

- userAgent: mozilla/5.0 (windows nt 10.0; win64; x64; rv:150.0) gecko/20100101 firefox/150.0
- isTouchDevice: false

Generated at: 2026-04-22T22:00:31.214Z

### Operating System

Windows 10

### n8n Version

n8n website

### Node.js Version

n/a

### Database

SQLite (default)

### Execution mode

main (default)

### Hosting

n8n cloud

extent analysis

TL;DR

The n8n MCP Client Tool node fails to connect to external MCP servers due to a potential issue with credential validation or node configuration, causing the connection to fail before any HTTP requests are made.

Guidance

  1. Verify credential validation: Check if there's a credential-validation step in the MCP Client Tool node that can fail silently before attempting the HTTP call, causing the connection to fail.
  2. Check node configuration: Investigate if the node's configuration, such as the Multiple Headers Auth setting, is correctly set up and if it's compatible with the external MCP server's authentication requirements.
  3. Test with simplified authentication: Try setting the authentication to None to see if the connection succeeds, which can help determine if the issue is related to authentication.
  4. Inspect node logs: Although the UI doesn't provide detailed error messages, check if there are any logs or debugging options available for the MCP Client Tool node that could provide more insight into the failure.
  5. Compare with working clients: Study the successful connections made by other MCP clients (e.g., MCP Inspector, Claude Desktop) to identify potential differences in their configuration or authentication approaches that might be relevant to resolving the issue with the n8n MCP Client Tool node.

Example

No specific code example is provided as the issue seems to be related to the configuration or authentication setup rather than a code-level problem. However, the standalone reproduction harness script included in the issue body demonstrates a successful connection to the MCP server using a different approach, which might serve as a reference for troubleshooting.

Notes

The exact version of n8n being used is not specified in the UI, which might be relevant for identifying version-specific issues. Additionally, the failure mode and symptoms suggest an issue within the n8n MCP Client Tool node itself rather than with the external MCP server, given that other clients can connect successfully.

Recommendation

Apply a workaround by simplifying the authentication setup or adjusting the node configuration to match the requirements of the external MCP server, as the root cause seems to be related to how the n8n MCP Client Tool node handles authentication or connection setup.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The MCP Client Tool's Tool dropdown should populate with tools advertised by the external MCP server's tools/list response. When pointed at a spec-compliant MCP server (one that passes MCP Inspector), the node should:

  1. Open the SSE stream (for SSE transport) or complete the Streamable HTTP initialize handshake (for HTTP Streamable transport)
  2. Send a tools/list JSON-RPC request
  3. Populate the Tool dropdown from the response

Observed against the same URL in other MCP clients:

  • MCP Inspector (official reference implementation): successful, 173 tools listed
  • Claude Desktop (remote MCP): successful
  • Cursor (remote MCP): successful
  • Claude Code CLI: successful
  • Windsurf, Cline: successful
  • Direct curl JSON-RPC POST: successful
  • Standalone Node.js SSE handshake harness (included in the reproduction steps): successful in ~170ms
  • n8n MCP Client Tool: fails in ~1 second with no outbound HTTP traffic

Expected: n8n's MCP Client Tool node should connect successfully, as the server is verified spec-compliant and publicly reachable.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING