n8n MCP Server
Allows AI assistants to manage workflows (create, read, update, delete, activate, deactivate), execute workflows manually, list execution history, list credentials metadata, and check health of an n8n instance.
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 MCP ServerShow me all active workflows in n8n"
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
An enterprise-grade Model Context Protocol (MCP) server that enables AI assistants like Claude to securely interact with n8n workflow automation platform.
Built for regulated industries including cryptocurrency, fintech, and enterprises requiring strict security controls.
Security Features
TLS/SSL Enforcement: HTTPS required by default, certificate verification enabled
Audit Logging: Comprehensive logging with correlation IDs for compliance
Rate Limiting: Built-in protection against abuse
Input Validation: Strict validation with injection pattern detection
Sensitive Data Redaction: API keys and secrets never logged
Request Tracing: Correlation IDs for debugging and forensics
See SECURITY.md for full security documentation.
Related MCP server: n8n Architect MCP Server
Features
Workflow Management: Create, read, update, delete, activate, and deactivate workflows
Execution Control: Execute workflows manually and monitor execution history
Credential Visibility: List available credentials (metadata only)
Health Monitoring: Check connectivity and server status
Prerequisites
Python 3.10 or higher
An n8n instance with API access enabled
n8n API key (How to generate)
Quick Start
1. Clone the repository
git clone https://github.com/tommytang2414/n8n-mcp-server.git
cd n8n-mcp-server2. Install dependencies
pip install -r requirements.txt3. Configure environment
# Copy the example environment file
cp .env.example .env
# IMPORTANT: Set secure permissions (Unix/Linux/macOS)
chmod 600 .env
# Edit .env with your n8n credentials4. Configure Claude Code
Add to your Claude Code settings (~/.claude/settings.json):
Windows:
{
"mcpServers": {
"n8n": {
"command": "py",
"args": ["-3", "C:\\path\\to\\n8n-mcp-server\\server.py"]
}
}
}macOS/Linux:
{
"mcpServers": {
"n8n": {
"command": "python3",
"args": ["/path/to/n8n-mcp-server/server.py"]
}
}
}Configuration
Required Variables
Variable | Description | Example |
| n8n instance URL (HTTPS recommended) |
|
| n8n API key (min 32 chars) |
|
Security Variables
Variable | Description | Default |
| Require HTTPS for non-localhost |
|
| Verify TLS certificates |
|
| Enable audit logging |
|
Optional Variables
Variable | Description | Default |
| Request timeout (seconds) |
|
| Max payload size (bytes) |
|
| Logging level |
|
Available Tools
Workflow Management
Tool | Description |
| List all workflows with optional filtering |
| Get details of a specific workflow |
| Create a new workflow |
| Update an existing workflow |
| Delete a workflow |
| Activate a workflow (enable triggers) |
| Deactivate a workflow (disable triggers) |
| Import a workflow from JSON |
Execution Management
Tool | Description |
| Manually execute a workflow |
| List execution history with filters |
| Get details of a specific execution |
Other
Tool | Description |
| List available credentials (metadata only) |
| Check n8n connectivity and health |
Example Usage
List all workflows:
"Show me all active workflows in n8n"
Create a workflow:
"Create a workflow that triggers daily at 8am and sends a Slack message"
Debug a failed execution:
"Why did my last workflow execution fail?"
Health check:
"Check if n8n is connected and working"
Audit Logging
When AUDIT_LOG_ENABLED=true, all operations are logged in JSON format:
{
"timestamp": "2024-01-15T10:30:00.000Z",
"correlation_id": "a1b2c3d4e5f6",
"operation": "create_workflow",
"success": true,
"duration_ms": 125.5,
"parameters": {"name": "My Workflow"}
}Project Structure
n8n-mcp-server/
├── server.py # Main MCP server (enterprise security)
├── requirements.txt # Python dependencies
├── .env.example # Configuration template
├── .env # Your configuration (git-ignored)
├── .gitignore # Git ignore rules
├── SECURITY.md # Security policy and documentation
├── SPEC.md # API specification
└── README.md # This fileTroubleshooting
"HTTPS required" error
Your n8n URL uses HTTP instead of HTTPS
For development only: set
N8N_REQUIRE_HTTPS=false
"TLS verification failed"
Certificate issue with your n8n instance
For self-signed certs in development: set
N8N_VERIFY_TLS=false
"Rate limit exceeded"
Too many requests in a short time
Wait and retry, or check for loops in your usage
"Authentication failed"
Check
N8N_API_KEYis correctVerify API key hasn't expired
Ensure API key has required permissions
Development
# Run with debug logging
LOG_LEVEL=DEBUG python server.py
# Run security scan
pip install bandit
bandit -r server.py
# Check dependencies for vulnerabilities
pip install safety
safety check -r requirements.txtContributing
Fork the repository
Create a feature branch
Make your changes (security-impacting changes require review)
Submit a pull request
See SECURITY.md for security guidelines.
License
MIT License - see LICENSE for details.
Changelog
v2.0.0 (2024) - Enterprise Security Edition
TLS/SSL enforcement by default
Comprehensive audit logging with correlation IDs
Rate limiting protection
Enhanced input validation with injection detection
Sensitive data redaction
Security policy documentation
.env file permission checking
v1.2.0
Added
.envfile supportAdded health check tool
Improved logging
v1.0.0
Initial release
This server cannot be installed
Maintenance
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/tommytang2414/n8n-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server