MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

MCP server connecting Claude Code to n8n - manage workflows, trigger executions, and call webhooks from your terminal

创建于 4/2/2026
更新于 about 3 hours ago
Repository documentation and setup instructions

n8n-claude-mcp

An MCP (Model Context Protocol) server that connects Claude Code to n8n -- manage workflows, trigger executions, and call webhooks directly from your Claude Code terminal.

What It Does

This MCP server gives Claude Code 10 tools to fully control your n8n instance:

| Tool | Description | |------|-------------| | list_workflows | List all workflows with ID, name, status | | get_workflow | Get workflow details including nodes and connections | | activate_workflow | Activate a workflow (start its triggers) | | deactivate_workflow | Deactivate a workflow (stop its triggers) | | execute_workflow | Trigger a workflow run with optional input data | | get_executions | List recent executions, filter by workflow or status | | get_execution | Get detailed results of a specific execution | | create_workflow | Create a new workflow from a JSON definition | | delete_workflow | Delete a workflow by ID | | trigger_webhook | Send a POST request to an n8n webhook trigger |

Prerequisites

  • Node.js v18+
  • n8n running locally or on a server
  • Claude Code CLI installed
  • An n8n API key (generate one at n8n Settings > API > Create API Key)

Setup

1. Clone and install

git clone https://github.com/GURSEWAKSINGHSANDHU/n8n-claude-mcp.git
cd n8n-claude-mcp
npm install

2. Register with Claude Code

claude mcp add n8n \
  -e N8N_API_KEY="your-n8n-api-key" \
  -e N8N_URL="http://localhost:5678" \
  -- node /path/to/n8n-claude-mcp/index.js

Replace:

  • your-n8n-api-key with your actual n8n API key
  • /path/to/n8n-claude-mcp/index.js with the full path to the cloned repo
  • N8N_URL if your n8n is running on a different host/port (defaults to http://localhost:5678)

3. Verify

claude mcp list

You should see:

n8n: node /path/to/n8n-claude-mcp/index.js - Connected

Usage

Once registered, start a new Claude Code session and the n8n tools are available automatically.

Example prompts

> List my n8n workflows

> Show me the details of workflow 5RwYPP3Q

> Trigger the webhook at "my-webhook" with payload {"message": "hello"}

> Create a new workflow with a manual trigger and a code node

> Show me the last 5 failed executions

> Activate workflow abc123

Example: Trigger a webhook

> Trigger the webhook "claude-code" with {"prompt": "summarize my inbox"}

This sends a POST to http://localhost:5678/webhook/claude-code with the JSON payload.

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | N8N_API_KEY | Yes | -- | Your n8n API key | | N8N_URL | No | http://localhost:5678 | Your n8n instance URL |

How It Works

The server translates Claude Code MCP tool calls into n8n REST API requests:

Claude Code  -->  MCP (stdio)  -->  n8n REST API
   "list my workflows"          GET /api/v1/workflows
   "trigger webhook X"          POST /webhook/X
   "execute workflow Y"         POST /api/v1/workflows/Y/run

Built with the official @modelcontextprotocol/sdk.

Bonus: n8n calling Claude Code

You can also set up the reverse direction -- n8n workflows calling Claude Code using a Code node with claude -p "your prompt". This enables full bidirectional automation between Claude Code and n8n. See the n8n docs on the Code node for details.

Built By

License

MIT

快速设置
此服务器的安装指南

安装包 (如果需要)

npx @modelcontextprotocol/server-n8n-claude-mcp

Cursor 配置 (mcp.json)

{ "mcpServers": { "gursewaksinghsandhu-n8n-claude-mcp": { "command": "npx", "args": [ "gursewaksinghsandhu-n8n-claude-mcp" ] } } }