# AutomateLab-tech/n8n-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/AutomateLab-tech/n8n-mcp  
**GitHub Stars:** 12  
**npm Downloads (last month):** 402  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/automatelab-tech-n8n-mcp

## Description
Nine-tool MCP server for n8n: generate workflow JSON from natural language, lint for deprecated node types, missing typeVersion, and broken connections, and debug per-node execution failures. Ships with a Claude Code skill. Install: npx @automatelab/n8n-mcp.

## Tools
Capabilities this server exposes over MCP:

- **node_scaffold** — Scaffold a TypeScript skeleton for an n8n custom node from a plain-English description. Returns a single TypeScript file implementing INodeType with description, credentials reference, and an execute method stub. Pure code generation — no network, no filesystem writes.
- **workflow_generate** — Generate a valid n8n workflow JSON from a plain-English description. Handles webhook/schedule/RSS triggers, common action nodes (Slack, Google Sheets, Discord, Gmail, Notion, HTTP), and AI Agent setups (LangChain root agent + chat model + memory + optional HTTP tool, wired with ai_languageModel / ai_memory / ai_tool connections). Returns workflow JSON with unique node IDs, connections, positions, and typeVersion on every node. Output is non-deterministic (random node IDs and webhook paths).
- **workflow_lint** — Lint an n8n workflow JSON. Returns concrete errors and warnings: missing credentials, deprecated node types (Function -> Code, spreadsheetFile -> convertToFile/extractFromFile), broken connections, missing or non-numeric typeVersion, duplicate node names or IDs, AI Agent missing ai_languageModel sub-node, Webhook missing webhookId, IF node still on v1 condition schema, rate-sensitive nodes without retries, Code-node sandbox violations, expression staleness (`$('NodeName')` referencing missing nodes), manualTrigger in active workflows, disabled-but-wired nodes, empty Set nodes, HTTP method/body mismatches, Schedule trigger DST risk, credential drift, webhook test paths in active workflows. Deterministic, rule-based.
- **workflow_diff** — Semantic diff between two workflows. Reports nodes added / removed / modified (with field-level deltas: type, typeVersion, parameters, credentials, disabled, position), connection topology changes, and settings drift. Ignores noise (small position deltas, createdAt/updatedAt). Pair with workflow_get to compare deployed vs local. Deterministic.
- **execution_explain** — Diagnose a failed or surprising n8n execution. Paste the execution JSON (from the n8n UI 'Show details' or `GET /executions/:id?includeData=true`); returns a per-node summary highlighting nodes that returned 0 items, unresolved `={{ ... }}` expressions, errors with hints, and LLM token usage. Hits the most common debugging pain point: items 'silently disappearing' between nodes. Deterministic, rule-based.
- **execution_replay** — Build a self-contained replay workflow that exercises a single node from a larger workflow. The replay workflow is Manual Trigger -> Replay Seed (Code node with pinned items) -> target node. Optional `inputItems` or an `execution` payload pins what the target sees. Useful for iterating on one stubborn node without re-running the whole pipeline. Returns workflow JSON ready to import or push via workflow_create.
- **execution_timeline** — Render an n8n execution as a per-node timeline: start offset, duration, items in/out, error flag. Complements execution_explain — that one surfaces *why*, this surfaces *when*. Output is a markdown table sorted by start time. Deterministic.
- **workflow_list** — List workflows from a live n8n instance (requires N8N_API_URL + N8N_API_KEY env vars). Returns id, name, active, nodeCount, updatedAt, tags. Filter by active, tags, name. Use this when the user asks 'what workflows do I have?' or before workflow_get.
- **workflow_get** — Fetch a single workflow JSON by id from a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Returns the full nodes/connections payload — pair with workflow_lint to audit a deployed workflow.
- **workflow_create** — Create a workflow on a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Strips read-only fields (id, active, createdAt, ...) before posting. Workflows are created inactive — call workflow_activate afterward. Pairs with workflow_generate for end-to-end 'describe -> deploy'.
- **workflow_activate** — Activate or deactivate a workflow on a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Pass `active: false` to deactivate. Idempotent — re-activating an already-active workflow is a no-op on n8n's side.
- **execution_list** — List recent executions from a live n8n instance (requires N8N_API_URL + N8N_API_KEY). Filter by workflowId, status (success|error|waiting), limit. Pass `includeData: true` to get the full execution body (large) — pair with execution_explain to diagnose a specific failure.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "n8n-mcp": {
    "command": "npx",
    "args": ["-y","@automatelab/n8n-mcp"],
    "env": {
      "N8N_API_URL": "",
      "N8N_API_KEY": "",
      "N8N_MCP_READ_ONLY": "",
      "N8N_MCP_DISABLED_TOOLS": "",
      "N8N_MCP_ALLOWED_WORKFLOW_IDS": "",
      "N8N_MCP_ALLOWED_TAGS": ""
    }
  }
}
```

**Requires environment variables:** `N8N_API_URL`, `N8N_API_KEY`, `N8N_MCP_READ_ONLY`, `N8N_MCP_DISABLED_TOOLS`, `N8N_MCP_ALLOWED_WORKFLOW_IDS`, `N8N_MCP_ALLOWED_TAGS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What AutomateLab-tech/n8n-mcp MCP server does

