
N8n Mcp
io.github.ratamaha-gitPublished by GitHub account ratamaha-gitv0.3.0Updated Oct 24, 2026
MCP server for n8n: generate, lint, explain failed executions, drive live n8n via REST.
Overview
An MCP server for n8n that lets an assistant generate, lint, diff and debug n8n workflows, and optionally drive a live n8n instance over its REST API.
- What you can do
- Generate workflow JSON from a plain-English description, including AI Agent clusters, and scaffold custom node TypeScript files
- Lint workflow JSON against 20+ rules and semantically diff two workflows
- Diagnose failed executions: per-node explanations with hints, replay workflows for a single node, and per-node timelines
- Manage live n8n workflows: list, fetch, create and activate them
- Browse executions on a live instance, optionally with full execution data
- When to use it
- Useful when you build or maintain n8n automations and want an assistant to produce import-ready workflow JSON, catch silent failures before import, or explain why a failed execution dropped items. The live-instance tools are worth adding when the assistant should read or change workflows on a running n8n server.
- Requirements
- Runs locally as an npm package (Node 20 or later) over stdio, typically launched with npx. The stateless tools need nothing else. The REST tools require the environment variables N8N_API_URL and N8N_API_KEY, with a key created in n8n under Settings, API. Optional policy variables such as N8N_MCP_READ_ONLY, N8N_MCP_DISABLED_TOOLS, N8N_MCP_ALLOWED_WORKFLOW_IDS and N8N_MCP_ALLOWED_TAGS constrain it.
Installation
In SourceWeft
- Open N8n Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
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 the historical launch walkthrough, covering the original 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):
Live-instance (require N8N_API_URL + N8N_API_KEY env vars):
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:
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
As a GitHub Action
Use the n8n MCP GitHub Action to lint workflows, diagnose executions, and generate workflow JSON in your CI/CD pipeline:
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):
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:
workflow_lint
Lint this workflow JSON. [paste JSON]
Returns:
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
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.
Maintenance and verification
See the maintenance guide for interpretation limits, current tool names where applicable, and reproducible verification.
Source: README.md at commit 28904f6
Tools
0Version history
1- v0.3.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts