About N8n MCP Server
N8n MCP Server is an MCP server published by harbouli in the Automation category.
The repository has 5 stars and 1 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/harbouli/n8n-mcp-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about N8n MCP Server
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository just now. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- !License declaredNo license file. Legally you have no right to use it in a product.
- !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
1 check has not been run yet.
README
n8n MCP Server
A Model Context Protocol (MCP) server that connects AI assistants (Claude, Cursor, etc.) to your n8n workflow automation instance. Manage, execute, and monitor n8n workflows through natural language.
Features
- Workflow Management — List, create, update, delete, activate, and deactivate workflows
- Workflow Execution — Run workflows directly via the REST API or through webhook triggers
- Execution History — View, inspect, and manage past workflow executions
- Tags & Diagnostics — List tags and check n8n connectivity
- Type-safe — Fully written in TypeScript with proper error handling
Prerequisites
- Node.js 18+ (20+ recommended)
- A running n8n instance (self-hosted or cloud)
- An n8n API key — generate one in n8n under Settings → API → Create API Key
Quick Start
1. Install dependencies
npm install
2. Configure
Copy the example env file and fill in your values:
cp .env.example .env
Edit .env:
N8N_BASE_URL=http://localhost:5678
N8N_API_KEY=your-api-key-here
3. Build
npm run build
4. Configure your MCP client
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/absolute/path/to/n8n-mcp-server/build/index.js"],
"env": {
"N8N_BASE_URL": "http://localhost:5678",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/absolute/path/to/n8n-mcp-server/build/index.js"],
"env": {
"N8N_BASE_URL": "http://localhost:5678",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
Available Tools
| Tool | Description |
|---|---|
list_workflows |
List all workflows with optional active/tag filters |
get_workflow |
Get full details of a workflow (nodes, connections, settings) |
create_workflow |
Create a new workflow with name, nodes, and connections |
update_workflow |
Update an existing workflow |
delete_workflow |
Permanently delete a workflow |
activate_workflow |
Activate a workflow so it responds to triggers |
deactivate_workflow |
Deactivate a workflow |
execute_workflow |
Run a workflow directly via the REST API |
execute_workflow_via_webhook |
Trigger a workflow through its webhook URL |
list_executions |
List execution history with status/workflow filters |
get_execution |
Get full execution details including run data |
delete_execution |
Delete an execution from history |
list_tags |
List all available tags |
health_check |
Verify connectivity to the n8n instance |
Usage Examples
Once connected, you can ask your AI assistant things like:
- "List all my active n8n workflows"
- "Show me the details of workflow 42"
- "Create a new workflow called 'Daily Report' with a Schedule trigger and HTTP Request node"
- "Execute workflow 15 with this input data: { "email": "test@example.com" }"
- "Show me the last 10 failed executions"
- "Activate workflow 7"
- "Check if my n8n instance is reachable"
Development
# Run in development mode (no build needed)
npm run dev
# Build for production
npm run build
# Start production build
npm start
Architecture
n8n-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point & tool definitions
│ └── n8n-client.ts # n8n REST API client
├── build/ # Compiled output (generated)
├── package.json
├── tsconfig.json
├── .env.example
└── README.md
Notes on Workflow Execution
n8n's public API (v1) does not include a direct "execute workflow" endpoint. This server provides two approaches:
-
execute_workflow— Uses the internal/rest/workflows/{id}/runendpoint. Works on self-hosted instances. May require additional authentication configuration depending on your n8n setup. -
execute_workflow_via_webhook— Calls a workflow's webhook trigger URL. This is the officially recommended approach. Your workflow must have a Webhook node as its trigger and must be active.
Generating Your n8n API Key
- Open your n8n instance
- Go to Settings (bottom-left gear icon)
- Click API
- Click Create API Key
- Copy the key and add it to your
.envor MCP client config
License
MIT
README fetched from the repository just now. The original is authoritative.