AutomateLab-tech/n8n-mcp MCP server gives MCP clients focused tools for building and troubleshooting n8n workflows. Its stateless operations accept descriptions or JSON directly, so they can generate a workflow, inspect its structure, compare two versions, or analyze an execution without connecting to n8n. The server also provides live-instance operations for listing, reading, creating, activating, and inspecting workflows and executions.

Workflow generation supports webhook, schedule, and RSS triggers; common services such as Slack, Google Sheets, Discord, Gmail, Notion, and HTTP; and AI Agent arrangements with LangChain agent, chat model, memory, and optional HTTP tool connections. Generated workflows include node IDs, positions, connections, and node type versions.

## How it works

The tools are exposed over MCP using dot-notation groups for nodes, workflows, and executions. `node_scaffold` produces one TypeScript file containing an `INodeType` skeleton for a custom n8n node. It does not write files or make network requests. `workflow_lint` applies deterministic checks for issues such as deprecated node types, missing credentials, invalid connections, absent type versions, expression references to missing nodes, and several n8n-specific configuration risks.

For debugging, provide execution JSON from the n8n interface or from the executions API. `execution_explain` summarizes each node, identifies zero-item outputs and unresolved expressions, and reports errors with hints. `execution_timeline` instead presents timing, item counts, and error status in a markdown table. `execution_replay` creates a smaller workflow containing a Manual Trigger, pinned seed data, and the selected target node.

`workflow_diff` compares workflows semantically, including node fields, connections, and settings, while ignoring small position changes and timestamp metadata. The live tools use the n8n API and can be combined with generation, linting, and explanation for describe-to-deploy or deployed-workflow audit flows.

## Setup and configuration

Install the AutomateLab-tech/n8n-mcp MCP server with Node.js 20 or later. A local MCP host can run `npx -y @automatelab/n8n-mcp`. The README provides configuration examples for Claude Desktop and Cursor, including the server command and optional environment variables.

The stateless tools do not need n8n credentials. Set `N8N_API_URL` and `N8N_API_KEY` to enable live-instance tools. The API key is created in n8n under Settings, API, and Create API key. Runtime policy variables can restrict access: `N8N_MCP_READ_ONLY` disables selected mutating tools, `N8N_MCP_DISABLED_TOOLS` prevents named tools from registering, and workflow ID or tag allowlists constrain REST operations.

## Tools and capabilities

- Generate workflow JSON from plain-English requirements.
- Scaffold a TypeScript custom-node implementation.
- Lint workflow structure and n8n compatibility issues.
- Compare workflow versions and report field-level changes.
- Explain failed executions and render execution timelines.
- Build single-node replay workflows with pinned input items.
- List, fetch, create, activate, and deactivate live workflows.
- List recent executions with optional full execution data.

## Limitations and notes

Generated workflow output is non-deterministic because node IDs and webhook paths are randomized. The server generates code and JSON but does not write files for node scaffolding. Live operations require access to an n8n API and the two n8n credentials described above; stateless analysis cannot retrieve data from a running instance by itself.

The AutomateLab-tech/n8n-mcp MCP server uses dot-notation tool names in the current release. Older prompts or scripts using the former `n8n_*` names need updating. Creating a workflow leaves it inactive, so activation is a separate operation. The server is released under the MIT license.

_Full upstream README: https://allmcps.com/mcp/automatelab-tech-n8n-mcp/readme_

