Provides tools for managing n8n workflows including creating, updating, listing, activating, deactivating, and executing workflows through n8n's REST API
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 Servercreate a workflow that sends a Slack alert when a new email arrives"
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.
MCP-Based n8n Workflow Builder
A comprehensive MCP (Model Context Protocol) server for building, managing, and executing any n8n workflow via the n8n REST API. This tool removes all node type restrictions and provides full access to your n8n instance's capabilities.
Key Features
š Universal Node Support - Create workflows with ANY n8n node type (no restrictions!) š Comprehensive API Coverage - Workflows, credentials, executions, and node type management š² Complex Workflows - Full support for branching (IF/Switch), error workflows, and multi-path flows š Execution Monitoring - Track workflow runs, view results, and manage execution history š Credential Management - Securely manage n8n credentials programmatically šÆ Smart Validation - Dynamic validation against your n8n instance's available nodes š Audit Logging - Complete audit trail of all operations ā” Rate Limiting - Built-in protection for your n8n instance šļø High Performance - Connection pooling, retry logic, and bulk operations ⨠NEW š Webhook URLs - Automatically retrieve webhook endpoints ⨠NEW š”ļø Circuit Breaker - Automatic failure detection and recovery ⨠NEW š¾ Node Type Caching - 1-hour cache for faster node type lookups ⨠NEW š Metrics & Monitoring - Real-time metrics, health checks, and observability ⨠NEW
MCP Tools Available (28 Total)
Workflow Management:
validate_workflow- Validate workflow specs offlinelist_workflows- List with filtering (name, active status)create_workflow- Create with dry-run, auto-activate, overwriteget_workflow- Fetch full workflow JSONupdate_workflow- Partial updates by ID or namedelete_workflow- Remove workflowsactivate_workflow- Enable/disable workflowsduplicate_workflow- Clone with custom suffixexecute_workflow- Trigger with custom payloadget_webhook_urls- Get webhook URLs for a workflow ⨠NEWbulk_activate_workflows- Activate/deactivate multiple workflows in parallel ⨠NEWbulk_delete_workflows- Delete multiple workflows in parallel ⨠NEW
Execution Monitoring:
list_executions- View execution history (filter by workflow)get_execution- Get detailed execution data & resultsdelete_execution- Clean up execution history
Credential Management:
list_credentials- List all credentials (filter by type)get_credential- View credential details (sensitive data redacted)create_credential- Add new credentialsupdate_credential- Modify existing credentialsdelete_credential- Remove credentials
Node Discovery:
list_node_types- Get all available node types in your instanceget_node_type- Get detailed node documentation and parameters
System Monitoring:
get_circuit_breaker_stats- Monitor API health and circuit breaker state ⨠NEWreset_circuit_breaker- Manually reset circuit breaker after n8n recovery ⨠NEWget_metrics- Comprehensive metrics (requests, latency, errors, cache) ⨠NEWget_health_status- Overall health checks with detailed status ⨠NEWreset_metrics- Reset all collected metrics ⨠NEW
Quickstart
Configure your n8n connection:
Install dependencies:
Run MCP server:
Use with any MCP client (Claude Desktop, etc.)
Example: Create a Complex Workflow
Project Structure
core/- Workflow builder, validator, config, logging, cache, circuit breaker, metrics, workflow helpersclient/- n8n REST API client with full endpoint coveragemcp_server/- MCP server with 28 toolsui/- Optional Gradio web interfacetemplates/- Example workflow templatesexamples/- Usage examples and patternstests/- Comprehensive test suite (65+ tests, 100% passing)
Testing
Run the test suite:
Test coverage includes:
ā Core modules: Workflow builder, validator, utilities
ā Security: Sensitive data redaction in audit logs
ā Reliability: Circuit breaker pattern, rate limiting
ā Performance: Caching with TTL support
ā MCP tools: Tool registration and execution
65+ tests total with comprehensive edge case coverage
Workflow Builder API
Programmatically build workflows with a fluent, chainable API:
Supported Node Types:
add_webhook()- Webhook triggersadd_http_request()- HTTP API callsadd_slack()- Slack notificationsadd_email()- Email sendingadd_if_condition()- Conditional branchingadd_function()- Custom JavaScriptadd_set()- Data transformationadd_node()- Any n8n node type
Helper Functions:
create_simple_webhook_workflow()- Quick webhook ā action workflowscreate_conditional_workflow()- If/then/else patterns
See examples/workflow_builder_example.py for complete examples.
Advanced Features
Complex Branching:
Error Workflows:
Dynamic Node Discovery: Query your instance for available nodes and get detailed documentation:
Use
list_node_types()to see all available nodesUse
get_node_type("n8n-nodes-base.gmail")for specific node details
Security
ā All secrets via environment variables (never hardcoded)
ā Automatic redaction of sensitive data in audit logs (passwords, API keys, tokens, etc.)
ā Comprehensive test suite for security features
ā Rate limiting (default: 60 requests/minute)
ā API key authentication with n8n
ā Audit trail for all destructive operations
ā Security best practices documented in .env.template
ā Recursive sanitization prevents credential leaks in nested objects
Requirements
Python 3.9+
n8n instance with API access enabled
n8n API key (generated in n8n Settings ā API)
Configuration
See .env.template for all options:
N8N_API_URL- Your n8n instance URLN8N_API_KEY- Your n8n API keyN8N_VERSION- Target n8n version (optional)RATE_LIMIT- Requests per minute (default: 60)LOG_LEVEL- Logging verbosity (default: info)
What's New
This version removes ALL node type restrictions and adds:
Support for any n8n node type (Gmail, Sheets, Airtable, custom nodes, etc.)
Full credential management (list, create, update, delete)
Execution monitoring and history
Node type discovery and documentation
Complex workflow branching (IF/Switch with multiple outputs)
Error workflow support
Dynamic validation against your n8n instance
Documentation
For detailed usage examples and API documentation, see the inline docstrings and /templates directory for canonical workflow examples.