n8n-mcp
Enables running n8n instances locally via Docker for development and testing purposes, with pre-configured setup including PostgreSQL database.
Provides comprehensive integration with n8n's REST API, offering 43 tools for managing workflows, executions, credentials, tags, variables, data tables, and admin operations including security audits and API capability discovery.
Supports n8n instances backed by PostgreSQL databases, which is the default database configuration when running n8n via Docker.
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 list my active workflows and show their last execution status"
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
The most comprehensive MCP server for n8n — 43 tools, 8 prompt templates, and 6 browsable resources covering the entire n8n REST API surface. The first Python implementation.
Give Claude (or any MCP-compatible AI client) full control over your n8n instance: build workflows, run executions, manage credentials, query data tables, run security audits — all through natural language.
Highlights
43 MCP Tools — Full CRUD for workflows, executions, credentials, tags, variables, and data tables, plus admin operations like security audits and API capability discovery
Double-Validated Workflow Creation —
create_and_validate_workflowruns a 6-phase pipeline: create, structural read-back check, two execution passes, consistency comparison, and a PASS/FAIL verdictWrite Safety by Default — All mutating operations are disabled unless you explicitly opt in with
N8N_MCP_WRITE_MODE=true8 Guided Prompt Templates — Multi-step AI workflows for debugging, health checks, security reviews, workflow creation with full testing, and more
Async & Paginated — Built on
httpxwith cursor-based auto-pagination and configurable timeouts
Related MCP server: n8n-MCP
Features
Category | Tools |
Workflows (13) |
|
Executions (8) |
|
Credentials (5) |
|
Tags (5) |
|
Variables (4) |
|
Data Tables (5) |
|
Admin (3) |
|
Plus 8 MCP prompt templates and 6 browsable resources.
Prerequisites
Python 3.10+
n8n instance — local (Docker) or remote (cloud-hosted)
n8n API key — generated from n8n Settings
Quick Start
1. Clone and install
git clone https://github.com/Siddharth0903/n8n-mcp.git
cd n8n-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .2. Start n8n (if you don't have one running)
docker compose up -dThis starts n8n with PostgreSQL at http://localhost:5678.
3. Get your n8n API key
Open
http://localhost:5678in your browserComplete the initial setup if this is a fresh instance
Go to Settings (gear icon) > n8n API
Click Create an API key
Copy the key
4. Configure environment
cp .env.example .envEdit .env with your values:
N8N_MCP_BASE_URL=http://localhost:5678 # Your n8n URL
N8N_MCP_API_KEY=your-api-key-here # The API key from step 3
N8N_MCP_WRITE_MODE=false # Set to 'true' to enable create/update/delete5. Run the server
n8n-mcpThe MCP server is now running over stdio, ready for any MCP client to connect.
Client Integration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"n8n": {
"command": "/absolute/path/to/your/.venv/bin/n8n-mcp",
"env": {
"N8N_MCP_BASE_URL": "http://localhost:5678",
"N8N_MCP_API_KEY": "your-api-key-here",
"N8N_MCP_WRITE_MODE": "true"
}
}
}
}Tip: Use the full absolute path to the
n8n-mcpbinary inside your virtualenv.
Claude Code (CLI)
claude mcp add n8n -- /absolute/path/to/your/.venv/bin/n8n-mcpOr add to your project's .mcp.json:
{
"mcpServers": {
"n8n": {
"command": "/absolute/path/to/your/.venv/bin/n8n-mcp",
"env": {
"N8N_MCP_BASE_URL": "http://localhost:5678",
"N8N_MCP_API_KEY": "your-api-key-here",
"N8N_MCP_WRITE_MODE": "true"
}
}
}
}Any MCP Client
n8n-mcp uses the standard MCP stdio transport. Any MCP-compatible client can connect by launching the n8n-mcp binary.
Configuration
All settings are configured via environment variables (or .env file):
Variable | Default | Description |
|
| n8n instance URL |
| (required) | n8n API key |
|
| Enable create/update/delete operations |
|
| HTTP request timeout in seconds |
|
| Default pagination limit |
| (optional) | Basic Auth username for webhook triggers |
| (optional) | Basic Auth password for webhook triggers |
MCP Resources
Browsable read-only views of your n8n data:
URI | Description |
| All workflows with name, ID, active status, and tags |
| Full workflow structure including nodes and connections |
| Execution history for a specific workflow |
| Detailed execution data with per-node results |
| All instance variables |
| All data tables with schemas |
MCP Prompts
Guided multi-step templates that walk the AI through complex operations:
Prompt | Description |
| Step-by-step guide to diagnose and fix a failing workflow |
| Audit all workflows for health issues and security risks |
| Generate execution analytics and success rate reports |
| Find a workflow matching a natural language description |
| Analyze a data table's structure, quality, and contents |
| Full security review of the n8n instance |
| Create a new workflow with 6-phase validation and delivery checklist |
| End-to-end validation of an existing workflow: structure, credentials, history, and live test |
Safety
Write mode is OFF by default — only read operations work until you explicitly set
N8N_MCP_WRITE_MODE=trueCredential secrets are never exposed — the n8n API only returns metadata, never secret values
Webhook path validation — prevents path traversal and SSRF attacks
Structured error responses — every error returns actionable JSON with hints, not raw exceptions
Request timeouts — configurable timeouts prevent hanging connections
Architecture
Claude / MCP Client
|
v
+-----------+
| n8n-mcp | FastMCP server (Python, async)
| |
| 43 tools | Workflows, Executions, Credentials,
| 6 rsrc | Tags, Variables, Data Tables, Admin
| 8 prompts |
+-----+-----+
| httpx (async, paginated)
v
+-----------+
| n8n API | REST /api/v1
+-----+-----+
|
v
+-----------+
| Workflows |
| & Data |
+-----------+Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest -v
# Lint
ruff check src/ tests/
# Type check
mypy src/License
Available Tools
43 toolsactivate_workflowB
Activate (publish) a workflow so its triggers start running. Requires write_mode.
Inputs: workflow_id (required), version_id. Returns: result
create_and_validate_workflowA
Create a workflow with automatic double-validation: structural check, two execution passes, and consistency comparison. Returns a comprehensive PASS/FAIL report. Provide test_data for meaningful functional testing. Requires write_mode.
Inputs: name (required), nodes (required), connections (required), settings, +1 more. Returns: result
create_credentialA
Create a new credential. Use get_credential_schema to discover required fields first.
Inputs: name (required), credential_type (required), data (required). Returns: result
create_data_tableB
Create a new data table. Columns need 'name' and 'type' (string/number/boolean/dateTime).
Inputs: name (required), columns (required). Returns: result
create_tagA
Create a new tag. Requires write_mode.
Inputs: name (required). Returns: result
create_variableB
Create a new instance variable. Requires write_mode.
Inputs: key (required), value (required). Returns: result
create_workflowB
Create a new workflow. Requires write_mode to be enabled.
Inputs: name (required), nodes (required), connections (required), settings. Returns: result
deactivate_workflowA
Deactivate a workflow so its triggers stop running. Requires write_mode.
Inputs: workflow_id (required). Returns: result
delete_credentialB
Delete a credential. Requires write_mode.
Inputs: credential_id (required). Returns: result
delete_executionB
Delete an execution from the history. Requires write_mode.
Inputs: execution_id (required). Returns: result
delete_tagB
Delete a tag. Requires write_mode.
Inputs: tag_id (required). Returns: result
delete_variableB
Delete an instance variable. Requires write_mode.
Inputs: variable_id (required). Returns: result
delete_workflowB
Delete a workflow. Requires write_mode.
Inputs: workflow_id (required). Returns: result
discover_capabilitiesB
Discover available API capabilities based on the current API key's scopes.
Inputs: resource, operation, include_schemas. Returns: result
execute_workflowB
Execute a workflow with optional test data for end-to-end validation. Requires write_mode.
Inputs: workflow_id (required), test_data. Returns: result
generate_auditC
Generate a security audit. Categories: credentials, database, nodes, filesystem, instance.
Inputs: categories, days_abandoned_workflow. Returns: result
get_credential_schemaB
Get the required fields for a credential type (e.g., 'slackApi', 'githubApi').
Inputs: credential_type (required). Returns: result
get_data_tableB
Get a data table's schema and column definitions.
Inputs: table_id (required). Returns: result
get_executionB
Get detailed information about a specific execution, including per-node inputs and outputs.
Inputs: execution_id (required), include_data. Returns: result
get_execution_tagsB
Get annotation tags for an execution.
Inputs: execution_id (required). Returns: result
get_tagC
Get a specific tag by ID.
Inputs: tag_id (required). Returns: result
get_workflowB
Get detailed information about a specific workflow including its nodes, connections, and settings.
Inputs: workflow_id (required). Returns: result
get_workflow_tagsB
Get all tags assigned to a workflow.
Inputs: workflow_id (required). Returns: result
get_workflow_versionB
Retrieve a specific version of a workflow from the version history.
Inputs: workflow_id (required), version_id (required). Returns: result
insert_table_rowsB
Insert rows into a data table. Each row is a dict of column_name: value. Requires write_mode.
Inputs: table_id (required), rows (required). Returns: result
list_credentialsA
List all credentials (metadata only — secrets are never exposed).
Inputs: limit. Returns: result
list_data_tablesC
List all data tables in the instance.
Inputs: limit, sort_by. Returns: result
list_executionsB
List workflow executions. Filter by workflow_id, status (success/error/running/waiting/canceled/crashed), project_id.
Inputs: workflow_id, status, project_id, include_data, +1 more. Returns: result
list_tagsB
List all tags in the instance.
Inputs: limit. Returns: result
list_variablesC
List all instance variables — key-value pairs accessible across all workflows.
Inputs: limit, project_id. Returns: result
list_workflowsB
List all workflows with optional filtering by active status, tags, name, or project.
Inputs: active, tags, name, project_id, +1 more. Returns: result
query_table_rowsB
Query rows from a data table with optional filtering, sorting, and full-text search.
Inputs: table_id (required), filter_json, sort_by, search, +1 more. Returns: result
retry_executionB
Retry a failed execution. Set load_workflow=true to use the latest workflow version.
Inputs: execution_id (required), load_workflow. Returns: result
source_control_pullB
Pull changes from the connected Git repository. Requires write_mode and source control configured.
Inputs: force. Returns: result
stop_executionB
Stop a running execution. Requires write_mode.
Inputs: execution_id (required). Returns: result
stop_many_executionsC
Stop multiple executions matching filter criteria. Status options: 'queued', 'running', 'waiting'.
Inputs: status (required), workflow_id, started_after, started_before. Returns: result
trigger_webhook_testB
Trigger a workflow via its webhook URL with test data. Workflow must be active.
Inputs: webhook_path (required), test_data, method. Returns: result
update_credentialB
Update an existing credential. Requires write_mode.
Inputs: credential_id (required), name, data. Returns: result
update_execution_tagsB
Update annotation tags on an execution. Requires write_mode.
Inputs: execution_id (required), tag_ids (required). Returns: result
update_tagB
Rename a tag. Requires write_mode.
Inputs: tag_id (required), name (required). Returns: result
update_variableB
Update an existing instance variable. Requires write_mode.
Inputs: variable_id (required), key (required), value (required). Returns: result
update_workflowC
Update an existing workflow. Requires write_mode.
Inputs: workflow_id (required), name, nodes, connections, +1 more. Returns: result
update_workflow_tagsA
Replace all tags on a workflow. Requires write_mode.
Inputs: workflow_id (required), tag_ids (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 43 tools
Most tools have distinct purposes targeting specific resources like workflows, credentials, executions, tags, variables, and data tables, with clear CRUD operations. However, some potential overlap exists between execute_workflow and trigger_webhook_test (both involve running workflows), and stop_execution vs stop_many_executions could be confusing if not carefully read. Overall, descriptions help clarify boundaries, but minor ambiguity remains.
Tool names follow a highly consistent verb_noun pattern throughout, such as create_workflow, get_workflow, update_workflow, delete_workflow, and similarly for credentials, tags, variables, executions, and data tables. All names use snake_case uniformly, with clear action verbs (list, get, create, update, delete, execute, stop, etc.), making the set predictable and easy to navigate.
With 43 tools, the count is excessive for typical MCP server scopes, which are best kept focused with 3-15 tools. While n8n is a complex workflow automation platform, this many tools can overwhelm agents and increase cognitive load. A more streamlined set grouping related operations or using parameters could reduce the count without losing functionality, making it borderline heavy for effective agent use.
The tool surface provides comprehensive coverage for managing n8n workflows and related resources, including full CRUD operations for workflows, credentials, tags, variables, data tables, and executions, plus advanced features like execution control, auditing, versioning, and source control. There are no obvious gaps; agents can perform end-to-end lifecycle management, validation, and monitoring within this domain.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Security scanner for n8n workflows + live MCP Trust-Check. 18 rules, OWASP mapped. Paid x402 API.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI assistants with access to documentation, schemas, and operations for over 535 n8n workflow automation nodes. It enables models to understand, create, and manage n8n workflows through natural language by connecting to the n8n API.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that empowers AI assistants to build, validate, and manage n8n workflows by providing structured access to documentation for over 1,200 nodes and thousands of templates. It enables deep integration with n8n instances for automated workflow orchestration and management through natural language.1MIT
- AlicenseBqualityBmaintenanceMCP server for managing n8n workflows through AI assistants. Supports workflow CRUD operations, synchronization, inspection, and execution support for automation-focused workflows.19155 npm2MIT
- FlicenseBqualityDmaintenanceA full-power MCP server for n8n that enables AI agents to create, read, update, delete, and test workflows and credentials, including webhook testing, validation, and backup/versioning.319-