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 "Install 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-mcplist 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
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Siddharth0903/n8n-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server