A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to n8n node documentation, properties, and operations. Deploy in minutes to give Claude and other AI assistants deep knowledge about n8n's 525+ workflow automation nodes.
n8n-MCP serves as a bridge between n8n's workflow automation platform and AI models, enabling them to understand and work with n8n nodes effectively. It provides structured access to:
- π 528 n8n nodes from both n8n-nodes-base and @n8n/n8n-nodes-langchain
- π§ Node properties - 99% coverage with detailed schemas
- β‘ Node operations - 63.6% coverage of available actions
- π Documentation - 90% coverage from official n8n docs (including AI nodes)
- π€ AI tools - 263 AI-capable nodes detected with full documentation
NEVER edit your production workflows directly with AI! Always:
- π Make a copy of your workflow before using AI tools
- π§ͺ Test in development environment first
- πΎ Export backups of important workflows
- β‘ Validate changes before deploying to production
AI results can be unpredictable. Protect your work!
Get n8n-MCP running in 5 minutes:
Prerequisites: Node.js installed on your system
# Run directly with npx (no installation needed!)
npx n8n-mcp
Add to Claude Desktop config:
Basic configuration (documentation tools only):
{
"mcpServers": {
"n8n-mcp": {
"command": "npx",
"args": ["n8n-mcp"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true"
}
}
}
}
Full configuration (with n8n management tools):
{
"mcpServers": {
"n8n-mcp": {
"command": "npx",
"args": ["n8n-mcp"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true",
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}
Note: npx will download and run the latest version automatically. The package includes a pre-built database with all n8n node information.
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
Restart Claude Desktop after updating configuration - That's it! π
Prerequisites: Docker installed on your system
π¦ Install Docker (click to expand)
macOS:
# Using Homebrew
brew install --cask docker
# Or download from https://www.docker.com/products/docker-desktop/
Linux (Ubuntu/Debian):
# Update package index
sudo apt-get update
# Install Docker
sudo apt-get install docker.io
# Start Docker service
sudo systemctl start docker
sudo systemctl enable docker
# Add your user to docker group (optional, to run without sudo)
sudo usermod -aG docker $USER
# Log out and back in for this to take effect
Windows:
# Option 1: Using winget (Windows Package Manager)
winget install Docker.DockerDesktop
# Option 2: Using Chocolatey
choco install docker-desktop
# Option 3: Download installer from https://www.docker.com/products/docker-desktop/
Verify installation:
docker --version
# Pull the Docker image (~280MB, no n8n dependencies!)
docker pull ghcr.io/czlonkowski/n8n-mcp:latest
β‘ Ultra-optimized: Our Docker image is 82% smaller than typical n8n images because it contains NO n8n dependencies - just the runtime MCP server with a pre-built database!
Add to Claude Desktop config:
Basic configuration (documentation tools only):
{
"mcpServers": {
"n8n-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "MCP_MODE=stdio",
"-e", "LOG_LEVEL=error",
"-e", "DISABLE_CONSOLE_OUTPUT=true",
"ghcr.io/czlonkowski/n8n-mcp:latest"
]
}
}
}
Full configuration (with n8n management tools):
{
"mcpServers": {
"n8n-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "MCP_MODE=stdio",
"-e", "LOG_LEVEL=error",
"-e", "DISABLE_CONSOLE_OUTPUT=true",
"-e", "N8N_API_URL=https://your-n8n-instance.com",
"-e", "N8N_API_KEY=your-api-key",
"ghcr.io/czlonkowski/n8n-mcp:latest"
]
}
}
}
π‘ Tip: If youβre running n8n locally on the same machine (e.g., via Docker), use http://host.docker.internal:5678 as the N8N_API_URL.
Note: The n8n API credentials are optional. Without them, you'll have access to all documentation and validation tools. With them, you'll additionally get workflow management capabilities (create, update, execute workflows).
Important: The -i
flag is required for MCP stdio communication.
Configuration file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
Restart Claude Desktop after updating configuration - That's it! π
Prerequisites: Node.js installed on your system
# 1. Clone and setup
git clone https://github.com/czlonkowski/n8n-mcp.git
cd n8n-mcp
npm install
npm run build
npm run rebuild
# 2. Test it works
npm start
Add to Claude Desktop config:
Basic configuration (documentation tools only):
{
"mcpServers": {
"n8n-mcp": {
"command": "node",
"args": ["/absolute/path/to/n8n-mcp/dist/mcp/index.js"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true"
}
}
}
}
Full configuration (with n8n management tools):
{
"mcpServers": {
"n8n-mcp": {
"command": "node",
"args": ["/absolute/path/to/n8n-mcp/dist/mcp/index.js"],
"env": {
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true",
"N8N_API_URL": "https://your-n8n-instance.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}
Note: The n8n API credentials can be configured either in a
.env
file (create from.env.example
) or directly in the Claude config as shown above.
π‘ Tip: If youβre running n8n locally on the same machine (e.g., via Docker), use http://host.docker.internal:5678 as the N8N_API_URL.
For the best results when using n8n-MCP with Claude Projects, use these enhanced system instructions:
You are an expert in n8n automation software using n8n-MCP tools. Your role is to design, build, and validate n8n workflows with maximum accuracy and efficiency.
## Core Workflow Process
1. **ALWAYS start new conversation with**: `tools_documentation()` to understand best practices and available tools.
2. **Discovery Phase** - Find the right nodes:
- Think deeply about user request and the logic you are going to build to fulfill it. Ask follow-up questions to clarify the user's intent, if something is unclear. Then, proceed with the rest of your instructions.
- `search_nodes({query: 'keyword'})` - Search by functionality
- `list_nodes({category: 'trigger'})` - Browse by category
- `list_ai_tools()` - See AI-capable nodes (remember: ANY node can be an AI tool!)
3. **Configuration Phase** - Get node details efficiently:
- `get_node_essentials(nodeType)` - Start here! Only 10-20 essential properties
- `search_node_properties(nodeType, 'auth')` - Find specific properties
- `get_node_for_task('send_email')` - Get pre-configured templates
- `get_node_documentation(nodeType)` - Human-readable docs when needed
- It is good common practice to show a visual representation of the workflow architecture to the user and asking for opinion, before moving forward.
4. **Pre-Validation Phase** - Validate BEFORE building:
- `validate_node_minimal(nodeType, config)` - Quick required fields check
- `validate_node_operation(nodeType, config, profile)` - Full operation-aware validation
- Fix any validation errors before proceeding
5. **Building Phase** - Create the workflow:
- Use validated configurations from step 4
- Connect nodes with proper structure
- Add error handling where appropriate
- Use expressions like $json, $node["NodeName"].json
- Build the workflow in an artifact for easy editing downstream (unless the user asked to create in n8n instance)
6. **Workflow Validation Phase** - Validate complete workflow:
- `validate_workflow(workflow)` - Complete validation including connections
- `validate_workflow_connections(workflow)` - Check structure and AI tool connections
- `validate_workflow_expressions(workflow)` - Validate all n8n expressions
- Fix any issues found before deployment
7. **Deployment Phase** (if n8n API configured):
- `n8n_create_workflow(workflow)` - Deploy validated workflow
- `n8n_validate_workflow({id: 'workflow-id'})` - Post-deployment validation
- `n8n_update_partial_workflow()` - Make incremental updates using diffs
- `n8n_trigger_webhook_workflow()` - Test webhook workflows
## Key Insights
- **USE CODE NODE ONLY WHEN IT IS NECESSARY** - always prefer to use standard nodes over code node. Use code node only when you are sure you need it.
- **VALIDATE EARLY AND OFTEN** - Catch errors before they reach deployment
- **USE DIFF UPDATES** - Use n8n_update_partial_workflow for 80-90% token savings
- **ANY node can be an AI tool** - not just those with usableAsTool=true
- **Pre-validate configurations** - Use validate_node_minimal before building
- **Post-validate workflows** - Always validate complete workflows before deployment
- **Incremental updates** - Use diff operations for existing workflows
- **Test thoroughly** - Validate both locally and after deployment to n8n
## Validation Strategy
### Before Building:
1. validate_node_minimal() - Check required fields
2. validate_node_operation() - Full configuration validation
3. Fix all errors before proceeding
### After Building:
1. validate_workflow() - Complete workflow validation
2. validate_workflow_connections() - Structure validation
3. validate_workflow_expressions() - Expression syntax check
### After Deployment:
1. n8n_validate_workflow({id}) - Validate deployed workflow
2. n8n_list_executions() - Monitor execution status
3. n8n_update_partial_workflow() - Fix issues using diffs
## Response Structure
1. **Discovery**: Show available nodes and options
2. **Pre-Validation**: Validate node configurations first
3. **Configuration**: Show only validated, working configs
4. **Building**: Construct workflow with validated components
5. **Workflow Validation**: Full workflow validation results
6. **Deployment**: Deploy only after all validations pass
7. **Post-Validation**: Verify deployment succeeded
## Example Workflow
### 1. Discovery & Configuration
search_nodes({query: 'slack'})
get_node_essentials('n8n-nodes-base.slack')
### 2. Pre-Validation
validate_node_minimal('n8n-nodes-base.slack', {resource:'message', operation:'send'})
validate_node_operation('n8n-nodes-base.slack', fullConfig, 'runtime')
### 3. Build Workflow
// Create workflow JSON with validated configs
### 4. Workflow Validation
validate_workflow(workflowJson)
validate_workflow_connections(workflowJson)
validate_workflow_expressions(workflowJson)
### 5. Deploy (if configured)
n8n_create_workflow(validatedWorkflow)
n8n_validate_workflow({id: createdWorkflowId})
### 6. Update Using Diffs
n8n_update_partial_workflow({
workflowId: id,
operations: [
{type: 'updateNode', nodeId: 'slack1', changes: {position: [100, 200]}}
]
})
## Important Rules
- ALWAYS validate before building
- ALWAYS validate after building
- NEVER deploy unvalidated workflows
- USE diff operations for updates (80-90% token savings)
- STATE validation results clearly
- FIX all errors before proceeding
Save these instructions in your Claude Project for optimal n8n workflow assistance with comprehensive validation.
- π Smart Node Search: Find nodes by name, category, or functionality
- π Essential Properties: Get only the 10-20 properties that matter (NEW in v2.4.0)
- π― Task Templates: Pre-configured settings for common automation tasks
- β Config Validation: Validate node configurations before deployment
- π Dependency Analysis: Understand property relationships and conditions
- π‘ Working Examples: Real-world examples for immediate use
- β‘ Fast Response: Average query time ~12ms with optimized SQLite
- π Universal Compatibility: Works with any Node.js version
"Before MCP, I was translating. Now I'm composing. And that changes everything about how we can build automation."
When Claude, Anthropic's AI assistant, tested n8n-MCP, the results were transformative:
Without MCP: "I was basically playing a guessing game. 'Is it scheduleTrigger
or schedule
? Does it take interval
or rule
?' I'd write what seemed logical, but n8n has its own conventions that you can't just intuit. I made six different configuration errors in a simple HackerNews scraper."
With MCP: "Everything just... worked. Instead of guessing, I could ask get_node_essentials()
and get exactly what I needed - not a 100KB JSON dump, but the actual 5-10 properties that matter. What took 45 minutes now takes 3 minutes."
The Real Value: "It's about confidence. When you're building automation workflows, uncertainty is expensive. One wrong parameter and your workflow fails at 3 AM. With MCP, I could validate my configuration before deployment. That's not just time saved - that's peace of mind."
Once connected, Claude can use these powerful tools:
tools_documentation
- Get documentation for any MCP tool (START HERE!)list_nodes
- List all n8n nodes with filtering optionsget_node_info
- Get comprehensive information about a specific nodeget_node_essentials
- Get only essential properties with examples (10-20 properties instead of 200+)search_nodes
- Full-text search across all node documentationsearch_node_properties
- Find specific properties within nodeslist_ai_tools
- List all AI-capable nodes (ANY node can be used as AI tool!)get_node_as_tool_info
- Get guidance on using any node as an AI tool
get_n 8000 ode_for_task
- Pre-configured node settings for common taskslist_tasks
- Discover available task templatesvalidate_node_operation
- Validate node configurations (operation-aware, profiles support)validate_node_minimal
- Quick validation for just required fieldsvalidate_workflow
- Complete workflow validation including AI tool connectionsvalidate_workflow_connections
- Check workflow structure and AI tool connectionsvalidate_workflow_expressions
- Validate n8n expressions including $fromAI()get_property_dependencies
- Analyze property visibility conditionsget_node_documentation
- Get parsed documentation from n8n-docsget_database_statistics
- View database metrics and coverage
These powerful tools allow you to manage n8n workflows directly from Claude. They're only available when you provide N8N_API_URL
and N8N_API_KEY
in your configuration.
n8n_create_workflow
- Create new workflows with nodes and connectionsn8n_get_workflow
- Get complete workflow by IDn8n_get_workflow_details
- Get workflow with execution statisticsn8n_get_workflow_structure
- Get simplified workflow structuren8n_get_workflow_minimal
- Get minimal workflow info (ID, name, active status)n8n_update_full_workflow
- Update entire workflow (complete replacement)n8n_update_partial_workflow
- Update workflow using diff operations (NEW in v2.7.0!)n8n_delete_workflow
- Delete workflows permanentlyn8n_list_workflows
- List workflows with filtering and paginationn8n_validate_workflow
- Validate workflows already in n8n by ID (NEW in v2.6.3)
n8n_trigger_webhook_workflow
- Trigger workflows via webhook URLn8n_get_execution
- Get execution details by IDn8n_list_executions
- List executions with status filteringn8n_delete_execution
- Delete execution records
n8n_health_check
- Check n8n API connectivity and featuresn8n_diagnostic
- Troubleshoot management tools visibility and configuration issuesn8n_list_available_tools
- List all available management tools
// Get essentials for quick configuration
get_node_essentials("nodes-base.httpRequest")
// Find nodes for a specific task
search_nodes({ query: "send email gmail" })
// Get pre-configured settings
get_node_for_task("send_email")
// Validate before deployment
validate_node_operation({
nodeType: "nodes-base.httpRequest",
config: { method: "POST", url: "..." },
profile: "runtime" // or "minimal", "ai-friendly", "strict"
})
// Quick required field check
validate_node_minimal({
nodeType: "nodes-base.slack",
config: { resource: "message", operation: "send" }
})
For contributors and advanced users:
Prerequisites:
- Node.js (any version - automatic fallback if needed)
- npm or yarn
- Git
# 1. Clone the repository
git clone https://github.com/czlonkowski/n8n-mcp.git
cd n8n-mcp
# 2. Clone n8n docs (optional but recommended)
git clone https://github.com/n8n-io/n8n-docs.git ../n8n-docs
# 3. Install and build
npm install
npm run build
# 4. Initialize database
npm run rebuild
# 5. Start the server
npm start # stdio mode for Claude Desktop
npm run start:http # HTTP mode for remote access
# Build & Test
npm run build # Build TypeScript
npm run rebuild # Rebuild node database
npm run test-nodes # Test critical nodes
npm run validate # Validate node data
npm test # Run all tests
# Update Dependencies
npm run update:n8n:check # Check for n8n updates
npm run update:n8n # Update n8n packages
# Run Server
npm run dev # Development with auto-reload
npm run dev:http # HTTP dev mode
- Installation Guide - Comprehensive installation instructions
- Claude Desktop Setup - Detailed Claude configuration
- Docker Guide - Advanced Docker deployment options
- MCP Quick Start - Get started quickly with n8n-MCP
- Workflow Diff Operations - Token-efficient workflow updates (NEW!)
- Transactional Updates - Two-pass workflow editing
- MCP Essentials - AI-optimized tools guide
- Validation System - Smart validation profiles
- HTTP Deployment - Remote server setup guide
- Dependency Management - Keeping n8n packages in sync
- Claude's Interview - Real-world impact of n8n-MCP
- Change Log - Complete version history
- Claude Instructions - AI guidance for this codebase
- MCP Tools Reference - Complete list of available tools
Current database coverage (n8n v1.101.1):
- β 528/528 nodes loaded (100%)
- β 520 nodes with properties (98.5%)
- β 470 nodes with documentation (90%)
- β 263 AI-capable tools detected
- β AI Agent & LangChain nodes fully documented
- β‘ Average response time: ~12ms
- πΎ Database size: ~15MB (optimized)
See CHANGELOG.md for full version history and recent changes.
When using n8n-MCP with Claude Desktop in Docker mode, Claude Desktop may start the container twice during initialization. This is a known Claude Desktop bug (modelcontextprotocol/servers#812).
Symptoms:
- Two identical containers running for the same MCP server
- Container name conflicts if using
--name
parameter - Doubled resource usage
Workarounds:
- Avoid using --name parameter - Let Docker assign random names:
{
"mcpServers": {
"n8n-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"ghcr.io/czlonkowski/n8n-mcp:latest"
]
}
}
}
- Use HTTP mode instead - Deploy n8n-mcp as a standalone HTTP server:
docker compose up -d # Start HTTP server
Then connect via mcp-remote (see HTTP Deployment Guide)
- Use Docker MCP Toolkit - Better container management through Docker Desktop
This issue does not affect the functionality of n8n-MCP itself, only the container management in Claude Desktop.
MIT License - see LICENSE for details.
Attribution appreciated! If you use n8n-MCP, consider:
- β Starring this repository
- π¬ Mentioning it in your project
- π Linking back to this repo
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Run tests (
npm test
) - Submit a pull request
- n8n team for the workflow automation platform
- Anthropic for the Model Context Protocol
- All contributors and users of this project
Making AI + n8n workflow creation delightful