io.github.ratamaha-git/n8n-mcp MCP Server
io.github.ratamaha-git/n8n-mcp
AI-powered n8n workflow debugging, linting, and generation—catch silent failures before they hit production.
What is the io.github.ratamaha-git/n8n-mcp MCP server?
The n8n-mcp MCP server gives Claude, Cursor, and other AI agents tools to generate, lint, diagnose, and manage n8n workflows. It specializes in catching silent failures (data loss between nodes, deprecated schemas, broken connections) and explaining failed executions with concrete hints, plus REST tools to drive live n8n instances.
n8n-mcp is a focused debugging and correctness server for n8n automation workflows. It includes nine tools: five stateless tools for generating workflows from plain English, linting for 20+ failure modes, explaining failed executions node-by-node, diffing workflows, and replaying single nodes; plus four REST tools to list, fetch, create, and activate workflows on a live n8n instance. Use it to catch schema mismatches, deprecated node types, missing AI Agent connections, and silent data loss before workflows go to production.
How to install io.github.ratamaha-git/n8n-mcp
Copy-paste configuration for popular MCP clients.
Tools & capabilities
Tools this server exposes to the agent.
workflow_generate— Convert plain-English description to n8n workflow JSON, with AI Agent topology awareness.workflow_lint— Validate workflow JSON against 20+ rules: deprecated nodes, missing credentials, broken connections, IF v1 schema, webhook misconfiguration, and more.workflow_diff— Compare two workflows and return semantic diff: nodes added/removed/modified, connection changes, and setting changes.execution_explain— Analyze failed execution JSON and return per-node diagnosis: which nodes returned 0 items, unresolved expressions, error messages with hints.execution_replay— Generate a self-contained replay workflow that exercises a single node from a failed execution.execution_timeline— Convert execution JSON to per-node timeline table showing start time, duration, items in/out, and errors.node_scaffold— Generate a TypeScript INodeType file for a custom n8n node package from a description.workflow_list— Paginate and filter workflows by active status, tags, or name (requires N8N_API_URL and N8N_API_KEY).workflow_get— Fetch a workflow by ID from a live n8n instance (requires N8N_API_URL and N8N_API_KEY).workflow_create— POST a new workflow to a live n8n instance, stripping read-only fields (requires N8N_API_URL and N8N_API_KEY).workflow_activate— Toggle workflow active/inactive status on a live n8n instance (requires N8N_API_URL and N8N_API_KEY).execution_list— Browse executions from a live n8n instance with optional full-body data (requires N8N_API_URL and N8N_API_KEY).
Use cases
- Debug silent data loss in workflows by explaining per-node execution results and identifying where items are dropped.
- Catch schema errors and deprecated node types before importing workflows into production.
- Generate new n8n workflows from plain-English descriptions with proper AI Agent topology.
- Lint and validate workflow JSON in CI/CD pipelines using the GitHub Action.
- Compare workflow versions to understand what changed in nodes, connections, and settings.
io.github.ratamaha-git/n8n-mcp MCP server FAQ
It's an MCP server that gives AI agents tools to generate, lint, diagnose, and manage n8n workflows. It specializes in catching silent failures and explaining why executions fail, with optional REST integration to drive live n8n instances.
Yes, n8n-mcp is MIT-licensed open-source software. You install it via npm (@automatelab/n8n-mcp) or Docker.
Add it to your MCP config (Cursor: ~/.cursor/mcp.json, Claude Desktop: claude_desktop_config.json) with: command 'npx', args ['-y', '@automatelab/n8n-mcp'], and optional env vars N8N_API_URL and N8N_API_KEY for live-instance tools.
The five stateless tools (generate, lint, explain, diff, replay) work without authentication. The four REST tools (workflow_list, workflow_get, workflow_create, workflow_activate, execution_list) require N8N_API_URL and N8N_API_KEY environment variables pointing to your n8n instance.
Stateless: workflow_generate, workflow_lint, execution_explain, workflow_diff, execution_replay, execution_timeline, node_scaffold. Live-instance: workflow_list, workflow_get, workflow_create, workflow_activate, execution_list.
Yes. Set N8N_MCP_READ_ONLY=1 to disable destructive tools, N8N_MCP_DISABLED_TOOLS to skip specific tools, N8N_MCP_ALLOWED_WORKFLOW_IDS to whitelist workflows, and N8N_MCP_ALLOWED_TAGS to filter by tags.
README (reference)
Source of truth, from the repository.
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_explainis 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_generateis opinionated about AI Agent topology - emits proper LangChain clusters withai_languageModel/ai_memory/ai_toolconnections (sub-nodes connect upward to the agent, not viamain). Imports cleanly on n8n 1.x.workflow_lintcatches 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 justmain).- 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.
Runtime policy (v0.5+)
Constrain the server without forking. Set these env vars before launching:
| Env var | Effect |
|---|---|
N8N_MCP_READ_ONLY=1 | Disables workflow_create, workflow_activate, node_scaffold. |
N8N_MCP_DISABLED_TOOLS=workflow_create,workflow_activate | Skip those tool registrations entirely. |
N8N_MCP_ALLOWED_WORKFLOW_IDS=abc,def | REST tools refuse to touch any workflow outside the list. |
N8N_MCP_ALLOWED_TAGS=prod,staging | workflow_list filters to workflows carrying at least one tag. |
Useful when handing the MCP to a junior agent or wiring it behind a customer-facing assistant.
Deploy
- Claude Desktop one-click: build the
.dxtbundle fromdxt/manifest.json(seedxt/README.md). - Docker:
docker build -t n8n-mcp . && docker run --rm -i -e N8N_API_URL=... -e N8N_API_KEY=... n8n-mcp. - Render: drop in
render.yamland click "New from Blueprint". - Railway:
railway.toml—railway upin the repo root. - Fly.io:
fly.toml—fly launch --copy-config.
Install
Requires Node 20 or later.
As a CLI tool
npm install -g @automatelab/n8n-mcp
As a GitHub Action
Use the n8n MCP GitHub Action to lint workflows, diagnose executions, and generate workflow JSON in your CI/CD pipeline:
- uses: ratamaha-git/n8n-mcp@v1
with:
command: 'lint'
workflow-json: ${{ env.WORKFLOW_JSON }}
See ACTION.md and GITHUB-ACTION-SETUP.md for examples and publication details.
Configure your MCP host
Cursor (~/.cursor/mcp.json) or Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"n8n": {
"command": "npx",
"args": ["-y", "@automatelab/n8n-mcp"],
"env": {
"N8N_API_URL": "https://your-n8n.example.com",
"N8N_API_KEY": "n8n_..."
}
}
}
}
The env block is optional - the 4 stateless tools work without it. Get an API key from n8n: Settings → API → Create API key.
Restart your MCP host. The 12 dot-notation tools (workflow.*, node.*, execution.*) appear in the MCP panel.
Tool examples
workflow_generate
Use workflow_generate to build: Stripe webhook → Slack message + new row in Google Sheets.
Returns workflow JSON ready for n8n's "Import from File" dialog.
execution_explain
Here's a failed execution from n8n. Why is the Slack node not firing? [paste JSON]
Returns:
WARNING [Filter] Returned 0 items. Downstream nodes will not execute.
hint: Common causes: (1) IF/Switch routed to the other branch — check `parameters.conditions`. (2) Filter/Set node dropped everything — inspect its output explicitly.
INFO [Last node executed was "Filter". If the workflow stopped here unexpectedly, check its output items below.]
workflow_lint
Lint this workflow JSON. [paste JSON]
Returns:
ERROR [AI Agent] AI Agent has no `ai_languageModel` sub-node connected. Attach a chat model (e.g. lmChatOpenAi).
WARNING [Webhook] Webhook node has no `webhookId`. n8n auto-generates one on import, so the production URL will change.
WARNING [LegacyFunction] Node type "n8n-nodes-base.function" is deprecated. Use "n8n-nodes-base.code".
Or no issues found.
Examples
The examples/ directory ships with two ready-to-import workflows:
workflow-stripe-to-slack.json- Stripe webhook fans out to Slack and Google Sheets.workflow-rss-to-discord.json- RSS feed trigger posts new items to a Discord channel.
Import either via n8n's Import from File dialog.
Development
git clone https://github.com/ratamaha-git/n8n-mcp
cd n8n-mcp
npm install
npm run build
npm run smoke
npm run smoke boots the server with a --smoke flag that lists registered tools and exits without binding stdio. Useful for CI or first-run sanity checks.
License
MIT. See LICENSE.
Developed by AutomateLab.
Related MCP servers

RationalBloks
Deploy production REST APIs from JSON schemas in seconds. Manage projects, schemas, and deployments.
Your agent already broke this three times. ChangeBook tells it before the fourth.
Converts between MusicXML and ABC notation, so LLMs can read and edit scores
View repository →Converts photos or scans of printed sheet music to MusicXML with optical music recognition
View repository →Real-time pitch detection and score alignment for a singer, from microphone input
View repository →