n8n-mcp
An MCP server that gives Claude, Cursor, and any MCP-compatible agent twelve tools for n8n. Generate workflow JSON, lint for the silent failures, and - the wedge - diagnose failed executions node by node so the agent stops guessing.
What it gives your agent
Twelve tools, split between stateless (work on pasted JSON, no n8n instance needed) and live (drive a real n8n via REST, gated on N8N_API_URL + N8N_API_KEY).
| Tool | Type | Purpose |
|---|---|---|
node_scaffold | offline | Generate a node scaffold. |
workflow_generate | offline | Generate importable workflow JSON. |
workflow_lint | offline | Find structural errors in a workflow. |
workflow_diff | offline | Compare two workflow versions. |
execution_explain | offline | Explain node outputs in an execution. |
execution_replay | offline | Inspect a recorded execution without running it again. |
execution_timeline | offline | Show the recorded execution sequence. |
workflow_list | live | List workflows on a configured n8n instance. |
workflow_get | live | Read a workflow from a configured instance. |
workflow_create | live | Create a workflow after approval. |
workflow_activate | live | Activate a workflow after approval. |
execution_list | live | Read execution history from a configured instance. |
What makes it different
Debugging-first, not breadth-first
Other n8n MCP servers index the entire node catalog (20+ tools). This one is focused on the failure modes - the diagnoses an LLM cannot do alone from a workflow dump.
Per-node execution diagnosis
execution_explain calls out which node returned zero items, which expressions failed to resolve, which branch the IF/Switch took. Solves the #1 n8n debugging pain point: silent data loss between nodes.
Opinionated AI-Agent topology
Generator emits proper LangChain clusters - ai_languageModel / ai_memory / ai_tool connections wired upward to the agent, not via main. Imports cleanly on n8n 1.x.
Lint catches the silent killers
Function vs Code, spreadsheetFile vs convertToFile, IF v1 schema, AI Agent without a chat model, Webhook missing webhookId. The errors n8n accepts on import and bites you on first run.
Stateless tools work offline
Generate, lint, and explain don't need an n8n instance. Paste JSON in chat, get answers. REST tools turn on when you set the API key.
Paired Agent Skill
Ships with a SKILL.md that teaches the model when to use which tool, plus references split so they don't bloat the prompt. The skill is portable across MCP-capable harnesses.
Install in 3 steps
-
Install the npm package (requires Node 20+)
npm install -g @automatelab/n8n-mcp -
Add the server to your MCP host config (
~/.cursor/mcp.jsonfor Cursor,claude_desktop_config.jsonfor Claude Desktop){ "mcpServers": { "n8n": { "command": "npx", "args": ["-y", "@automatelab/n8n-mcp"], "env": { "N8N_API_URL": "https://your-n8n.example.com", "N8N_API_KEY": "n8n_..." } } } }Theenvblock is optional - the 4 stateless tools work without it. Get an API key in n8n at Settings → API → Create API key. -
Restart your MCP host. The nine
n8n_*tools appear in the MCP panel.
Works with Claude Desktop, Claude Code, Cursor, Cline, and any MCP-compatible agent harness. Full reference: the GitHub readme.
FAQ
What does it cost?
Do I need a live n8n instance?
N8N_API_URL + N8N_API_KEY - set those when you want the agent to drive a real instance.Which agents does it work with?
How is this different from czlonkowski/n8n-mcp?
explain_execution is the wedge, the generator is opinionated about AI-Agent topology, and lint encodes the silent failure modes. Different niches; many users will run both.What does it not do?
Migrating from leonardsellem/n8n-mcp-server
The @leonardsellem/n8n-mcp-server npm package was officially deprecated in March 2025 and has had no commits since July 2025. If you found this page from a stale config or a Google result pointing there, you're in the right place.
Drop-in replacement — same environment variables, same MCP host config shape:
| Old package | This package | Notes |
|---|---|---|
| @leonardsellem/n8n-mcp-server | @automatelab/n8n-mcp | npx @automatelab/n8n-mcp |
| list_workflows, get_workflow | workflow_list, workflow_get | Same n8n API, new naming |
| create_workflow, execute_workflow | workflow_create, workflow_activate | Create + activate are separate ops |
| list_executions, get_execution | execution_list + execution_explain | execution_explain adds per-node diagnosis |
| — (none) | workflow_lint, workflow_diff, workflow_generate, execution_replay, execution_timeline, node_scaffold | New debugging tools, no n8n instance needed |
The credential tools (list_credentials, get_credential) are not included — the n8n API does not expose credential secrets, so a credential management MCP is inherently read-only and adds limited value over the n8n UI.
Want it wired into your n8n setup?
We use n8n-mcp daily to build, lint, and debug our own workflows. If you want it set up and tuned for your stack - or a custom workflow built end to end - we can do that.
Get in touchHow to use this result
Start with workflow_lint on exported JSON. Use execution_explain for a failed execution. Live tools need an n8n API URL and key; review workflow_create and workflow_activate before allowing changes.
Current installation and examples: n8n MCP source guide.
Current MCP tool names
node_scaffoldworkflow_generateworkflow_lintworkflow_diffexecution_explainexecution_replayexecution_timelineworkflow_listworkflow_getworkflow_createworkflow_activateexecution_list
Tested usage walkthrough
Publish a concrete usage walkthrough with inputs, verification and result limits.