get_node: N concurrent tools/call requests silently hang a subset forever (no stderr, no exit) — surfaces as client-side "Connection closed"
Environment
- n8n-mcp: 2.90.0 (npx, current latest as of report)
- Node: v24.19.0, Linux, non-Docker
- Transport: local MCP server (stdio), spawned by Claude Code as
npx n8n-mcp
Symptom
During a Claude Code session driving n8n-mcp over stdio, the connection died mid-session three separate times with a bare client-side "Connection closed" and no diagnostic — no stderr, no distinguishing error body. /mcp reconnect brought it back each time, then it died again later. No single tool call reproduced it; deaths occurred after get_node/validate_node pairs and mid/after n8n_update_partial_workflow calls.
Minimal reproduction (isolated from the MCP client)
Spawning the stdio binary directly (dist/mcp/stdio-wrapper.js) and driving it with a hand-rolled JSON-RPC client (bypassing Claude Code entirely) reproduces a silent hang, not a crash:
initialize+notifications/initialized- Fire 5+ concurrent
tools/callrequests forget_node(any node type,detail: "full"or"standard"— reproduces with identical repeated node types too, so it isn't about response size or a specific node's docs).
Result: a subset of the in-flight requests never receive a response. The process does not exit, write to stderr, or throw — it just stops answering those specific request IDs forever (waited 60s). Meanwhile n8n_health_check/other calls sent afterward on the same connection also never resolve, since the transport is effectively wedged.
Concretely, with N=10 concurrent get_node(detail:"full") calls: only 6–8/11 responses (including initialize) ever arrive; the rest hang indefinitely with 0 bytes of stderr output. With N=5 concurrent identical calls to the same node type, the same partial-hang occurs (5/6 or 6/6 depending on run — nondeterministic).
This is why the MCP client sees "Connection closed" with nothing to show: it's not the subprocess dying, it's the subprocess going silently unresponsive under concurrent request load, which the client eventually times out and tears down.
Notes
- Not related to response size: reproduces with
detail: "standard"too, and single full-detail calls to the largest nodes (e.g.nodes-base.slack, ~240KB response) complete fine in isolation. - Not related to a specific node type: reproduces with 5 identical concurrent calls to the same node type.
- Only
get_node(a documentation-only, read-only tool with no n8n API interaction) was used in the isolated repro — so this isn't scoped to the workflow-mutation code paths that #946 (telemetry blocking) and #1018 (validate_workflow race) touch. It looks like a more general issue in how concurrenttools/callrequests are dispatched/awaited on the stdio transport. - No stderr output at all across every run, despite
stdio-wrapper.jsexplicitly logging via the un-silenced originalconsole.erroronuncaughtException/unhandledRejection/fatal errors — consistent with a hung promise (never rejects) rather than a thrown error.
Impact
Any MCP client that fires concurrent tool calls against this server (Claude Code does this routinely when a model batches independent tool calls in one turn) can wedge the connection with zero diagnostic signal, forcing a reconnect. Because it happens under ordinary read-only documentation lookups (not just workflow mutations), it's broader than the validation-specific issue in #1018.
Repro script
Happy to share the ~40-line Node script (spawns stdio-wrapper.js directly, does the MCP handshake over stdin/stdout, and fires N concurrent get_node calls) if useful for a fix — it has no dependency on a live n8n instance beyond N8N_API_URL being set (the failing tool is documentation-only).
Source: czlonkowski/n8n-mcp