Provides AI assistants with direct access to the n8n automation platform.
A comprehensive Model Context Protocol (MCP) server that provides AI assistants with direct access to your n8n automation platform. This server enables seamless integration between AI tools (like Claude Desktop) and n8n workflows, variables, credentials, and executions.
Workflow Management (7 tools)
list_workflows
- List all workflowsget_workflow
- Get workflow details by IDcreate_workflow
- Create new workflowsupdate_workflow
- Update existing workflowsdelete_workflow
- Delete workflowsactivate_workflow
- Activate workflowsdeactivate_workflow
- Deactivate workflowsVariable Management (5 tools)
list_variables
- List all variablesget_variable
- Get variable by keycreate_variable
- Create new variablesupdate_variable
- Update existing variablesdelete_variable
- Delete variablesCredential Management (3 tools)
list_credentials
- List all credentials (sanitized)create_credential
- Create new credentialsdelete_credential
- Delete credentialsExecution Management (2 tools)
list_executions
- List workflow executionsget_execution
- Get execution details by IDSystem Management (1 tool)
self_test
- Test server connectivity and permissionsClone the repository
git clone <repository-url>
cd n8n-mcp
Install dependencies
npm install
Configure environment
cp .env.example .env
# Edit .env with your settings:
# N8N_API_KEY=your-api-key-here
# N8N_BASE_URL=http://localhost:5678
# MCP_PORT=3001
Test the installation
# Test HTTP endpoints
node index.js &
curl http://localhost:3001/health
# Test MCP protocol
node test-all-tools.js
The server runs as a stdio-based MCP server for AI clients:
node index.js
Claude Desktop Configuration (~/.claude_desktop_config.json
):
{
"mcpServers": {
"n8n": {
"command": "node",
"args": ["index.js"],
"cwd": "/path/to/n8n-mcp",
"env": {
"N8N_API_KEY": "your-n8n-api-key-here",
"N8N_BASE_URL": "http://localhost:5678"
}
}
}
}
When run in a terminal (TTY), the server provides HTTP endpoints:
node index.js
# Server starts on http://localhost:3001
# Available endpoints:
# GET /health - Health check
# POST /test - Run self-test
# GET / - Usage instructions
Test the MCP protocol directly:
# Initialize connection
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.js
# List tools
echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | node index.js
# Call a tool
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"self_test","arguments":{}}}' | node index.js
Run the complete test suite to validate all 18 tools:
node test-all-tools.js
This will:
# Health check
curl http://localhost:3001/health
# Quick self-test
curl -POST http://localhost:3001/test
# Individual tool test
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_workflows","arguments":{"limit":5}}}' | node index.js
.env
files for local development1. "N8N_API_TOKEN not configured"
# Solution: Set your API key
export N8N_API_KEY=your-api-key-here
# Or add to .env file
2. "Connection refused" errors
# Solution: Check n8n is running
curl http://localhost:5678/api/v1/workflows?limit=1 -H "X-N8N-API-KEY: your-key"
3. "License does not allow for feat:variables"
# This is expected for n8n Community Edition
# Variables require n8n Pro/Enterprise license
# The tool will still work but return license errors
4. "GET method not allowed" for credentials
# Some n8n configurations restrict credential access
# Check your n8n security settings
5. Port already in use (EADDRINUSE)
# Solution: Kill existing process or change port
pkill -f "node index.js"
# Or set different port: MCP_PORT=3002 node index.js
Enable verbose logging:
DEBUG=1 node index.js
# Test n8n connectivity
curl -H "X-N8N-API-KEY: your-key" http://localhost:5678/api/v1/workflows?limit=1
# Test MCP server
node test-all-tools.js
# Basic health
curl http://localhost:3001/health
# Detailed system test
curl -X POST http://localhost:3001/test | jq '.result.summary'
The server logs all tool executions and provides timing information:
node test-all-tools.js
setupToolHandlers()
test-all-tools.js
MIT License - see LICENSE file for details.
Ready to automate with AI? ๐คโจ
Your n8n workflows are now accessible to AI assistants through the Model Context Protocol!
Manages configurations for MCP clients, automatically detecting file paths based on OS and client.
A simple calculator server for performing basic arithmetic operations.
Manage various router types using natural language. Requires router credentials to be configured.
A sound tool for MCP-compatible IDEs like Cursor. Plays sounds for events like completion, error, and notification.
Integrate ClickUp with AI applications to manage tasks, spaces, lists, and folders.
A universal remote MCP server that connects to popular productivity tools such as Notion, Monday, AirTable, and many more.
Connect to the Taskade platform via MCP. Access tasks, projects, workflows, and AI agents in real-time through a unified workspace and API.
AI-powered task orchestration and workflow automation with specialized agent roles, intelligent task decomposition, and seamless integration across Claude Desktop, Cursor IDE, Windsurf, and VS Code.
Talk with your Apple Notes
Reads EndNote .enl libraries and exposes their contents through the MCP interface.