MCP for managing n8n projects
Configuration
View docs{
"mcpServers": {
"codehalwell-n8n-mcp": {
"command": "python",
"args": [
"-m",
"mcp_server"
],
"env": {
"LOG_LEVEL": "info",
"RATE_LIMIT": "60",
"N8N_API_KEY": "YOUR_API_KEY",
"N8N_API_URL": "https://your-n8n.example.com",
"N8N_VERSION": "0.214.0"
}
}
}
}You have an MCP server that lets you build, manage, and run any n8n workflow through the n8n REST API. It removes node-type restrictions, provides comprehensive tooling, and adds monitoring, security, and operational features to your n8n instance. This guide walks you through using the server, installing it, and leveraging its tools to create powerful automation workflows.
Install and run the MCP server, then connect your MCP client to start building workflows. You can create, validate, and execute workflows that use any n8n node type, manage credentials securely, and monitor executions in real time. Use the available tools to list, create, update, activate, and delete workflows; trigger executions and inspect results; manage credentials; discover node types; and view system metrics and health. You can also enable webhook endpoints, run bulk operations, and observe audit logs for a complete governance trail.
1) Configure your n8n connection:
cp .env.template .env
# Edit .env with your n8n URL and API key
2) Install dependencies:
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
3) Run MCP server:
python -m mcp_server # Runs health check then starts serverThe MCP server reads configuration from environment variables. Typical options include the URL of your n8n instance and the API key needed to access it. You can adjust rate limits, logging verbosity, and the target n8n version if applicable. Audit logs capture destructive operations and credentials are redacted in outputs for security.
Operationally, you start the server once you have a running Python environment and a configured n8n connection. The server exposes a rich set of tools for workflow management, execution monitoring, credential handling, node discovery, and health metrics.
Create and manage a complex workflow by combining webhook triggers, HTTP requests, conditional branching, and notifications. You can trigger executions with custom payloads, route results through different paths, and persist data to a database. Use the discovery tools to inspect available node types and documentation for each node, then assemble workflows that reflect your business logic.
Validate workflow specifications offline to ensure correctness before deployment.
List workflows with optional filters such as name or active status.
Create a new workflow with dry-run options, auto-activate, or overwrite existing ones.
Fetch the full JSON representation of a workflow by ID or name.
Apply partial updates to an existing workflow by ID or name.
Remove workflows from the MCP server.
Enable or disable a workflow's execution.
Clone an existing workflow with a customizable suffix.
Trigger a workflow run with a specific payload.
Retrieve webhook endpoints for a workflow.
Activate or deactivate multiple workflows in parallel.
Delete multiple workflows in parallel.
View execution history with optional filters by workflow.
Get detailed information and results for a specific execution.
Clean up execution history to manage storage.
List all credentials, with optional filtering by type.
View credential details with sensitive data redacted.
Add new credentials for workflows and API access.
Modify existing credentials.
Remove credentials from the store.
Discover all available node types exposed by your n8n instance.
Retrieve detailed documentation and parameters for a specific node type.
Monitor API health and current circuit breaker state.
Manually reset the circuit breaker after n8n recovery.
Collect comprehensive metrics such as requests, latency, and cache status.
Perform overall health checks with detailed status information.
Reset all collected metrics to start fresh.