# n8n-mcp

Assists with building n8n workflows, running validation checks, and diagnosing broken execution runs directly in your coding agent.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 15
- Author: AutomateLab-tech
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AutomateLab-tech/n8n-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/n8n-mcp

## What it does

The server connects an assistant to n8n logic without manual JSON editing. It handles workflow assembly, structural diffs, and lint checks across node schemas. When creating AI Agent setups, the generator links sub-nodes like `ai_languageModel` and `ai_tool` directly to the agent node, preventing import failures on n8n 1.x.

Debugging focuses on execution analysis. With `execution_explain`, you pass raw execution data to detect missing payload items, syntax issues in expressions like `={{ ... }}`, and node failures. For isolated testing, `execution_replay` extracts a targeted reproduction workflow for a single node.

Running this package requires Node 20 or newer. Managing live workflows via REST depends on `N8N_API_URL` and `N8N_API_KEY`. Without these environment variables, live updates fail and the server operates strictly in offline mode.

## Requirements
- Needs: Node.js (commands run via npx)
- Works with: n8n

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add n8n-mcp -- npx -y @automatelab/n8n-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add n8n-mcp -- npx -y @automatelab/n8n-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "n8n-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@automatelab/n8n-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "n8n-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@automatelab/n8n-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add n8n-mcp npx -y @automatelab/n8n-mcp
```

## When to use it
- identify reasons for dropped items in failed n8n runs
- generate valid n8n 1.x workflow JSON for AI agents
- catch deprecated node types and expression errors before deployment
- inspect and toggle workflows on a remote n8n instance

## Example prompts
- Analyze this n8n execution output and pinpoint why the HTTP node produced zero items.
- Draft an n8n workflow connecting an agent to a calculator tool for n8n 1.x.
- Run a lint check on workflow.json to spot broken connections or deprecated nodes.

## Similar
- [n8n-debugging-official](https://affpapa.org/en/nevibecode/skills/n8n-debugging-official.md) — skill · 2100 installs
- [n8n-mcp-tools-expert](https://affpapa.org/en/nevibecode/skills/n8n-mcp-tools-expert.md) — skill · 8200 installs
- [n8n-workflow-lifecycle-official](https://affpapa.org/en/nevibecode/skills/n8n-workflow-lifecycle-official.md) — skill · 2400 installs
- [mcp-n8n](https://affpapa.org/en/nevibecode/mcp/mcp-n8n.md) — MCP server · ★ 21
- [n8n-workflow-patterns](https://affpapa.org/en/nevibecode/skills/czlonkowski-n8n-workflow-patterns.md) — skill · 11700 installs
- [workflow-automation](https://affpapa.org/en/nevibecode/skills/workflow-automation.md) — skill · 1661 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
