
Mcp N8n
io.github.leonardosepulvedat由 GitHub 帳號 leonardosepulvedat 發布v1.5.0更新於 Oct 28, 2026
Operate and build n8n: 61 tools, 560-node catalog, validation, autofix, snapshots and backups.
概覽
讓助手在你自己的 n8n 執行個體上建立、驗證、執行與管理工作流程,內建 560 個節點目錄、快照與備份。
- 可以做什麼
- 建立、讀取、更新、刪除、啟用與轉移工作流程,並可局部增刪節點與連線
- 搜尋並檢視 560 個節點的目錄,驗證工作流程 JSON、自動修復機械性錯誤,匯入公開或內建範本
- 列出、檢視、重試與刪除執行紀錄,偵錯最近一次錯誤,讀取單一節點的執行資料並計算工作流程健康度
- 建立、刪除、轉移憑證並查詢憑證欄位結構
- 管理標籤、變數、使用者、專案與稽核報告,並拉取版本控制
- 對工作流程做快照、比對、回復、匯出與匯入,並觸發 Webhook 工作流程做端對端測試
- 適用情境
- 適合已自架或使用 n8n、希望助手依真實節點結構草擬與修復工作流程、排查失敗執行或直接管理執行個體的情境。也適合透過此伺服器做備份與回復變更。
- 執行需求
- 以本機 stdio 方式執行,可透過 npm(npx 或全域安裝)或 Docker 啟動,需要 Node.js 20 或以上版本。需要設定 N8N_BASE_URL 指向你的 n8n 執行個體,並提供在設定中產生的 N8N_API_KEY,且能連線該執行個體。n8n Cloud 需付費方案才能使用 API,部分操作需要擁有者或管理員權限。可選 N8N_TOOLSETS 限制暴露的工具;可選的 HTTP 模式使用 N8N_MCP_HTTP_PORT 與 N8N_MCP_HTTP_TOKEN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp N8n,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP n8n Server
[npm version] [npm downloads] [CI] [License: MIT] [TypeScript] [n8n]
Operate and build n8n from Cursor or Claude — administration of your instance (users, projects, executions, audit) and a full builder loop: a catalog of 560 nodes with real parameter schemas extracted from the official n8n packages, validation before saving, automatic repair, snapshots with rollback and diff, per-node execution debugging, health reports, and full-instance backup.
Two env vars. Runs on your machine (stdio) or as a remote HTTP server. No hosted account.
🎯 Token Optimization
This server is optimized to minimize token consumption, addressing one of the biggest issues with MCP servers - excessive API token usage.
What We've Optimized:
- 90% reduction in tokens for workflow listing with new
n8n_list_workflows_summaryendpoint - Field filtering - request only the data you need
- Smart defaults - reduced from 100 to 10-20 results per query
- Intelligent warnings - alerts when operations will consume significant tokens
See TOKEN_OPTIMIZATION.md for detailed usage guide.
✨ Features
🔄 Workflow Management
- Create & Deploy: Build workflows with natural language descriptions
- CRUD Operations: Full lifecycle management (Create, Read, Update, Delete)
- Activation Control: Enable/disable workflows on demand
- Project Transfer: Move workflows between projects seamlessly
- Tag Management: Organize workflows with custom tags
📊 Execution Monitoring
- Real-time Tracking: Monitor workflow executions with advanced filters
- Detailed Insights: Access full execution data and logs
- Error Recovery: Retry failed executions automatically
- Cleanup Tools: Manage execution history efficiently
🔐 Credential Management
- Secure Creation: Add credentials for any service
- Schema Discovery: Auto-discover required fields for credential types
- Project Isolation: Transfer credentials between projects safely
- Type Support: Compatible with all n8n credential types
🧱 Workflow Builder
- Full node catalog — 560 nodes with real schemas: extracted directly from
n8n-nodes-baseand@n8n/n8n-nodes-langchain(parameters with types, allowed options, display conditions, credentials, latest typeVersion), regenerated weekly by CI. Search withn8n_search_nodes, inspect withn8n_get_node - Real validation:
n8n_validate_workflowchecks against the real schemas — nonexistent node types, missing required params (including conditionally required ones), invalid option values, wrong typeVersion, broken connections — before save/activate - Expression linting: detects
{{ }}expressions missing the=prefix and references to nodes that don't exist in the workflow - Automatic repair:
n8n_autofix_workflowfixes missing typeVersion/positions, duplicate names, dangling connections and expression prefixes — preview first, apply with a snapshot - Surgical edits:
n8n_update_workflow_partialadds/removes nodes and connections without rewriting the whole flow - Public templates: search and import from n8n.io (
n8n_search_public_templates,n8n_import_public_template) plus 100 bundled templates as a fallback - Guided prompts: MCP prompts
build-workflowandfix-workflowwalk any agent through the full build/validate/test/repair loop
🔬 Deep Debugging & Health
- Per-node execution data:
n8n_get_node_execution_datashows exactly what data flowed through one node (status, item counts, output samples, error details) without downloading the whole execution - Debug loop:
n8n_debug_last_errorreturns the failing node and message from the last error - Health reports:
n8n_workflow_healthcomputes success rate, failure count, average duration and last failure per workflow from recent executions, sorted worst-first
🛡️ Safety Net & Real Testing
- Automatic snapshots: before every update, partial edit, autofix, or delete, the previous state is saved locally (
~/.mcp-n8n/snapshots, configurable withN8N_SNAPSHOT_DIR) - Rollback:
n8n_rollback_workflowrestores any snapshot — even recreates a deleted workflow (recreate=true) - Diff:
n8n_diff_workflow_snapshotcompares a snapshot against the current state (nodes added/removed/modified, changed parameters, connection changes) before deciding to roll back - Full-instance backup:
n8n_export_all_workflowssaves every workflow as JSON files;n8n_import_workflowsrestores them - End-to-end testing:
n8n_trigger_webhookcalls a Webhook-trigger workflow on the instance and returns the real HTTP response, so the agent can verify the flow actually works
🎯 Bundled Templates
- 100 local starting points with keyword matching, if you prefer not to hit n8n.io
🏗️ Organization & Administration
- Tags: Categorize and organize resources
- Variables: Centralized environment variable management
- Projects: Multi-tenant project support
- Users & Permissions: Complete access control management
- Audit Logs: Generate security and compliance reports
🚀 Quick Start
Installation via npm (Recommended)
This is the easiest way to get started:
Configuration
-
Get your n8n API credentials:
- Navigate to your n8n instance → Settings → n8n API
- Generate a new API key
-
Configure Claude Desktop:
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Option A - Using global installation (if you ran npm install -g mcp-n8n):
N8N_TOOLSETS is optional (all by default). Use core,builder if you want operations + creation without user/project admin tools. Use admin only for instance administration.
Remote HTTP mode (optional)
By default the server communicates over stdio (local). To run it as a shared remote server (e.g. in Docker or on a VPS), set a port:
This exposes the MCP protocol over streamable HTTP on port 3000 plus a GET /health endpoint. N8N_MCP_HTTP_TOKEN is strongly recommended: when set, every request must include Authorization: Bearer <token>. Point any MCP client that supports streamable HTTP at http://your-host:3000 with that header.
Option B - Using npx (no installation needed, always latest version):
- Configure Cursor:
Add to Cursor MCP settings (Settings → Extensions → MCP):
Recommended - Using npx (always uses latest version):
Note: Cursor requires using
npxfor MCP servers. The-yflag automatically installs/updates the package without prompting.
Option C - Docker:
The /data volume persists workflow snapshots between runs.
- Restart Claude Desktop or Cursor
💬 Usage Examples
Once configured, interact with n8n using natural language:
Creating Workflows
Using Templates
Managing Workflows
Monitoring & Debugging
🛠️ Available Tools
Workflows
n8n_create_workflow- Create new workflows (validate first)n8n_list_workflows_summary- Token-efficient listingn8n_list_workflows- Full details with optional field filteringn8n_get_workflow- Full workflow JSONn8n_update_workflow- Replace fields (omitted fields keep current values)n8n_update_workflow_partial- Surgical edits: add/remove nodes and connectionsn8n_delete_workflow- Remove workflows permanentlyn8n_activate_workflow/n8n_deactivate_workflown8n_transfer_workflow/ tags tools
Safety & Testing
n8n_list_workflow_snapshots- Local history of every change made through this servern8n_rollback_workflow- Restore a previous version, or recreate a deleted workflown8n_diff_workflow_snapshot- Compare a snapshot against the current state before rolling backn8n_trigger_webhook- Call a webhook workflow and get the real responsen8n_export_all_workflows/n8n_import_workflows- Full-instance backup and restore
Builder
n8n_search_nodes/n8n_get_node- Full catalog: 560 nodes with real parameter schemasn8n_validate_workflow- Check JSON against real schemas before save/activaten8n_autofix_workflow- Mechanical repairs: typeVersion, positions, duplicates, dangling connections, expression prefixesn8n_search_public_templates/n8n_import_public_template- Official n8n.io libraryn8n_list_workflow_templates/n8n_get_workflow_template/n8n_create_workflow_from_template- Bundled templates
100 Included Templates across 13 categories:
- E-commerce: Shopify automation, WooCommerce support agents
- Social Media: Instagram, TikTok, LinkedIn, Twitter automation
- AI/Chat: Chatbots, AI agents, voice assistants
- Communication: WhatsApp, Telegram, Email automation
- Content: Blog automation, video generation, SEO optimization
- HR/Recruitment: Resume screening, candidate sourcing
- Sales/CRM: Lead generation, cold calling pipelines
- Finance: Stock analysis, invoice extraction
- Data Scraping: Google Maps, LinkedIn, Amazon, TikTok
- Monitoring: Website uptime, competitor tracking
- Productivity: Calendar, Notion, scheduling automation
Executions (4 tools)
n8n_list_executions- Filter by status, workflow, projectn8n_get_execution- Detailed execution datan8n_delete_execution- Remove execution recordsn8n_retry_execution- Retry failed executionsn8n_debug_last_error- Failing node + message from the last errorn8n_get_node_execution_data- Data that flowed through one specific noden8n_workflow_health- Success rate, failures and duration per workflow
Credentials (4 tools)
n8n_create_credential- Add new credentialsn8n_delete_credential- Remove credentials (owner only)n8n_get_credential_schema- Discover required fieldsn8n_transfer_credential- Move between projects
Organization (19 tools)
Tags: Create, list, get, update, delete Variables: Create, list, update, delete Users: List, create, get, delete, change role Projects: Create, list, update, delete, manage users
Advanced (2 tools)
n8n_generate_audit- Security audit reportsn8n_pull_source_control- Version control integration
61 tools by default (N8N_TOOLSETS=all). core,builder exposes 28. Plus 2 MCP prompts (build-workflow, fix-workflow).
📚 Documentation
- Quick Start Guide - Get up and running in 5 minutes
- Examples & Use Cases - Real-world automation examples
- Node Reference - Detailed tool documentation
- Changelog - Version history and updates
🏗️ Project Structure
🔧 Development
Local Installation (For Development)
If you want to contribute or test local changes:
1. Setup
2. Configure with Local Build
For Claude Desktop, add to ~/Library/Application Support/Claude/claude_desktop_config.json:
For Cursor, add to MCP settings:
Important: Replace /absolute/path/to/mcp-n8n/ with the actual absolute path to your cloned repository (e.g., /Users/yourname/projects/mcp-n8n/).
3. Testing
How to Run
To run the main script, execute:
How to Test
To run the tests, execute:
📋 Requirements
- Node.js: 20 or higher
- n8n Instance: Self-hosted or n8n Cloud (paid plan)
- n8n API Key: Required for authentication
- AI IDE: Claude Desktop or Cursor with MCP support
n8n Requirements
- Self-hosted: Full API access ✅
- n8n Cloud: Requires paid plan for API access
- Version: Compatible with n8n v1.0.0+
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- n8n - The workflow automation platform
- Anthropic - Claude and Model Context Protocol
- Cursor - AI-powered code editor
🔗 Resources
⚠️ Important Notes
API Access
- n8n Cloud requires a paid plan to access the API
- Self-hosted n8n has full API access on all plans
- Some operations require owner/admin permissions
Security
- Never commit
.envfiles with credentials - Use environment variables for sensitive data
- API keys grant full access to your n8n instance
- Regularly rotate API keys for security
Rate Limiting
- Respect n8n API rate limits
- Use pagination for large result sets
- Implement error handling for rate limit responses
🐛 Troubleshooting
Connection Issues
Problem: "Cannot connect to n8n API"
- Verify
N8N_BASE_URLis correct and accessible - Check that API key is valid
- Ensure n8n instance is running
Permission Errors
Problem: "Insufficient permissions"
- Some operations require owner/admin role
- Verify your user has appropriate permissions
- Check project-level access rights
Template Issues
Problem: "Template not found"
- Ensure
examples/directory is present - Verify
templates-metadata.jsonexists - Check template file references are correct
💡 Tips & Best Practices
- Start with Templates: Use pre-built templates as starting points
- Use Tags: Organize workflows with tags for easy management
- Monitor Executions: Regularly check failed executions
- Clean Up: Remove old execution data to save space
- Version Control: Use n8n's built-in version control features
- Test First: Test workflows before activating in production
📧 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- n8n Community: community.n8n.io
來源:README.md,提交 125218f
工具
0版本歷史
1- v1.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分