n8n Automation MCP Server
With this server, AI clients can fully automate and administer an n8n instance via 54+ tools covering workflows, executions, credentials, users, security, and more.
Create, update, delete, activate, deactivate, duplicate, export, import, and search workflows, plus use a 23-node template library.
List, inspect, run, retry, stop, delete, and bulk-delete executions with dry-run, and get analytics and node-by-node debug data.
Manage credentials (list, create, update, delete, inspect types/schemas) without exposing secrets.
Manage tags and instance variables.
Run security audits with severity rankings for credentials, database, filesystem, instance, and nodes.
Manage projects, team members, and roles (Enterprise/Team).
Pull from Git and check source control status (Enterprise).
Administer users: list, get, invite, delete, and change roles.
Test connection, get instance info, and monitor health/latency.
Provides comprehensive tools for automating n8n instances, including workflow management, execution diagnostics and retries, credential management, environment variables, tags, and user administration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n Automation MCP Server Create an n8n workflow that sends a Slack message on new webhook."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π€ n8n MCP Server β AI-Powered Automation
The Most Advanced Model Context Protocol Server for n8n β 54 Tools, Full Control
Give Claude, Cursor, or any MCP-compatible AI full control over your n8n instance.
Build workflows, debug executions, manage credentials, audit security β all by chatting with AI.
π Quick Start β’ π οΈ 55 Tools β’ π» Client Setup β’ π³ Docker β’ π‘ AI Prompts β’ π FAQ
π― What Is This?
n8n MCP Server is a Model Context Protocol server that exposes the complete n8n REST API as 55 structured tools that AI agents can call directly.
Connect it to Claude Desktop, Cursor AI, Windsurf, VS Code, or any MCP-compatible client β and your AI can autonomously:
π¨ Build and deploy production-ready n8n workflows from scratch
π Debug failed executions by inspecting node-by-node input/output data
π Manage credentials securely (secrets are never exposed in responses)
π Generate analytics β success rates, avg duration, error trends
π‘οΈ Run security audits β detect unprotected webhooks, risky nodes, CVE exposure
π Organize projects and manage team member access
π Sync Git repositories via source control pull
π₯ Administer users β invite, remove, change roles
Related MCP server: n8n Workflow Builder
β¨ Key Features
Feature | Details | |
π€ | 54 Production-Ready Tools | Full coverage of n8n REST API v1 β Workflows, Executions, Credentials, Tags, Variables, Projects, Security Audit, Source Control, Users |
π§ | AI-Optimized Descriptions | Every tool has rich, actionable descriptions that help Claude choose the right tool automatically |
βοΈ | Typed Workflow Settings | Strongly-typed |
π¦ | 23-Node Template Library | Built-in JSON snippets for Webhooks, Schedule, HTTP Request, Code, Switch, OpenAI, Slack, Gmail, Telegram, Postgres, MySQL, and more |
π | Execution Analytics | Success rate, avg/min/max duration, status breakdown across N recent executions |
ποΈ | Bulk Delete w/ Dry-Run | Preview exactly what will be deleted before committing β safety-first |
π‘οΈ | Security Audit | Severity-ranked report (Critical/High/Medium/Low) via |
π | Git Source Control | Pull from connected Git repos, check sync status and branch info |
π | Auto Retry + Backoff | 3 automatic retries with exponential backoff on 429/5xx errors |
π³ | Docker Multi-Stage | Optimized production image β secrets injected at runtime, never baked in |
β‘ | Fast Build |
|
π Architecture
flowchart LR
subgraph AI["π€ AI Clients (MCP)"]
A[Claude Desktop]
B[Cursor AI]
C[Windsurf / VS Code]
D[Any MCP Client]
end
subgraph MCP["βοΈ n8n MCP Server v2.0.0"]
direction TB
E[54 Registered Tools]
F[Zod Schema Validation]
G[Axios Client\nRetry + Tracing]
end
subgraph N8N["π§ n8n Instance"]
direction TB
H[(Workflows Engine)]
I[(Executions Log)]
J[(Credentials Store)]
K[(Variables / Tags)]
L[(Projects / Users)]
M[(Git Source Control)]
end
A <-->|stdio Transport| E
B <-->|stdio Transport| E
C <-->|stdio Transport| E
D <-->|stdio Transport| E
E --> F --> G
G <-->|"n8n REST API v1\nX-N8N-API-KEY"| H
G <-->|REST| I
G <-->|REST| J
G <-->|REST| K
G <-->|REST| L
G <-->|REST| Mπ Quick Start
Prerequisites
Node.js
v18+n8n instance β self-hosted (
http://localhost:5678) or n8n Cloudn8n API Key β
n8n Settings β API β Create API Key
1. Clone & Install
git clone https://github.com/SohailShabbir867/n8n_mcp.git
cd n8n_mcp
npm install2. Configure Environment
cp .env.example .envEdit .env:
# Required
N8N_BASE_URL=http://localhost:5678
N8N_API_KEY=your_n8n_api_key_here
# Optional (default: v1)
N8N_API_VERSION=v13. Build
npm run buildβ
You'll see: dist/index.js 1.3mb Done in ~400ms
π» Client Setup: Claude & Cursor & Windsurf
Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["C:/path/to/n8n_mcp/dist/index.js"],
"env": {
"N8N_BASE_URL": "http://localhost:5678",
"N8N_API_KEY": "your_n8n_api_key_here"
}
}
}
}Cursor AI / Windsurf
Go to Settings β MCP Servers β Add Server:
{
"n8n": {
"command": "node",
"args": ["C:/path/to/n8n_mcp/dist/index.js"],
"env": {
"N8N_BASE_URL": "http://localhost:5678",
"N8N_API_KEY": "your_n8n_api_key_here"
}
}
}Via Docker (recommended for production)
{
"mcpServers": {
"n8n": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "N8N_BASE_URL=http://localhost:5678",
"-e", "N8N_API_KEY=your_key",
"n8n-mcp:2.0.0"
]
}
}
}π³ Docker
Build Locally
docker build -t n8n-mcp:2.0.0 .Run with env file (recommended)
docker run --rm -i --env-file .env n8n-mcp:2.0.0Run with inline env vars (PowerShell)
docker run --rm -i `
-e N8N_BASE_URL=https://your-n8n.com `
-e N8N_API_KEY=your_key_here `
n8n-mcp:2.0.0β The Dockerfile uses multi-stage builds β your
.envsecrets are never baked into the image.
π οΈ Tool Reference (55 Tools)
π Workflows β 14 Tools
Tool | Description | Key Parameters |
| List workflows with filters |
|
| Get full workflow detail |
|
| Create a new workflow |
|
| Partial update β any field |
|
| Permanently delete |
|
| Enable trigger |
|
| Pause trigger |
|
| Clone a workflow |
|
| Export as portable JSON |
|
| Import from JSON string |
|
| Advanced search + date filters (client-side, avoids an n8n API 500 bug) |
|
| Execution analytics per workflow |
|
| Move to another project |
|
| 23 copy-paste node templates |
|
When creating or updating a workflow, the settings object supports:
Setting | Type | Description |
|
| Execution strategy (use |
|
| e.g. |
|
| Save manual test runs |
|
| Save progress for long-running workflows |
|
| Save output on success |
|
| Save output on error |
|
| Max runtime in seconds ( |
|
| Workflow ID to call on failure |
|
| Who can call this workflow |
|
| Comma-separated workflow IDs (for |
β‘ Executions β 8 Tools
Tool | Description | Key Parameters |
| List with filters + date range |
|
| Node-by-node detail + summary |
|
| Delete execution record |
|
| Manually trigger |
|
| Retry a failed run |
|
| Cancel running execution |
|
| Aggregated stats for a workflow |
|
| Safe bulk delete with dry-run |
|
π Credentials β 7 Tools
Tool | Description | Key Parameters |
| List all credential metadata |
|
| Inspect type & dates (masked) |
|
| Create new credential |
|
| Update name/type/data |
|
| Permanently delete |
|
| Curated reference list of type IDs (e.g. |
|
| Get the exact required fields for a credential type before creating one |
|
π·οΈ Tags β 4 Tools
Tool | Description | Key Parameters |
| List all tags |
|
| Create a new tag |
|
| Rename a tag |
|
| Delete a tag |
|
π§ Variables β 4 Tools
Tool | Description | Key Parameters |
| List instance variables |
|
| Create |
|
| Update key or value |
|
| Delete a variable |
|
π‘οΈ Security Audit β 1 Tool
Tool | Description | Key Parameters |
| Full security report with severity ranking |
|
Categories: credentials Β· database Β· filesystem Β· instance Β· nodes
Detects: Unprotected webhooks Β· Unused credentials Β· Risky community nodes Β· Outdated n8n version Β· Dangerous security configs Β· Abandoned workflows
π Projects β 7 Tools (Enterprise/Team)
Tool | Description | Key Parameters |
| List all projects |
|
| Get project details (paginates list_projects client-side β n8n's API has no single-project GET endpoint) |
|
| Create team/personal project |
|
| Rename project |
|
| Delete (with migration option) |
|
| Add user with role |
|
| Remove user from project |
|
Roles: project:admin Β· project:editor Β· project:viewer
π Source Control β 2 Tools (Enterprise Git)
Tool | Description | Key Parameters |
| Pull latest from Git repo |
|
| View repo, branch, SSH key status | β |
π₯ System & Users β 8 Tools
Tool | Description | Key Parameters |
| Health check + latency + version | β |
| n8n version, DB type, license, plan | β |
| List all users with role filter |
|
| User details by ID or email |
|
| Send invite + get invite link |
|
| Remove user (with workflow transfer) |
|
| Change global role |
|
Global Roles: global:owner Β· global:admin Β· global:member
π‘ Example AI Prompts
Copy these directly into Claude or Cursor:
Test the connection to my n8n server and show me the version and API latency.Create an active workflow called "Daily Sales Report" with a Schedule Trigger
at 9am every weekday, a Postgres node to fetch yesterday's sales,
and a Slack node to post the summary to #sales-team.Find all failed executions from the last 7 days for workflow ID "abc123",
inspect the first one to see which node failed, then retry it.Run a security audit on my n8n instance and give me a prioritized action
plan to fix all Critical and High severity risks.List all my workflows and show me stats (success rate, avg duration)
for the top 5 most-executed ones.Bulk delete all "error" executions older than 30 days for workflow "xyz" β
first show me a dry run, then confirm deletion.Invite user@company.com to n8n as a global:member and add them to
project "Marketing Automations" as a project:editor.Export workflow "Weekly Newsletter" as JSON, then duplicate it and rename
the copy "Weekly Newsletter β TEST" and keep it deactivated.π Troubleshooting & FAQ
git pull origin main
npm install
npm run build
# Then restart your MCP clientdocker run --rm -i `
-e N8N_BASE_URL=https://your-n8n.com `
-e N8N_API_KEY=your_key `
n8n-mcp:2.0.0π€ Contributing
Contributions, issues, and feature requests are welcome!
Fork the repository
Create your branch:
git checkout -b feature/my-featureCommit:
git commit -m 'feat: add my feature'Push:
git push origin feature/my-featureOpen a Pull Request
Please follow Conventional Commits for commit messages.
π License
Distributed under the MIT License β see LICENSE for details.
Made with β€οΈ by Sohail Shabbir
β Star this repo if it saves you time!
Available Tools
34 toolsactivate_workflowA
Activate a workflow so it runs automatically on triggers.
Inputs: id (required).
create_credentialC
Create a new credential instance.
Inputs: data (required), name (required), type (required).
create_tagA
Create a new tag.
Inputs: name (required).
create_variableA
Create a custom environment variable in n8n.
Inputs: key (required), value (required).
create_workflowA
Create a new n8n workflow with nodes, connections, and settings. Optionally activate immediately.
Inputs: name (required), tags, nodes, activate, +2 more.
deactivate_workflowA
Deactivate a workflow so it stops running on triggers.
Inputs: id (required).
delete_credentialCDestructive
Delete a credential.
Inputs: id (required).
delete_executionADestructive
Delete an execution record.
Inputs: id (required).
delete_tagBDestructive
Delete a tag permanently.
Inputs: id (required).
delete_variableBDestructive
Delete an environment variable.
Inputs: id (required).
delete_workflowADestructive
Permanently delete a workflow by ID.
Inputs: id (required).
duplicate_workflowC
Duplicate an existing workflow.
Inputs: id (required), name.
export_workflowARead-only
Export a workflow as a formatted JSON structure for backup or sharing.
Inputs: id (required).
get_credentialARead-only
Get metadata for a credential (secret data is hidden).
Inputs: id (required).
get_executionARead-only
Get detailed node-by-node input and output data for a specific execution.
Inputs: id (required), includeData.
get_userARead-only
Get details of a specific user by ID.
Inputs: id (required).
get_workflowARead-only
Get full details of a workflow including nodes, connections, and settings.
Inputs: id (required).
import_workflowB
Import a workflow directly from a JSON string definition.
Inputs: workflowJson (required), activate.
list_common_nodesARead-only
Get documentation and JSON template snippets for common n8n node types (Webhook, Schedule, HTTP Request, Code, Switch, OpenAI, Slack).
Inputs: category.
list_credentialsBRead-only
List saved credentials.
Inputs: name, limit, cursor.
list_credential_typesARead-only
List supported credential types in n8n with optional search query.
Inputs: search.
list_executionsBRead-only
List workflow executions filtered by workflow ID, status (error/success/waiting/running/canceled), and date.
Inputs: limit, cursor, status, workflowId, +1 more.
list_tagsARead-only
List all workflow tags.
Inputs: limit, cursor.
list_usersARead-only
List registered users in the n8n instance.
Inputs: limit, cursor.
list_variablesARead-only
List n8n environment/instance variables.
Inputs: limit, cursor.
list_workflowsARead-only
List all workflows in n8n with filtering by active status, tags, or name. Returns node counts and metadata.
Inputs: name, tags, limit, active, +1 more.
retry_executionB
Retry a failed execution using the workflow definition.
Inputs: id (required), loadWorkflowFromDb.
run_workflowC
Manually trigger a workflow execution with optional payload data.
Inputs: id (required), data.
stop_executionADestructive
Stop or cancel a currently running execution.
Inputs: id (required).
test_connectionARead-only
Health check: Test connection to n8n instance and verify API key and response latency.
Inputs: no named parameters.
update_credentialBIdempotent
Update an existing credential.
Inputs: id (required), data, name, type.
update_tagAIdempotent
Rename an existing tag.
Inputs: id (required), name (required).
update_variableAIdempotent
Update an existing variable key or value.
Inputs: id (required), key, value.
update_workflowAIdempotent
Update an existing workflow's name, nodes, connections, settings, tags, or active status.
Inputs: id (required), name, tags, nodes, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 34 tools
Each tool targets a distinct resource-action pair: workflows, executions, credentials, tags, variables, and users each have their own operations. There is no overlap between tools; for example, 'run_workflow' and 'activate_workflow' are clearly different (manual trigger vs. scheduled).
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_workflows, create_credential, update_tag). Plural nouns are used for list operations, singular for others, and this pattern is uniform across all resource types.
With 34 tools, the server exceeds the 25+ threshold the rubric defines as 'too many'. While each tool serves a legitimate purpose given the broad scope of n8n management, the sheer number may overwhelm an agent and is heavier than the typical well-scoped server.
The surface covers the full lifecycle for workflows (create, read, update, delete, activate, deactivate, duplicate, export, import), executions (list, get, run, retry, stop, delete), credentials (CRUD plus types), tags and variables (full CRUD), and user listing, plus a health check. There are no obvious gaps or dead ends.
Related MCP Connectors
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
n8n MCP β query your own n8n instance (BYO).
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides seamless integration between MCP-compatible AI assistants and n8n workflow automation, enabling intelligent management and automation of n8n workflows through natural language.5-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage n8n automation workflows through natural language commands, including creating, executing, monitoring, and organizing workflows with full CRUD operations and execution management.106 npm2MIT
- AlicenseNot gradedqualityFmaintenanceProvides AI assistants with direct access to the n8n automation platform to manage and execute workflows, variables, and credentials. It features 18 integrated tools that allow for seamless automation management via the Model Context Protocol.3MIT
- AlicenseBqualityDmaintenanceA comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and double-validated workflow creation.431MIT