Provides comprehensive workflow management for n8n, including building and optimizing workflows, CRUD operations, execution monitoring, debugging, security auditing, drift detection, template management, and AI-powered workflow analysis with intelligent node suggestions and error diagnosis.
๐ n8n Workflow Builder MCP Server
An awesome MCP server for n8n that helps you build, optimize, and debug workflows - directly from Claude! ๐ฏ
๐ Features
๐ง AI-Powered Workflow Design
Smart Node Suggestions: Simply describe what you want to build, and the server suggests the perfect nodes
Template Generator: Generates complete workflow structures from natural language
Best Practices: Knows n8n best practices and warns you about common mistakes
๐ Workflow Analysis & Debugging
Workflow Analyzer: Scans your workflows for issues and optimization potential
Error Debugger: Helps you understand and fix workflow errors
Security Checker: Finds hardcoded credentials and other security problems
๐ Workflow Management (Full CRUD)
List & Filter: Overview of all workflows with status and info
Details View: Detailed information about each workflow
Execution Tracking: View past executions with status and errors
Workflow Creation: Create new workflows from scratch or templates
Workflow Editing: Smart merge updates - change names, modify nodes, adjust settings
โจ NEW: Intelligent node merging prevents accidental data loss (v1.13.2)
โ ๏ธ Note:
activeandtagsfields are read-only and can only be changed in the n8n UI
Workflow Deletion: Delete/archive workflows safely (v1.14.0)
โก Workflow Execution & Monitoring
Manual Trigger: Start workflows directly from Claude (only for workflows with Manual/Webhook triggers)
Custom Input Data: Pass dynamic data to your workflows
Execution Details: Retrieve complete node input/output data for each execution
Execution History: List of all past executions with status
๐ Session State & Context Management
Active Workflow Tracking: Automatically tracks which workflow you're currently working on
Session History: Logs all your actions (analyze, execute, update, etc.)
Recent Workflows: Quick access to your last 10 workflows
Persistent State: Context survives between Claude conversations
Smart Context: Reference workflows by "current" or "last workflow" instead of IDs
โ Workflow Validation & Quality Assurance
Pre-Deployment Validation: Comprehensive checks before deploying workflows
Schema Validation: Ensures workflow structure is correct (required fields, types, etc.)
Semantic Validation: Checks logical rules (trigger nodes, connections, duplicates)
Parameter Validation: Node-specific parameter checks (webhooks, HTTP, databases, etc.)
Security Checks: Detects hardcoded credentials, missing authentication
Best Practices: Warns about default names, missing error handling, complexity
๐ค AI Feedback & Error Analysis
Intelligent Error Analysis: Analyzes failed executions and identifies root causes
Pattern Recognition: Detects common failure types (auth, network, data, SQL, rate limiting)
AI-Friendly Feedback: Structured guidance for AI agents generating workflows
Fix Examples: Wrong vs. Correct code comparisons
Improvement Suggestions: Node-specific recommendations for fixing failures
Learning Loop: AI agents learn from errors and generate better workflows
๐ Knowledge Base
Node Encyclopedia: Detailed explanations of all important n8n nodes
Use Cases & Examples: Practical examples for each node type
Configuration Tips: How to optimally configure each node
๐ Security Audits & Governance (NEW!)
Hardcoded Secret Detection: Finds API keys, passwords, tokens, AWS keys, private keys, JWTs, database credentials
11 Secret Types: Detects AWS keys, GitHub tokens, OpenAI keys, Slack tokens, database URLs, and more
Entropy Analysis: Uses Shannon entropy to detect high-entropy secrets (encrypted/encoded data)
Authentication Auditing: Checks for missing/weak authentication, insecure HTTP, Basic Auth over HTTP
Exposure Analysis: Identifies public webhooks, data leaks, PII exposure, CORS misconfigurations
Security Scoring: 0-100 score with risk levels (Critical, High, Medium, Low, Excellent)
Compliance Validation: Check workflows against Basic, Strict, or Enterprise standards
Detailed Reports: Markdown/JSON/Text reports with findings, recommendations, and remediation steps
Priority Findings: Get only critical/high severity issues for quick triage
๐ฌ Semantic Workflow Analysis
Deep Logic Analysis: Goes beyond schema validation to understand workflow semantics
12 Anti-Pattern Checks: HTTP retry, loop completion, timezone config, IF paths, webhook security, infinite loops, credentials, N+1 queries, rate limiting, data validation, and more
LLM-Friendly Fixes: Copy-paste ready code fixes for AI agents
Severity Levels: Critical, High, Medium, Low prioritization
Detailed Explanations: Why each issue matters and how it impacts workflows
Security Scanning: Detects hardcoded credentials with regex patterns
Performance Analysis: Identifies bottlenecks like N+1 queries
Formatted Reports: Structured output optimized for AI consumption
๐ฏ Template Library & AI Recommendations
10+ Pre-Built Templates: Ready-to-use workflow templates for common use cases
AI-Powered Recommendations: Get intelligent template suggestions based on your description
Smart Relevance Scoring: Advanced algorithm matches templates to your requirements (70-90% accuracy)
Category Browse: Templates organized by category (API, Reporting, Integration, etc.)
Difficulty Levels: Beginner, Intermediate, and Advanced templates
Full-Text Search: Search across names, descriptions, tags, and use cases
Template Details: Complete implementation guides with estimated time and node structure
๐ญ Intent Metadata & AI Context (NEW!)
"Why" Documentation: Attach reasoning, assumptions, and risks to each node
AI Context Continuity: LLMs remember why nodes exist across iterations
5 Intent Fields: reason, assumption, risk, alternative, dependency
Coverage Analysis: Track which nodes have intent metadata
AI-Generated Suggestions: Get intent templates for undocumented nodes
Workflow Understanding: Understand existing workflows faster
Learning Loop: AI agents learn from past decisions
๐ Execution-Aware Feedback Loop (NEW!)
Real-Time Monitoring: Watch workflow executions and get instant error feedback
Error Simplification: Complex n8n errors simplified for AI agents
Context Extraction: Get full error context (node, input, output, error details)
Pattern Analysis: Analyze error patterns across multiple executions
Success Rate Tracking: Monitor workflow reliability over time
Fix Suggestions: Specific recommendations for fixing failed nodes
LLM-Optimized Output: Structured feedback designed for AI consumption
๐ Drift Detection & Degradation Analysis (NEW!)
Proactive quality monitoring that detects workflow degradation before it becomes critical
General Drift Detection
Success Rate Drift: Detects >15% drop in workflow success rate
Performance Drift: Identifies >50% increase in execution time
New Error Patterns: Finds new error types that didn't exist before
Error Frequency Drift: Detects 2x+ increase in existing error rates
Change Point Detection: Pinpoints exactly when drift started
Gradual vs Sudden Analysis: Classifies changes as gradual degradation or sudden breaks
Specialized Analyzers
Schema Drift: API response structure changes (missing fields, type changes, null rate increases)
Rate Limit Drift: 429 errors, throughput degradation, quota proximity warnings
Data Quality Drift: Empty values, format violations, completeness degradation
Intelligent Analysis
Root Cause Detection: 10+ evidence-based root causes (API rate limits, auth changes, schema changes, etc.)
Confidence Scoring: 0.0-1.0 confidence for all analysis results
Statistical Comparison: Baseline (first 30%) vs Current (last 30%) period analysis
Evidence Collection: Tracks concrete metrics supporting each finding
Actionable Fixes
Node-Specific Suggestions: Concrete fixes for each affected node
Severity Grouping: Critical, Warning, and Info fixes
Copy-Paste Ready: Implementation-ready code suggestions
Testing Recommendations: Step-by-step testing guides
Confidence Scores: Prioritize fixes by confidence level (85-95%)
Real-World Use Cases
โ API Provider Changes: Detects when APIs change authentication, schemas, or rate limits โ Performance Degradation: Finds external service slowdowns before SLAs breach โ Credential Expiry: Identifies auth failures from expired tokens โ Data Quality Issues: Tracks increasing null values or format violations โ Rate Limit Problems: Catches approaching quota limits early
Requires: 20+ executions for reliable drift detection
๐ Explainability Layer (NEW!)
Comprehensive Documentation: Automatic, audit-ready workflow documentation
Purpose Analysis: Explains WHY workflows exist with business domain classification (10 domains)
Data Flow Tracing: Complete data lineage from sources โ transformations โ destinations
Dependency Mapping: Maps internal workflows + 25+ external services (Slack, Stripe, AWS, etc.)
Risk Assessment: 5 risk categories (data loss, security, performance, availability, compliance)
Mitigation Plans: Prioritized, actionable recommendations with confidence scores
Multi-Format Export: Markdown (docs), JSON (APIs), Plain Text (console)
AI-Native: Designed for LLM consumption with structured, consistent output
Zero Configuration: Works instantly with any n8n workflow
๐ฎ Change Simulation & Approval System (NEW!)
Terraform-Style Preview: Like
terraform planfor n8n workflows - see changes before applyingBreaking Change Detection: Automatically identifies critical changes (trigger removal, connection changes)
Multi-Dimensional Impact Analysis: Analyzes impact across 5 dimensions (data flow, execution, dependencies, triggers, downstream)
Risk Scoring: 0-10 risk score with severity levels (low, medium, high, critical)
Dry-Run Validation: Validates structure, semantics, and performance without applying changes
Approval Workflow: Create, review, approve/reject change requests with full audit trail
Change History: Complete history of all workflow changes with timestamps and reviewers
Color-Coded Output: ๐ด Breaking, ๐ก Structural, ๐ข Safe changes
Performance Estimation: Predicts execution time, memory usage, complexity
Recommendations: Actionable suggestions based on impact analysis
๐ฏ Intelligent Template System v2.0 (NEW!)
Intent-Based Matching: Describe your goal โ get smart template suggestions (not keyword search!)
Multi-Source Adapters: Official n8n templates, GitHub repos, private repos
Intent Extraction: Automatically extracts purpose, assumptions, risks, data flow from templates
Trigger-Aware Scoring: Penalizes wrong trigger types (webhook when you need schedule)
Template Adaptation: Modernizes 2022 templates โ 2025-ready (placeholders, credentials, error handling)
Provenance Tracking: Trust scores, success rates, usage stats for template reliability
Semantic Understanding: "AI analysis" matches "machine learning", "telegram" matches "notification"
Transparent Matching: Shows WHY templates match with detailed explanations
๐ฆ Node Discovery System (NEW!)
Workflow-based learning that discovers available n8n nodes without API dependency
Intelligent Discovery
Automatic Learning: Analyzes your workflows to discover all node types you use
Real-World Schemas: Extracts actual parameters from live workflows (not documentation!)
Usage Insights: Tracks node popularity, parameter types, credential requirements
SQLite Persistence: Knowledge saved to
~/.n8n-mcp/node_discovery.dbZero Configuration: Works on all n8n versions - no API required!
Smart Recommendations
Task-Based Suggestions: "send slack message" โ Telegram, Gmail, chatTrigger
Advanced Scoring: Exact keyword (5pts), Synonym (2.5pts), Parameter (+1pt), Popularity (+3pts max)
Bidirectional Synonyms: 40+ mappings (slackโtelegram, excelโsheets, databaseโpostgres)
Reason Generation: "Matches: send, message" or "Similar: slack" explains why nodes match
Category Classification: โกtrigger, ๐data_source, ๐transform, ๐ฌnotification, ๐http, ๐logic, ๐งutility
Smart Search & Schema
Keyword Search: Find nodes by name with category icons
Detailed Schemas: Get parameter names, types, credentials, usage counts
Parameter Type Inference: Learns types from real data (string, number, boolean, object, array)
Usage Statistics: See which nodes are most popular in your workflows
Performance
Fast Discovery: 100 workflows in ~15s
Quick Recommendations: < 200ms for 100 discovered nodes
In-Memory Caching: Database loaded on startup for instant queries
4 New Tools: discover_nodes, get_node_schema, search_nodes, recommend_nodes_for_task
๐ Migration Engine
Automatic Compatibility Checking: Detects deprecated nodes and parameters in workflows
Smart Migration Rules: 7 built-in rules for common n8n nodes (HTTP, Postgres, Slack, etc.)
Version Detection: Identifies compatibility issues from n8n 0.180.0 to 2.2.6
n8n 2.0+ Support: Detects removed Start node, disabled ExecuteCommand/LocalFileTrigger, Code node security changes
Dry-Run Mode: Preview changes before applying migrations
Batch Operations: Check multiple workflows at once with summary statistics
Severity Levels: Prioritize fixes by impact (critical, high, medium, low)
Safe Transformations: Validates migrations to prevent data loss
Detailed Reports: Complete before/after comparison and migration logs
๐ฏ Use Cases
1. From Workflow Idea to Finished Structure
2. Workflow Debugging
3. Workflow Optimization
4. Smart Template Recommendations (NEW!)
5. Drift Detection (NEW!)
6. Migration Engine (NEW!)
7. Workflow Explainability (NEW!)
8. Change Simulation & Safe Deployments (NEW!)
๐ฆ Installation
1. Install Dependencies
2. Configuration
Your .env should look like this:
3. Test Server
4. Claude Desktop Integration
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Option 1: With Virtual Environment (Recommended)
Option 2: With Global Python
Option 3: Direct with server.py (Legacy)
Option 4: With .env File (Most Secure)
With this option, credentials are read from the .env file.
IMPORTANT:
Replace
/ABSOLUTE/PATH/TO/with your actual path!Windows users: Use
\\or/as path separatorWindows Python path:
.venv\Scripts\python.exeinstead of.venv/bin/python
5. Restart Claude Desktop
Completely quit and reopen - then the MCP server should be available! ๐
๐ฎ Usage Examples
Get Node Suggestions
Generate Complete Workflow
Analyze Workflow
Explore Node Details
Debug Errors
List Workflows
Execute Workflow
Create Workflow
Edit Workflow
Get Template Recommendations (NEW!)
Browse Template Library (NEW!)
Search Templates (NEW!)
Get Template Details (NEW!)
Semantic Workflow Analysis (NEW!)
Get Execution Details
Important: To see execution data, the following options must be enabled in n8n Settings > Executions:
โ Save manual executions
โ Save execution progress
Context & State Management
Workflow Validation
Example Output:
Intent Metadata (NEW!)
Migration Engine (NEW!)
Execution Monitoring (NEW!)
AI Error Analysis & Feedback
Example Output:
Explainability (NEW!)
๐ง Knowledge Base
The server knows these node categories:
Triggers
Webhook: API endpoints, external integrations
Schedule: Cron jobs, periodic tasks
Manual: Testing, manual interventions
Logic Nodes
IF: Conditional branching
Switch: Multi-way branching
Merge: Combine data streams
Code: Custom JavaScript/Python
Data Operations
HTTP Request: API calls
Set: Data transformation
Function: Complex data processing
Storage
Postgres: Relational database
Redis: Caching, session storage
Integrations
Slack: Messaging & notifications
Telegram: Bot integration
Gmail: Email automation
๐ ๏ธ Advanced Features
Custom Templates
The server comes with predefined templates:
api_endpoint: Simple REST APIscheduled_report: Daily/hourly reportsdata_sync: Database synchronization
Security Checks
Finds hardcoded credentials
Warns about missing authentication
Checks for insecure patterns
Performance Analysis
Calculate workflow complexity
Detect oversized workflows
Suggest splits for better maintainability
๐พ State File
The server stores session state in ~/.n8n_workflow_builder_state.json. This file contains:
Currently active workflow
Recent workflows (last 10)
Session history (last 50 actions)
Timestamps
This allows the server to maintain context between Claude conversations!
To reset state: Use the clear_session_state tool or delete the file manually:
๐ Troubleshooting
Server Won't Start
"Authentication failed"
Check if your API key is correct
Go to n8n Settings > API and create a new key
Make sure there are no spaces in the key
"Connection refused"
Is your n8n instance reachable?
Check:
curl https://your-n8n-instance.com/healthzFirewall/VPN might be blocking
Claude Desktop Doesn't Recognize Server
Completely quit Claude (also in background!)
Check config file (valid JSON?)
Paths absolute (not relative!)
Restart Claude
Check in Claude: Settings > Developer > MCP Servers
๐ก Pro Tips
1. Workflow Naming
Always rename nodes! "HTTP Request 1" is bad, "Fetch User Data" is good
Use prefixes for categories: "[API] Get Users", "[DB] Insert Record"
2. Error Handling
Always add error handling for critical workflows
Use "Error Trigger" node for global error handling
Log errors in Slack/Telegram for monitoring
3. Testing
Always develop with "Manual Trigger" instead of direct webhook
Use "Pinned Data" for consistent tests
Split production/development workflows
4. Performance
Batch API calls where possible
Use Redis for caching
Avoid too many sequential HTTP requests
5. Security
NEVER hardcode API keys - always use credentials
Enable webhook authentication
Only store sensitive data encrypted
๐ State Management Deep Dive
For detailed information about the state management and context tracking system, see:
State Management Documentation - Complete guide
State File Example - Example state file
Quick summary:
Automatically tracks active workflow
Remembers last 10 workflows
Logs last 50 actions with timestamps
Persists between Claude sessions
Stored in
~/.n8n_workflow_builder_state.json
โ Workflow Validation Deep Dive
For detailed information about the validation system, see:
Validation Documentation - Complete validation guide
Quick summary:
3-layer validation: Schema, Semantics, Parameters
30+ validation rules
Security checks (credentials, authentication, SQL injection)
Node-specific parameter validation
Comprehensive error/warning reports
Validates before deployment
๐ค AI Feedback Deep Dive
For detailed information about the AI feedback system, see:
AI Feedback Documentation - Complete AI feedback guide
Quick summary:
Intelligent error pattern recognition
Root cause identification (6+ error types)
AI-friendly structured feedback
Fix examples (wrong vs. correct)
Workflow improvement suggestions
Learning loop for AI agents
๐ RBAC & Multi-Tenant Security Deep Dive
For detailed information about the security system, see:
RBAC & Security Documentation - Complete enterprise security guide
Quick summary:
5 role types (Admin, Developer, Operator, Viewer, Auditor)
20+ granular permissions
Multi-tenant isolation (separate workflows per tenant)
Approval workflows for critical operations
Comprehensive audit logging (SOC2, ISO27001, GDPR ready)
Cannot approve own requests (separation of duties)
RBAC Usage Examples
Enterprise Features
โ Role-Based Access Control
5 built-in roles with predefined permissions
Granular permission checks before operations
Flexible role assignment per user
โ Multi-Tenant Isolation
Complete data segregation between tenants
Separate workflows, users, audit logs per tenant
Tenant-based access control
โ Approval Workflows
4 critical operations require approval
Cannot approve own requests
Full audit trail of approval decisions
โ Audit Logging
Last 500 security events stored
Filter by user, action, timestamp
Compliance-ready (SOC2, ISO27001, GDPR)
โ Security by Design
Least privilege principle
Separation of duties
Immutable audit logs
No self-approval
๐ Updates & Extensions
Add Custom Nodes to Knowledge Base
Edit server.py and extend NODE_KNOWLEDGE:
Create Custom Templates
Edit WORKFLOW_TEMPLATES in server.py:
๐ API Reference
The server uses the official n8n REST API:
Base URL:
https://your-n8n-instance.com/api/v1Docs: https://docs.n8n.io/api/
Used endpoints:
GET /workflows- List workflowsGET /workflows/{id}- Get workflow detailsPOST /workflows- Create workflowPUT /workflows/{id}- Update workflowPOST /workflows/{id}/run- Execute workflowGET /executions- Get execution historyGET /executions/{id}- Get execution details
๐ค Contributing
Ideas? Issues? PRs welcome! ๐
๐ Drift Detection Deep Dive
For detailed information about the drift detection system, see:
Drift Detection Documentation - Complete drift detection guide
Quick summary:
Temporal comparison: baseline (first 30%) vs current (last 30%) execution periods
4 drift patterns: success rate, performance, new errors, error frequency
Change point detection: finds when metrics changed significantly
7 root cause types: rate limits, dependency failures, schema changes, credentials, resource exhaustion, logic bugs, config drift
Confidence scoring: 0.0-1.0 for all analysis
Actionable fixes: error-type specific with testing recommendations
๐ญ Intent Metadata Deep Dive
For detailed information about the intent metadata system, see:
Intent Metadata Documentation - Complete intent system guide
Quick summary:
"Why" documentation for each workflow node
5 fields: reason, assumption, risk, alternative, dependency
AI context continuity across iterations
Coverage analysis and suggestions
Stored in node metadata (n8n native field)
๐ Execution Monitoring Deep Dive
For detailed information about execution monitoring, see:
Execution Monitoring Documentation - Complete monitoring guide
Quick summary:
Real-time execution watching with error detection
Error simplification for AI consumption
Context extraction (node, input, output, error)
Pattern analysis across multiple executions
Fix suggestions with confidence scores
๐ Migration Engine Deep Dive
For detailed information about the migration system, see:
Migration Engine Documentation - Complete migration guide
Quick summary:
Automatic node compatibility checking
Rule-based transformations for node version upgrades
7 built-in migration rules (HTTP Request, Postgres, Slack, Function, Webhook, Set)
Dry-run mode for safe previews
Batch compatibility checks across all workflows
Severity-based issue prioritization (critical, high, medium, low)
Validates migrations to prevent data loss
๐ Explainability Layer Deep Dive
For detailed information about the explainability layer, see:
Explainability Layer Documentation - Complete explainability guide
Quick summary:
Automatic, audit-ready workflow documentation
Purpose analysis with business domain classification (10 domains)
Complete data flow tracing (sources โ transformations โ sinks)
Dependency mapping (internal workflows + 25+ external services)
5-category risk assessment (data loss, security, performance, availability, compliance)
Multi-format export (Markdown/JSON/Plain Text)
Zero configuration, works with any workflow
๐ฎ Change Simulation & Approval Deep Dive
For detailed information about change simulation and approval workflows, see:
Change Simulation Documentation - Complete change simulation guide
Quick summary:
Terraform-style workflow change preview (like
terraform plan)Breaking change detection (trigger removal, connection changes, output nodes)
Multi-dimensional impact analysis (5 dimensions)
Risk scoring algorithm (0-10 scale)
Dry-run validation (structure + semantics + performance)
Approval workflow with audit trail
Performance estimation and recommendations
6 New MCP Tools:
simulate_workflow_changes- Preview changes with terraform-style plancompare_workflows- Side-by-side workflow comparisonanalyze_change_impact- Multi-dimensional impact analysiscreate_change_request- Create approval requestreview_change_request- Approve/reject changesget_change_history- View workflow change history
๐ Intelligent Template System v2.0
For detailed information about the template system, see:
Template System Documentation - Complete intelligent template system guide
Quick summary:
Multi-source template adapters (n8n official, GitHub, local files)
AI-powered template recommendations based on intent understanding
Semantic matching beyond simple keywords
Template quality scoring and ranking
Automatic caching and deduplication
Zero configuration required
๐ฆ Version History
See CHANGELOG.md for complete version history and release notes.
Latest Release: v1.22.1 - Complete n8n 2.2.6 Node Coverage
Recent Releases
v1.22.1 - Complete node coverage with 61 nodes (Jan 2025)
v1.22.0 - n8n 2.2.6 compatibility (Jan 2025)
v1.21.0 - Version tracking system (Dec 2024)
v1.20.0 - Documentation access & node replacement (Dec 2024)
๐ Example Workflows
Check out the examples/ directory for ready-to-use workflow examples:
Simple API Endpoint - Basic webhook with JSON response
Daily Sales Report - Scheduled Postgres query โ Slack notification
User Registration API - Complete CRUD with validation and error handling
Each example includes:
โ Complete working workflow JSON
โ Documentation and setup instructions
โ Best practices and security tips
โ SQL schemas and configuration examples
๐ License
MIT - Do whatever you want!
๐ Credits
Built for awesome n8n automation ๐
Powered by Claude MCP โก
Made with โค๏ธ for DevOps Engineers
Happy Automating! ๐
For questions or problems: Just ask Claude! ๐