n8n-mcp
An MCP server for n8n that gives Claude, Cursor, and other AI agents tools for generating workflows, linting, diagnosing failed executions, and driving live n8n instances.

Why we built this
We use n8n daily inside AutomateLab and kept hitting the same LLM failures: workflow JSON that imports but fails at runtime, AI Agent clusters wired with the wrong connection types, executions that silently drop items with no clue where to look. Dumping the whole n8n catalog into context doesn't fix it - the failure modes are too subtle (typeVersion mismatches, IF v1 schema, credentials that don't survive import).
So we built a small, focused server: encode the failure modes the lint can catch, the cluster topology the generator must respect, and the diagnosis the agent can't do alone. For a walkthrough of the nine tools with example output, see the launch post on automatelab.tech.
Why it's different
Other n8n MCP servers (notably czlonkowski/n8n-mcp) compete on breadth - 20+ tools and an indexed corpus of every n8n node. They own that niche.
This server is the debugging-and-first-run-correctness MCP for n8n:
execution_explain is the wedge. Paste the execution JSON; get back per-node findings: which nodes returned 0 items, which had unresolved ={{ ... }} expressions, error messages with concrete hints. No other MCP server does this well, and it hits the n8n community's #1 debugging pain point (silent data loss between nodes).
workflow_generate is opinionated about AI Agent topology - emits proper LangChain clusters with ai_languageModel / ai_memory / ai_tool connections (sub-nodes connect upward to the agent, not via main). Imports cleanly on n8n 1.x.
workflow_lint catches the silent failures: deprecated node types (Function → Code, spreadsheetFile → convertToFile), AI Agent missing language model, IF v1 schema, Webhook missing webhookId, broken connections across all connection types (not just main).
- 5 REST tools (gated on
N8N_API_URL + N8N_API_KEY) let you list, fetch, create, activate workflows and pull executions - so the lint and explain tools can run against your live workflows, not just JSON pasted in chat.
Plus: a paired Agent Skill that teaches the model when to use which tool and where to load deeper context (split into references/ so it doesn't bloat the prompt).
Tools
Tool names follow dot-notation and form a navigable tree: node.*, workflow.*, execution.*. Every tool declares an outputSchema (so callers can type-check responses) and MCP annotations (read-only / destructive / idempotent / open-world hints).
Stateless (work without a live n8n instance):
| Tool | Purpose |
|---|
workflow_generate | Plain-English description → workflow JSON. Detects AI-agent intent. |
node_scaffold | Description → single INodeType TypeScript file for a custom n8n package. |
workflow_lint | Workflow JSON → list of errors and warnings (20+ rules). |
workflow_diff | Two workflows → semantic diff (nodes added/removed/modified, connections, settings). |
execution_explain | Failed execution JSON → per-node diagnosis with hints. |
execution_replay | Workflow + node → self-contained replay workflow that exercises just that node. |
execution_timeline | Execution JSON → per-node timeline table (start, duration, items in/out, errors). |
Live-instance (require N8N_API_URL + N8N_API_KEY env vars):
| Tool | Purpose |
|---|
workflow_list | Paginate workflows; filter by active/tags/name. |
workflow_get | Fetch a workflow by id. |
workflow_create | POST a workflow. Strips read-only fields. |
workflow_activate | Flip active on/off. |
execution_list | Browse executions; pass includeData: true for the full body. |
v0.5.0 changes. Three new tools: workflow_diff, execution_replay, execution_timeline. Lint expanded with 10 new rules (rate-limit, credential drift, expression staleness, code sandbox, webhook test path, manualTrigger-in-active, DST schedule risk, disabled-but-wired, empty Set, HTTP method/body mismatch). New runtime policy env vars: N8N_MCP_READ_ONLY, N8N_MCP_DISABLED_TOOLS, N8N_MCP_ALLOWED_WORKFLOW_IDS, N8N_MCP_ALLOWED_TAGS. DXT bundle + Dockerfile + Render/Railway/Fly deploy configs.
v0.4.0 breaking change. Tools were renamed from n8n_* (snake_case) to dot-notation. Update any prompts, agent skills, or scripts that referenced the old names.