
The Complete Debug Guide for Silent MCP Server Failures in n8n
Who this is for: n8n developers and ops engineers running the MCP Server Trigger node — self-hosted or cloud — who have watched a tool call vanish with no error, no log entry, and no explanation.
Your workflow is active. The SSE endpoint returns a 200. The tools/list call shows your tools. The agent calls the tool. And then — nothing. No execution in n8n. No error anywhere. Just silence.
This is not a random glitch. It is one of five specific silent failure modes built into how n8n implements MCP over SSE. Each has a distinct root cause, a distinct log signature, and a distinct fix. Most guides give you the same three suggestions — activate your workflow, check your proxy, restart n8n. Those answers treat symptoms. This guide maps the actual failure patterns.
What this guide covers – the 5 silent failure modes:
- #1 – Process Exit With No Log – n8n dies silently, takes the MCP endpoint with it
- #2 – SSE Buffer Overflow – proxy swallows the stream, client gets nothing
- #3 – Timeout vs. Process Kill – two errors that look the same, fixed differently
- #4 – Zombie Processes in Queue Mode – session affinity breaks, Code Tools hang forever
- #5 – Schema Validation Drops – tool listed, tool selected, tool never called
Jump to your failure mode:
Before You Debug: How n8n’s MCP Architecture Actually Works?
Debugging MCP in n8n is impossible without a working mental model of the stack. Most debugging advice skips this entirely — which is why people spend hours chasing the wrong layer.
The core fact: n8n’s MCP Server Trigger does not use stdio. It uses Server-Sent Events (SSE) over HTTP — or streamable HTTP in recent versions. SSE has specific requirements that a default proxy setup does not meet. That gap is where most silent failures originate.
The SSE Handshake: 3 Stages, One Critical Constraint
- Client sends GET to
/mcp/{workflow-id}/sse— opens a persistent, long-lived HTTP connection - n8n responds with a
sessionIdover that stream - Client sends tool calls as POST requests to
/messages?sessionId=...
The constraint that breaks everything in multi-replica setups: the GET and the POST must reach the exact same n8n instance. If a load balancer routes the POST to a different replica, the session ID is unknown there — the call silently dies.
Test URL vs. Production URL – The Trap That Burns Everyone
| URL Type | When It Works | Common Mistake | What You See |
|---|---|---|---|
| Test URL | Only while workflow is open in editor and “Listen for Test Event” is active | Using this URL in a production client | SSE handshake succeeds, tool calls never execute |
| Production URL | Only after the workflow is fully activated (toggle on) | Using before workflow is activated | 404 or “unknown webhook” — endpoint not registered |
Enable Debug Logging First
n8n defaults to info level. You need debug to see webhook registration events, SSE connection events, and the log signatures that identify each failure mode below.
# Docker — add to environment block
N8N_LOG_LEVEL=debug
# pm2 ecosystem.config.js
env: { N8N_LOG_LEVEL: "debug" }
# Direct start
N8N_LOG_LEVEL=debug n8n start
Revert to info after diagnosing. Debug logging is noisy in production.
Failure Mode #1 – Process Exit With No Log
| 🔴 Symptom | MCP server was working. Nothing changed. Now the SSE endpoint is dead. n8n UI loads fine. Workflow shows Active. No failed executions anywhere. |
| Root Cause | The n8n process (or webhook process) crashed and restarted. MCP endpoint registration was lost. The container/pm2 brought n8n back up — but the MCP client is still holding a dead session from before the restart. |
| Log Signature | "n8n ready on port 5678" appearing more than once in your system/Docker logs within a short window |
| Fix | Add memory limits + restart policy. Restart your MCP client after n8n recovers. |
How to Confirm It?
# Docker — check restart count
docker inspect n8n --format='{{.RestartCount}}'
# Docker — scan logs for repeated startup
docker logs n8n --since 2h | grep -E "ready on port|Unhandled promise|OOMKilled"
# pm2 — check uptime and restart count
pm2 info n8n | grep -E "restart|uptime|status"
If restart count is above zero, or you see the startup banner more than once – that is your answer.
The Fix: Memory Limits and Process Supervision
The root cause is almost always an unhandled promise rejection or an OOM event. Add a Node.js heap cap and enforce a restart policy.
# docker-compose.yml
services:
n8n:
image: n8nio/n8n
restart: unless-stopped
mem_limit: 2g
environment:
- N8N_LOG_LEVEL=debug
- NODE_OPTIONS=--max-old-space-size=1536
# pm2 ecosystem.config.js
module.exports = {
apps: [{
name: 'n8n',
script: 'n8n',
args: 'start',
max_memory_restart: '1500M',
exp_backoff_restart_delay: 100,
env: { N8N_LOG_LEVEL: 'debug' }
}]
};
🔬 How We Confirmed This?
- Environment: n8n 1.88–1.91, Docker with no mem_limit set, SQLite and Postgres both affected
- Reproduction: Trigger a large workflow execution loop with no memory cap – Docker restarts n8n silently, restart count increments, n8n UI shows nothing wrong, MCP endpoint is dead
- Confirmed by: n8n Community – “MCP server has suddenly stopped working” multiple users reporting active workflow + dead endpoint after silent container restart
Log line seen:
n8n ready on port 5678
This line appearing more than once within a short window in your Docker or pm2 logs confirms a silent restart.
EEFA tip: After any n8n process restart, MCP clients hold a dead session. Restart the client – Claude Desktop, Cursor, whatever you use – to force a fresh SSE handshake. n8n cannot signal clients that it restarted.
Failure Mode #2 – SSE Buffer Overflow and Proxy Buffering
| 🔴 Symptom | SSE connection returns 200. Client never receives events. Tool calls time out with MCP error -32001. Connection silently drops after 30–60 seconds. Direct connection to n8n port works fine. |
| Root Cause | Your reverse proxy (nginx, Caddy, Traefik) is buffering the HTTP response. SSE requires events to flush immediately as they are written. Buffered proxies wait for the buffer to fill before forwarding — MCP events are small, so the buffer never fills, and the client receives nothing. |
| Log Signature | Direct curl streams data: ... lines. Proxied curl hangs indefinitely at the same endpoint. |
| Fix | proxy_buffering off + full SSE nginx block below. Every directive is required. |
How to Confirm It? – Isolate the Proxy
# Test DIRECT (bypass proxy) — should stream data: lines immediately curl -N \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer YOUR_TOKEN" \ http://localhost:5678/mcp/YOUR_WORKFLOW_ID/sse # Test THROUGH proxy — if this hangs while the above streams, it's your proxy curl -N \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer YOUR_TOKEN" \ https://your-domain.com/mcp/YOUR_WORKFLOW_ID/sse
What Each Directive Does? and Why You Cannot Skip Any?
| nginx Directive | Why It Is Required for MCP |
|---|---|
proxy_buffering off |
The core fix. Without this, nginx holds SSE events in memory until the buffer fills — which never happens for small MCP events. |
proxy_http_version 1.1 |
HTTP/1.1 is required for persistent SSE connections. HTTP/1.0 closes the connection after each response. |
proxy_set_header Connection "" |
SSE requires an empty Connection header — not “Upgrade” like WebSockets. Inherited Connection headers from other location blocks will break SSE silently. |
proxy_set_header Accept "application/json, text/event-stream" |
n8n validates this exact header. If your proxy strips it, n8n returns a “Not Acceptable” error that surfaces as a silent connection failure on the client. |
gzip off |
n8n handles compression itself. Double-compression corrupts the SSE stream. |
chunked_transfer_encoding off |
Prevents framing issues that cause events to arrive garbled or not at all. |
proxy_read_timeout 86400s |
nginx default is 60 seconds. Any idle MCP session dies silently at 60s. 86400s = 24 hours keeps sessions alive through low-activity periods. |
Complete nginx Config Block for n8n MCP
location ~ ^/mcp/ {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_buffering off;
proxy_cache off;
proxy_set_header Accept "application/json, text/event-stream";
proxy_set_header Connection "";
gzip off;
chunked_transfer_encoding off;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Caddy: Add flush_interval -1 to your reverse_proxy directive for MCP routes.
Traefik: Set responseHeaderTimeout: 0 and disable any response-buffering middleware on the MCP route.
🔬 How We Confirmed This?
- Environment: nginx 1.24 + n8n 1.87, standard reverse proxy config inherited from a webhook setup
- Reproduction: Apply default nginx proxy_pass block with no SSE-specific directives – curl through proxy hangs indefinitely while direct curl streams data lines immediately
- Confirmed by: n8n official docs (MCP Server Trigger node page) explicitly list proxy_buffering off and chunked_transfer_encoding off as required and note that missing Accept header returns “Not Acceptable”
Log line seen:
curl through proxy returns HTTP 200 with no body — zero bytes transferred after 60 seconds
Failure Mode #3 – Connection Timeout vs. Process Kill: How to Tell Them Apart
| 🔴 Symptom | A tool call starts executing. You see it begin in n8n’s execution log. After some time, it stops. Client reports -32001 or -32000. Both look identical. They are not. |
| Root Cause | Either the proxy killed the connection (timeout) or n8n’s 5-minute MCP execution cap fired (process kill). The fix for one does nothing for the other. |
| Log Signature | Time the failure. Consistent ~60s = proxy timeout. Consistent ~300s = n8n execution cap. |
| Fix | Proxy timeout → proxy_read_timeout 86400s. Execution cap → async pattern or EXECUTIONS_TIMEOUT=0 (self-hosted). |
Error Code Reference: -32000 vs. -32001
| Error Code | Meaning | Timing Pattern | Caused By |
|---|---|---|---|
-32001Request timed out |
Client sent a request and received no response within the timeout window | Consistent — fails at the same elapsed time every run | Proxy timeout (60s default) or n8n execution cap (300s for MCP) |
-32000Connection closed |
The SSE transport was closed unexpectedly mid-session | Random — can happen at any point, often with no n8n execution log entry | Process restart, load balancer termination, network drop, queue routing failure |
How to Time the Failure and Confirm the Cause?
# Time your tool call end-to-end
time curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"your_tool","arguments":{}}}' \
"https://your-domain.com/mcp/YOUR_WORKFLOW_ID/messages?sessionId=YOUR_SESSION_ID"
# Fails at ~60s → proxy_read_timeout — apply Failure Mode #2 nginx fix
# Fails at ~300s → n8n MCP execution cap — use async pattern or EXECUTIONS_TIMEOUT=0
Fix for the 5-Minute n8n MCP Execution Cap
n8n enforces a hard 5-minute execution limit for MCP-triggered runs. You cannot override this from the workflow settings UI for MCP-triggered executions specifically.
- Self-hosted: Set
EXECUTIONS_TIMEOUT=0in your environment to disable the global cap — do this carefully, as it removes the safety net for runaway executions entirely - n8n Cloud: You cannot change this limit. The correct solution is an async pattern: have the MCP tool return an acknowledgement immediately, trigger a separate workflow via HTTP, and poll for the result
- Both: Restructure long-running tools so they do not keep the MCP connection open for the full operation duration
🔬 How We Confirmed This?
- Environment: n8n Cloud + self-hosted 1.90, tested with both Claude Desktop and Cursor as MCP clients
- Reproduction: Run a tool that sleeps for 310 seconds – MCP-triggered execution terminates at exactly 300s regardless of workflow timeout setting
- Confirmed by: n8n Community thread “MCP Server Timeout issue” June 2025 – user reports first call succeeds, second call fails at consistent interval; n8n docs state 5-minute timeout applies to MCP-triggered runs and cannot be overridden via workflow settings
Log line seen:
MCP error -32001: Request timed out at consistent 300s elapsed
EEFA tip: If you see -32000 with no execution log entry in n8n — nothing was processed. That rules out the execution cap entirely and points to Failure Mode #1 or Failure Mode #4 instead.
Failure Mode #4 – Zombie MCP Processes in n8n Queue Mode
| 🔴 Symptom | First tool call in a session works. Second one hangs forever and times out. Or: MCP works on one webhook replica but silently fails on another. Or: Code Tool nodes show as “running” in n8n forever with no error. |
| Root Cause | Two separate sub-causes — session affinity failure across replicas, or Code Tool nodes hanging because the webhook process has no task runner. Both present as the same symptom. |
| Log Signature | "Received request for unknown webhook: POST mcp/.../messages is not registered" on the wrong replica’s logs |
| Fix | Route all /mcp* to a single dedicated webhook replica. Set N8N_RUNNERS_ENABLED=true on that process. |
Sub-Cause A – Session Affinity Failure Across Replicas
SSE is stateful. The session ID is tied to the specific n8n webhook process instance that accepted the GET connection.
When a round-robin load balancer routes the client’s POST message to a different replica, that replica has no record of the session ID — it logs “unknown webhook” and drops the request. The client never hears back. This is why the first call works (GET and first POST hit the same replica by chance) and subsequent calls fail (POST starts routing to other replicas).
Sub-Cause B – Code Tool Node Hang in Queue Mode
n8n’s docs recommend routing all /mcp* traffic to a single dedicated webhook replica. There is a catch documented in GitHub issue #23004: webhook processes in queue mode do not run task runners by default.
Code Tool nodes require a task runner to execute. When a Code Tool is attached to an MCP Server Trigger running on a dedicated webhook process, the tool call is accepted and an execution is created in n8n — but the Code Tool hangs indefinitely waiting for a task runner that never arrives. The execution stays “running” forever. No timeout. No error. The MCP client waits until its own timeout fires.
# Confirm sub-cause A — look for this on your non-primary replicas grep "unknown webhook" /var/log/n8n/*.log # or docker logs n8n-webhook-2 2>&1 | grep "unknown webhook" # Confirm sub-cause B — check if runners are enabled on your MCP webhook process docker exec n8n-webhook-mcp env | grep N8N_RUNNERS # If empty or false → this is your Code Tool hang
Fix: Dedicated Replica Routing with nginx
# nginx: route /mcp* to dedicated single instance
upstream n8n_mcp {
server n8n-webhook-mcp:5678; # one container only
}
upstream n8n_webhooks {
server n8n-webhook-1:5678;
server n8n-webhook-2:5678;
}
server {
# MCP traffic → single dedicated instance
location ~ ^/mcp/ {
proxy_pass http://n8n_mcp;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Connection "";
proxy_set_header Accept "application/json, text/event-stream";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
gzip off;
chunked_transfer_encoding off;
}
# All other webhook traffic → load-balanced pool
location /webhook/ {
proxy_pass http://n8n_webhooks;
proxy_http_version 1.1;
}
}
Fix: Dedicated MCP Webhook Container with Task Runner
# docker-compose.yml — dedicated MCP webhook container
services:
n8n-webhook-mcp:
image: n8nio/n8n
command: webhook
environment:
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- N8N_RUNNERS_ENABLED=true # REQUIRED — fixes Code Tool hang
- WEBHOOK_URL=https://your-domain.com
- N8N_LOG_LEVEL=debug
🔬 How We Confirmed This?
- Environment: n8n 1.91, queue mode with 2 webhook replicas behind nginx, Code Tool node attached to MCP Server Trigger
- Reproduction: Send two consecutive tool calls from the same MCP session – first succeeds, second logs “unknown webhook” on replica 2 while replica 1 holds the SSE stream
- Confirmed by: GitHub issue #23004 (n8n-io/n8n) – Code Tool nodes silently hang on dedicated webhook processes; n8n GitHub issue #15572 shows exact “unknown webhook” log pattern from multi-replica routing failure
Log line seen:
Received request for unknown webhook: The requested webhook "POST mcp/{id}/messages" is not registered
EEFA tip: n8n Cloud users cannot control webhook routing directly. If you see intermittent MCP failures on Cloud that match this pattern – first call works, subsequent calls fail randomly – contact n8n Cloud support with your workflow ID and timestamps from the execution log. Cloud-side scaling events can briefly cause routing mismatches.
Failure Mode #5 – Schema Validation Silently Dropping Tool Calls
| 🔴 Symptom | MCP server is reachable. tools/list returns your tools. The agent acknowledges the tools. You prompt it to use one. The agent responds — but the tool was never called. Zero executions in n8n. Zero errors anywhere. |
| Root Cause | Your tool’s inputSchema contains a construct the client-side validator rejects. The client silently drops the tool call before it ever reaches n8n. This is correct client behavior — a schema that fails validation cannot be safely called. |
| Log Signature | MCP Inspector output: "N tools have invalid JSON schemas and will be omitted" |
| Fix | Validate with MCP Inspector first. Remove anyOf, fix array without items, clean property keys. Use the safe schema pattern below. |
The Schema Violations That Cause Silent Drops
| Violation | Example | What Happens |
|---|---|---|
anyOf with null types |
{"anyOf": [{"type": "string"}, {"type": "null"}]} |
Generated automatically by Pydantic for optional fields. Many MCP clients reject anyOf entirely. Tool is discovered, never called. |
| Property keys with special characters | $.xgafv (Google API wrappers) |
Keys must match ^[a-zA-Z0-9_.-]{1,64}$. A single bad key poisons the entire tool list — every tool call in the session fails with a 400. |
array without items |
{"type": "array"} |
Fails JSON Schema Draft 2020-12 validation. Tool silently omitted. |
Nested jsonSchema wrapper |
{"inputSchema": {"jsonSchema": {...}}} |
Violates MCP spec. inputSchema must directly contain the JSON Schema object. All tools silently dropped. |
| Draft 2020-12 meta-features | $dynamicRef |
Client validators that only support earlier drafts omit the tool. Discovered but never callable. |
How to Validate Your Schema Before Connecting a Client?
# Run MCP Inspector against your n8n endpoint npx @modelcontextprotocol/inspector \ --url https://your-domain.com/mcp/YOUR_WORKFLOW_ID/sse \ --header "Authorization: Bearer YOUR_TOKEN" # CLI mode — get tools/list output directly and scan for warnings npx @modelcontextprotocol/inspector --cli \ --method tools/list \ --url https://your-domain.com/mcp/YOUR_WORKFLOW_ID/sse \ --header "Authorization: Bearer YOUR_TOKEN" # Look for: # "N tools have invalid JSON schemas and will be omitted" # Any tool listed in inspector but absent in your AI client
Broken Schema vs. Safe Schema: Side by Side
// ❌ BROKEN — will be silently dropped by most MCP clients
{
"inputSchema": {
"type": "object",
"properties": {
"query": {
"anyOf": [{"type": "string"}, {"type": "null"}] // anyOf — rejected
},
"$.filter": { "type": "string" }, // $ in key — poisons whole list
"tags": { "type": "array" } // no items — invalid
}
}
}
// ✅ SAFE — flat, simple, universally compatible
{
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query. Leave empty to return all results."
},
"filter": {
"type": "string",
"description": "Optional filter. Pass empty string to skip."
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Tag strings to filter by"
}
},
"required": ["query"]
}
}
🔬 How We Confirmed This?
- Environment: n8n 1.89 MCP Server Trigger + Claude Desktop client + FastMCP-generated Python server
- Reproduction: Define a tool with anyOf: [{type: string}, {type: null}] in inputSchema — tool appears in lists but zero executions appear in n8n when the agent attempts to call it
- Confirmed by: GitHub issues #31855 and #34771 (anthropics/claude-code) — invalid inputSchema causes silent tool drop; Directus GitHub issue #25906 documents tools omitted due to Draft 2020-12 schema features
Log line seen:
MCP Inspector CLI output — "N tools have invalid JSON schemas and will be omitted"
EEFA tip: Handle optionality in your tool’s logic, not in the schema. Instead of anyOf: [string, null], mark the field as non-required and check for empty strings inside the tool handler. Simpler schema, zero validation failures.
Your Debug Playbook – Step-by-Step Decision Flow
Run these steps in order. Each one rules out one or more failure modes. Stop at the first step that identifies your issue and apply the fix from the corresponding section above.
| Step | What to Run | What You See | Where It Points |
|---|---|---|---|
| 1 | Open the workflow in n8n. Check the Active toggle. Open the MCP node. Copy the Production URL fresh. | Toggle is OFF, or you were using the Test URL | Activate the workflow, use Production URL — done |
| 2 | curl -N -H "Accept: application/json, text/event-stream" http://localhost:5678/mcp/ID/sse (direct, bypass proxy) |
Streams data: lines immediately |
n8n is healthy — problem is in your proxy → Failure Mode #2 |
| 2 | Same curl, same endpoint | Hangs or returns nothing | n8n itself is unhealthy — check process → Step 3 |
| 3 | docker inspect n8n --format='{{.RestartCount}}' or pm2 info n8n |
Restart count > 0 or uptime is short | Process has been crashing → Failure Mode #1 |
| 4 | Trigger a tool call and time how long until it fails | Consistent ~60s failure | Proxy read timeout → Failure Mode #2 nginx fix |
| 4 | Same timing test | Consistent ~300s failure | n8n MCP execution cap → Failure Mode #3 async fix |
| 5 | grep "unknown webhook" /var/log/n8n/*.log across all replicas |
Found on a non-primary replica | Session affinity failure → Failure Mode #4 routing fix |
| 5 | docker exec n8n-webhook env | grep N8N_RUNNERS |
Empty or false |
Code Tool hang → Failure Mode #4 task runner fix |
| 6 | npx @modelcontextprotocol/inspector --url YOUR_SSE_URL |
“N tools have invalid schemas and will be omitted” | Schema drop → Failure Mode #5 schema fix |
Quick Diagnosis – If/Then:
- Endpoint dead, n8n UI healthy → Process restarted (#1)
- Direct curl works, proxied curl hangs → Proxy buffering (#2)
- Fails at exactly 60s every time → nginx timeout (#2)
- Fails at exactly 300s every time → Execution cap (#3)
- First call works, second hangs → Queue routing (#4)
- Code Tool stuck “running” forever → No task runner (#4)
- Tool listed, never called, no n8n execution → Schema drop (#5)
Quick Reference Tables
Table A: Symptom to Failure Mode
| What You See | Failure Mode | Timing Pattern |
|---|---|---|
| MCP endpoint dead, n8n UI loads fine | #1 – Process Exit | Sudden / after memory spike |
| SSE returns 200, client never receives events | #2 – Proxy Buffering | Immediate / on every connect |
| Tool call fails at exactly ~60s every run | #2 – Proxy Timeout | Consistent 60s |
| Tool call fails at exactly ~300s every run | #3 – Execution Cap | Consistent 300s |
| Connection drops randomly, no execution logged | #1 or #4 | Random / unpredictable |
| First call works, second hangs forever | #4 – Session Affinity | Second call in every session |
| Code Tool execution stuck “running” forever | #4 – No Task Runner | Every Code Tool call |
| Tool listed and selected, never called, no n8n execution | #5 – Schema Drop | Every call / 100% reproducible |
| “Not Acceptable” / client cannot connect at all | #2 — Missing Accept Header | Immediate / on every connect |
Table B: Key Environment Variables for MCP Stability
| Variable | What It Controls | Recommended Value | MCP Impact |
|---|---|---|---|
N8N_LOG_LEVEL |
Logging verbosity | debug (diagnosis only) | Exposes webhook registration and SSE events needed to diagnose all 5 modes |
N8N_RUNNERS_ENABLED |
External task runner for Code nodes | true | Prevents Code Tool nodes from hanging silently in queue mode webhook processes |
EXECUTIONS_MODE |
Queue vs single-node | queue (multi-node) | Activates the session affinity requirement — routing rules become mandatory |
EXECUTIONS_TIMEOUT |
Global max execution time (seconds) | 0 (self-hosted, long tools only) | Prevents the 5-minute MCP execution cap from silently killing long-running tool calls |
NODE_OPTIONS |
Node.js V8 heap size | –max-old-space-size=1536 | Prevents OOM-triggered process crashes that kill MCP endpoints silently |
N8N_DISABLED_MODULES |
Disables feature modules | Leave unset | Setting to mcp removes all MCP endpoints — useful kill switch during outage investigation |
Frequently Asked Questions
Why does my n8n MCP server work in the editor but fail in production?
The editor uses the Test URL — it only registers a live SSE endpoint while you have the workflow open and “Listen for Test Event” is active. The Production URL requires the workflow to be fully activated via the toggle. If you switch to a production client without activating the workflow, the production endpoint is not registered — the connection attempt fails silently because there is nothing at that URL.
Why does my n8n MCP server stop working after a few hours?
Almost certainly nginx timeout. The default proxy_read_timeout is 60 seconds. Any SSE session idle for 60 seconds is silently killed by the proxy — no notification to either end. Apply proxy_read_timeout 86400s from the Failure Mode #2 nginx block.
After this change, sessions survive through idle periods. The 24-hour value is not excessive — it is what persistent SSE connections require.
Can I use stdio transport with n8n’s MCP Server Trigger?
No. n8n’s MCP Server Trigger does not support stdio at all. It uses SSE and streamable HTTP only.
To connect a stdio-based client like Claude Desktop, use the mcp-remote proxy package — it runs locally as a stdio process and forwards traffic to your n8n SSE endpoint. n8n’s documentation has the exact Claude Desktop configuration snippet.
Why does my MCP server in n8n Cloud keep disconnecting?
n8n Cloud has infrastructure-level timeout and scaling policies separate from your workflow config. SSE connections may be cycled during Cloud-side scaling or deployment events.
Design your MCP client integration to handle reconnections gracefully. Most clients (Claude Desktop, Cursor) reconnect automatically. If disconnections are frequent and unpredictable, open a support ticket with your workflow ID and specific timestamps from the execution log.
How do I debug MCP issues in n8n when I cannot access server logs?
Three tools work without server log access:
- Execution log inside the workflow — check for executions stuck in “running” that never complete
- MCP Inspector (
npx @modelcontextprotocol/inspector) — validates connectivity, tool discovery, and schema from the client side - curl commands against the MCP endpoint — tests SSE streaming behavior without a client
What is the difference between MCP error -32000 and -32001 in n8n?
-32000 means the SSE transport was closed unexpectedly — process restart, network drop, or load balancer termination. Happens randomly, often with no execution log entry in n8n.
-32001 means a request was sent and no response came back within the timeout window. Happens consistently at the same elapsed time. The timing difference is your primary diagnostic signal — see Failure Mode #3 for the full timing test.
Why does my MCP tool appear in tools/list but the agent never actually calls it?
This is Failure Mode #5 — schema validation drop. The tool is discovered but the client silently discards the call before it reaches n8n because your inputSchema fails validation.
Run MCP Inspector against your endpoint and look for “invalid JSON schemas” warnings. The most common causes are anyOf with null types (auto-generated by Pydantic), property keys containing $, and array properties missing an items field. See Failure Mode #5 for the full schema fix.
Conclusion: Every MCP Server Crash in n8n Is Diagnosable
None of these failures are random. They feel random because n8n’s MCP implementation sits across three layers — the SSE protocol, the n8n workflow engine, and your deployment infrastructure — and a failure in any one layer presents identically to a failure in another. The log signatures, timing patterns, and curl tests in this guide separate all three.
The debugging approach is always the same: isolate the layer first. Test direct before proxy. Check process health before checking configuration. Validate schema before debugging the client. Once you know which of the five failure modes you are dealing with, the fix is mechanical — not a guessing game.
Your 5-Step Production Checklist for n8n MCP Stability:
- Memory limit + restart policy on n8n process (
mem_limit: 2g,restart: unless-stopped) - Full SSE nginx block on
/mcp*—proxy_buffering off,proxy_read_timeout 86400s, correct Accept header - Async tool design for anything that runs longer than 4 minutes
N8N_RUNNERS_ENABLED=trueon every webhook process that serves MCP with Code nodes- Schema validated with MCP Inspector before connecting any production client
Related guides on FlowGenius: See our complete guide to n8n queue mode setup, our walkthrough for configuring Claude Desktop with n8n MCP endpoints, and our n8n webhook performance tuning guide for high-traffic deployments.
