# mcp-n8n

Connect an AI agent to n8n to build and check workflows, inspect executions, and manage an instance. Setup uses your n8n URL and API key.

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

## What it does

The server gives an agent tools to create and edit workflows, search a catalog of 560 nodes, and check workflow settings before saving. It can repair common issues, inspect data handled by an individual node, and call a webhook workflow to test its response.

Before changes, it saves local snapshots that can be compared with the current workflow or restored later. It also exports workflows as JSON and provides administration tools for users, projects, and permissions. Set `N8N_BASE_URL` and `N8N_API_KEY` to connect; without the API key, the server cannot access your n8n instance. It runs locally over stdio or in HTTP mode.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `N8N_BASE_URL`, `N8N_API_KEY`, `N8N_TOOLSETS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: n8n

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env N8N_BASE_URL=<N8N_BASE_URL> --env N8N_API_KEY=<N8N_API_KEY> --env N8N_TOOLSETS=<N8N_TOOLSETS> --transport stdio mcp-n8n -- npx -y mcp-n8n
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp-n8n --env N8N_BASE_URL=<N8N_BASE_URL> --env N8N_API_KEY=<N8N_API_KEY> --env N8N_TOOLSETS=<N8N_TOOLSETS> -- npx -y mcp-n8n
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-n8n": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-n8n"
            ],
            "env": {
                "N8N_BASE_URL": "<N8N_BASE_URL>",
                "N8N_API_KEY": "<N8N_API_KEY>",
                "N8N_TOOLSETS": "<N8N_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-n8n": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-n8n"
            ],
            "env": {
                "N8N_BASE_URL": "<N8N_BASE_URL>",
                "N8N_API_KEY": "<N8N_API_KEY>",
                "N8N_TOOLSETS": "<N8N_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e N8N_BASE_URL=<N8N_BASE_URL> -e N8N_API_KEY=<N8N_API_KEY> -e N8N_TOOLSETS=<N8N_TOOLSETS> mcp-n8n npx -y mcp-n8n
```
Replace <…> with your own values

## When to use it
- build an n8n workflow from a description
- check node settings before saving a workflow
- trace the node that failed during execution
- restore a workflow from a snapshot
- export workflows as JSON

## Example prompts
- Create an n8n workflow that accepts a webhook and processes its data.
- Check this workflow for errors and repair the issues you can safely fix.
- Show me which node failed in the most recent errored execution.

## Similar
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13169
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12791

---
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
