MCP server for n8n workflow management
Project description
n8n-mcp
MCP server for n8n workflow management. Provides AI assistants with the ability to review workflow status in n8n instances.
Generated by GRIMLOCK MCP Factory.
Features
- check_workflows: Reviews all workflows and reports their status, including active/inactive counts and workflows with recent errors.
Installation
# Clone or download the package
cd n8n-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/macOS
# or: venv\Scripts\activate # Windows
# Install package
pip install -e .
Configuration
Create a .env file or set environment variables:
# Base URL of your n8n instance (no trailing slash)
N8N_BASE_URL=https://your-n8n-instance.app.n8n.cloud
# API key from n8n Settings > API
N8N_API_KEY=your_api_key_here
Getting Your n8n API Key
- Open your n8n instance
- Go to Settings > API
- Create a new API key or copy an existing one
- Use the full URL of your n8n instance for
N8N_BASE_URL
Usage
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"n8n": {
"command": "/path/to/n8n-mcp/venv/bin/python",
"args": ["-m", "n8n_mcp.server"],
"env": {
"N8N_BASE_URL": "https://your-n8n-instance.app.n8n.cloud",
"N8N_API_KEY": "your_api_key_here"
}
}
}
}
Running Directly
# Activate virtual environment
source venv/bin/activate
# Run the server
python -m n8n_mcp.server
Available Tools
check_workflows
Reviews all workflows and reports their status.
Parameters: None
Returns:
total_workflows: Total number of workflowsactive_workflows: Number of active workflowsinactive_workflows: Number of inactive workflowsworkflows_with_errors: Count of workflows with recent errorserror_workflows: List of workflows with errors (id, name, error count)workflows: Detailed list of all workflows with execution stats
Example Response:
{
"total_workflows": 5,
"active_workflows": 3,
"inactive_workflows": 2,
"workflows_with_errors": 1,
"error_workflows": [
{"id": "2", "name": "Data Sync", "errors": 3}
],
"workflows": [
{
"id": "1",
"name": "Email Notifications",
"active": true,
"recent_executions": {
"success": 10,
"error": 0,
"waiting": 0,
"running": 0
}
}
]
}
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=n8n_mcp
# Type checking
mypy src/
# Linting
ruff check src/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file m2ai_n8n_mcp-1.0.0.tar.gz.
File metadata
- Download URL: m2ai_n8n_mcp-1.0.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d34bf9eacaa42bcac94fc89ff0fef5714c9a0e8e4dc35e9799d61954b04a9575
|
|
| MD5 |
c5b57775aadc32d00e6acb865bb990d7
|
|
| BLAKE2b-256 |
d046ca0835d67037b8202528cbaedf024ae5a80489c5b8d11649ffc6c213c61b
|
File details
Details for the file m2ai_n8n_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: m2ai_n8n_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35dcd8084f66096231440a4a0060b914f3f4db20f228f73ac1bd311b45673317
|
|
| MD5 |
4db3c3c1d9e5c0388d891d16da51876e
|
|
| BLAKE2b-256 |
dcd67f198dfaefeef4f0dadbb476cb345cde047580e809eede5d9c5b8d533844
|