n8n MCP Server
Provides programmatic control over n8n workflow automation, including creating, updating, deleting, activating, and deactivating workflows; running and monitoring executions; managing credentials; discovering available node types and parameters; and diagnosing workflow issues with pre-flight validation and embedded knowhow.
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 MCP Server create a workflow that posts new RSS items to Slack"
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
MCP server for n8n workflow automation. Built for AI agents (Claude Code, Claude Desktop, Cursor) that manage n8n workflows programmatically.
Smart validation, auto-fix for common pitfalls, embedded knowhow database, execution polling, credential management, and node discovery — in one server.
Why this exists
n8n's AI workflow features are enterprise-only. I wanted AI agents to build and manage my workflows, so I built this MCP server. It gives Claude (or any MCP-compatible agent) full programmatic control over n8n — and auto-fixes 7 common API quirks that trip up agents along the way.
Related MCP server: n8n Workflow Builder
Quick Start
git clone https://github.com/r-ms/n8n-mcp.git
cd n8n-mcp
npm install
npm run buildConfiguration
All configuration is via environment variables passed through your MCP client config.
Variable | Required | Description |
| Yes | n8n instance URL (e.g. |
| Yes | n8n Public API key (Settings → API → Create API Key) |
| No | Separate base URL for webhooks if behind a reverse proxy. Defaults to |
| No | n8n MCP Server API key for node discovery tools (Settings → MCP Server). Requires n8n 2.14+ |
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"n8n": {
"type": "stdio",
"command": "node",
"args": ["/path/to/n8n-mcp/dist/index.js"],
"env": {
"N8N_API_URL": "http://localhost:5678",
"N8N_API_KEY": "your-api-key"
}
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["/path/to/n8n-mcp/dist/index.js"],
"env": {
"N8N_API_URL": "http://localhost:5678",
"N8N_API_KEY": "your-api-key"
}
}
}
}Tools (20)
Workflow Management (8)
Tool | Description |
| List all workflows, filter by active status or name |
| Get full workflow definition with pre-flight validation warnings |
| Create workflow with auto-fix for common pitfalls |
| Partial update — auto-hydrates missing fields from current version |
| Deploy a complete workflow from a JSON string. Optionally activate |
| Delete workflow (auto-deactivates first, requires confirmation) |
| Activate workflow (enable triggers) |
| Deactivate workflow (stop triggers) |
Execution & Monitoring (4)
Tool | Description |
| List recent executions with status filtering and success rate |
| Detailed execution trace — node timing, items, errors, knowhow hints. |
| Trigger via webhook. Waits for result by default (120s timeout), returns full trace |
| Run all pre-flight checks on a workflow without executing |
Ad-hoc Execution (1)
Tool | Description |
| Run a one-off node chain — creates temp workflow, executes via webhook, returns trace, auto-cleans up |
Credentials (3)
Tool | Description |
| List all credentials (ID, name, type) |
| Get JSON schema for a credential type — shows required fields before creating |
| Create a credential. On error, auto-fetches schema as a hint |
Node Discovery (3) — requires N8N_MCP_API_KEY
Tool | Description |
| Search available node types by keyword. Returns IDs and discriminators |
| Get TypeScript type definitions for node parameters. Prevents guessing |
| Curated node recommendations by category (chatbot, scheduling, scraping, etc.) |
Diagnostics (1)
Tool | Description |
| Search the embedded knowhow database for solutions to n8n issues |
Pre-flight Validation
Applied automatically on every create and update. Catches and fixes common n8n pitfalls before they reach the API:
Issue | Auto-fix |
Code node v2 without | Downgrade to v1 |
Spaces in trigger node names (break webhooks) | Remove spaces, rewrite connections |
Missing | Add |
| Wrap in |
MongoDB | Set to |
SplitInBatches v3 wired to wrong output | Move connections from output 0 (done) to output 1 (loop) |
Missing | Auto-generate |
Knowhow Database
11 pattern-matched entries. When an error occurs, the server matches it against known n8n issues and surfaces the solution:
Pattern | Solution |
| Use n8n native nodes instead of Code node imports |
ECONNREFUSED in Code node | Task Runner is network-isolated — use HTTP Request node |
MongoDB limit type error | Must be integer, not expression string |
Sub-workflow not published | Activate sub-workflows before parent |
Webhook 404 | Check: active? spaces in name? webhookId set? |
Resilience
Retry with exponential backoff — 3 retries on network errors and 502/503
Execution polling —
n8n_run_workflowpolls every 2s until completion or timeoutWebhook 404 recovery — fuzzy-matches against active webhook paths and suggests corrections
Requirements
Node.js 18+
n8n with Public API enabled (any version)
n8n 2.14+ for node discovery tools (optional)
License
MIT
Available Tools
20 toolsn8n_activate_workflowB
Activate a workflow (enable triggers). Pre-validates before activating.
Inputs: workflowId (required).
n8n_create_credentialA
Create a new credential in n8n. Use n8n_get_credential_schema first to see required fields. On error, auto-fetches the schema as a hint.
Inputs: data (required), name (required), type (required).
n8n_create_workflowA
Create a new n8n workflow with pre-flight validation and auto-fix. Automatically fixes: Code v2→v1, missing settings, webhookId, SplitInBatches ports, MongoDB alwaysOutputData, ExecuteWorkflow workflowId format, node name spaces. After creation use n8n_activate_workflow to enable.
Inputs: name (required), nodes (required), connections (required), settings.
n8n_deactivate_workflowC
Deactivate a workflow (stop triggers).
Inputs: workflowId (required).
n8n_delete_workflowB
Delete a workflow. Auto-deactivates first if active.
Inputs: confirm (required), workflowId (required).
n8n_diagnose_workflowB
Run comprehensive diagnostics on a workflow without executing it. Checks all known n8n pitfalls: Code node versions, webhook paths, credential refs, SplitInBatches wiring, MongoDB alwaysOutputData, etc.
Inputs: workflowId (required).
n8n_get_credential_schemaA
Get the JSON schema for a credential type — shows required fields, types, and defaults. Use this before creating credentials to know exactly what data fields to pass.
Inputs: typeName (required).
n8n_get_executionA
Get detailed execution trace — shows each node's status, item count, errors, and duration. Auto-matches errors against knowhow database for fix suggestions. On failed executions, also runs pre-flight diagnostics on the workflow.
Inputs: executionId (required), verbose.
n8n_get_node_paramsA
Get TypeScript type definitions for n8n node parameters. Returns exact parameter names, types, and structures. MUST be called before writing workflow node definitions — prevents guessing parameter names. Include discriminators from search results if available.
Inputs: nodeId (required), resource, operation.
n8n_get_suggested_nodesA
Get curated node recommendations for workflow technique categories. Returns recommended nodes with pattern hints and configuration guidance. Use when designing a new workflow to discover the best nodes for your use case.
Inputs: categories (required).
n8n_get_workflowA
Get full workflow definition (nodes, connections, settings). Use to inspect structure or prepare updates.
Inputs: workflowId (required).
n8n_list_credentialsA
List all credentials configured in n8n. Shows ID, name, and type for each.
Inputs: no named parameters.
n8n_list_executionsA
List recent workflow executions. Filter by workflow ID or status (success/error). Shows execution timeline and error summary.
Inputs: limit, status, workflowId.
n8n_list_workflowsA
List all n8n workflows. Use to find workflow IDs, check active status, or search by name.
Inputs: active, filter.
n8n_run_adhocA
Run a one-off workflow: creates a temp workflow with your nodes, executes via webhook, waits for the result, then deletes it. Perfect for quick operations (MongoDB queries, HTTP requests) without leaving debris. Do NOT include trigger nodes — a webhook trigger is auto-added.
Inputs: nodes (required), data, timeout, connections.
n8n_run_workflowA
Trigger a workflow execution via its webhook URL. Workflow must have a webhook trigger and be active. By default waits for completion (120s timeout) and returns full execution trace. Set wait_for_result=false to fire-and-forget.
Inputs: webhookPath (required), data, timeout, workflowId, +1 more.
n8n_search_knowhowA
Search the embedded n8n knowhow database for solutions. Query with error messages, node types, or keywords like 'webhook 404', 'Code node require', 'SplitInBatches output'.
Inputs: query (required).
n8n_search_nodesA
Search available n8n node types by keyword. Returns node IDs, discriminators (resource/operation), and related nodes. Use this to find the correct node type before creating workflows.
Inputs: query (required).
n8n_update_workflowC
Update an existing workflow's nodes, connections, or settings. Same validation as create.
Inputs: workflowId (required), name, nodes, settings, +1 more.
n8n_update_workflow_jsonA
Deploy a complete workflow from JSON string. Parses the JSON, runs pre-flight validation/auto-fix, PUTs the update, and optionally activates. Use this for 'edit local file → deploy' patterns instead of raw curl.
Inputs: json (required), workflowId (required), activate.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools map to a clearly distinct resource+action (workflow CRUD, node discovery, execution inspection, credentials, knowhow). The main soft overlaps are n8n_update_workflow vs n8n_update_workflow_json (both deploy workflow changes) and n8n_run_workflow vs n8n_run_adhoc (both execute), but descriptions make the boundaries explicit enough for correct selection. n8n_search_nodes vs n8n_get_suggested_nodes are also adjacent but differentiated as keyword search vs curated recommendations.
Every tool uses the same n8n_ prefix followed by a snake_case verb_noun pattern (list_workflows, get_workflow, create_credential, search_knowhow). No mixing of camelCase or alternate verb styles. The predictable scheme makes related tools easy to group mentally.
Twenty tools is on the heavy side, but the surface spans four genuinely different areas (workflows, nodes, executions, credentials) plus a knowhow lookup, so each tool maps to a real capability. The only arguable redundancy is n8n_update_workflow_json layering on top of n8n_update_workflow, which keeps it just short of a clean 5.
Workflow lifecycle is fully covered (list/get/create/update/delete/activate/deactivate), and executions, node discovery, and credential creation are supported. Gaps are minor: no credential update/delete or single-credential get, no execution delete/retry, and no workflow duplication, but agents can work around these via the JSON deploy and re-run paths.
Maintenance
Related MCP Connectors
Build, check and fix n8n workflows from Claude, Cursor or ChatGPT. Built on 1,100+ real n8n node definitions and curated templates, with a validator that repairs common mistakes (wrong node types, missing settings) and returns JSON ready to import into n8n. Sign in with a free gydmation.com account; nothing to install.
AI automation platform (n8n/Zapier alternative): build, schedule and run workflows from your agent.
Static n8n workflow validator: workflow errors and repair suggestions. No execution.
Build, test and publish agentic workflows from your AI client: approve steps, read tables, see runs.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to create, retrieve, update, and manage n8n workflows through the n8n API. Supports full workflow lifecycle management including activation, deactivation, and deletion operations.3923 npmMIT
- 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
- FlicenseNot gradedqualityDmaintenanceEnables orchestration and management of n8n workflows through tools for creating, updating, diagnosing failed executions, auto-fixing workflows, and installing community nodes.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage n8n workflow automation instances through tools for workflow CRUD operations, execution monitoring, and webhook triggering. It facilitates programmatic interaction with n8n instances via the n8n API with AI-optimized descriptions and error handling.63MIT