n8n-mcp-tools-expert by czlonkowski/n8n-skills
npx skills add https://github.com/czlonkowski/n8n-skills --skill n8n-mcp-tools-expert使用 n8n-mcp MCP 服务器工具构建工作流的主指南。
n8n-mcp 提供按类别组织的工具:
| 工具 | 使用场景 | 速度 |
|---|---|---|
search_nodes | 通过关键词查找节点 | <20ms |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
get_node |
| 理解节点操作 (detail="standard") |
| <10ms |
validate_node | 检查配置 (mode="full") | <100ms |
n8n_create_workflow | 创建工作流 | 100-500ms |
n8n_update_partial_workflow | 编辑工作流 (最常用!) | 50-200ms |
validate_workflow | 检查完整工作流 | 100-500ms |
n8n_deploy_template | 部署模板到 n8n 实例 | 200-500ms |
工作流程 :
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [可选] get_node({nodeType: "nodes-base.name", mode: "docs"})
示例 :
// 步骤 1: 搜索
search_nodes({query: "slack"})
// 返回: nodes-base.slack
// 步骤 2: 获取详情
get_node({nodeType: "nodes-base.slack"})
// 返回: 操作、属性、示例 (标准详情)
// 步骤 3: 获取可读文档
get_node({nodeType: "nodes-base.slack", mode: "docs"})
// 返回: markdown 文档
常见模式 : 搜索 → get_node (平均 18 秒)
工作流程 :
1. validate_node({nodeType, config: {}, mode: "minimal"}) - 检查必填字段
2. validate_node({nodeType, config, profile: "runtime"}) - 完整验证
3. [重复] 修复错误,再次验证
常见模式 : 验证 → 修复 → 验证 (每周期 23 秒思考,58 秒修复)
工作流程 :
1. n8n_create_workflow({name, nodes, connections})
2. n8n_validate_workflow({id})
3. n8n_update_partial_workflow({id, operations: [...]})
4. n8n_validate_workflow({id}) 再次验证
5. n8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]})
常见模式 : 迭代更新 (编辑之间平均 56 秒)
不同工具使用两种不同的格式!
// 使用短前缀
"nodes-base.slack"
"nodes-base.httpRequest"
"nodes-base.webhook"
"nodes-langchain.agent"
使用此格式的工具 :
// 使用完整前缀
"n8n-nodes-base.slack"
"n8n-nodes-base.httpRequest"
"n8n-nodes-base.webhook"
"@n8n/n8n-nodes-langchain.agent"
使用此格式的工具 :
// search_nodes 返回两种格式
{
"nodeType": "nodes-base.slack", // 用于搜索/验证工具
"workflowNodeType": "n8n-nodes-base.slack" // 用于工作流工具
}
问题 : "Node not found" 错误
// 错误
get_node({nodeType: "slack"}) // 缺少前缀
get_node({nodeType: "n8n-nodes-base.slack"}) // 错误的前缀
// 正确
get_node({nodeType: "nodes-base.slack"})
问题 : 负载巨大,响应慢,浪费 token
// 错误 - 返回 3-8K token,谨慎使用
get_node({nodeType: "nodes-base.slack", detail: "full"})
// 正确 - 返回 1-2K token,覆盖 95% 的使用场景
get_node({nodeType: "nodes-base.slack"}) // detail="standard" 是默认值
get_node({nodeType: "nodes-base.slack", detail: "standard"})
何时使用 detail="full" :
更好的替代方案 :
get_node({detail: "standard"}) - 用于操作列表 (默认)get_node({mode: "docs"}) - 用于可读文档get_node({mode: "search_properties", propertyQuery: "auth"}) - 用于特定属性问题 : 太多误报或遗漏真实错误
配置文件 :
minimal - 仅必填字段 (快速,宽松)
runtime - 值 + 类型 (部署前推荐)
ai-friendly - 减少误报 (用于 AI 配置)
strict - 最大程度验证 (用于生产)
// 错误 - 使用默认配置文件 validate_node({nodeType, config})
// 正确 - 明确指定配置文件 validate_node({nodeType, config, profile: "runtime"})
会发生什么 : 在任何工作流更新时,所有节点都会被清理
自动修复 :
无法修复 :
断开的连接
分支计数不匹配
矛盾的损坏状态
// 在任意更新后,自动清理会在所有节点上运行 n8n_update_partial_workflow({id, operations: [...]}) // → 自动修复运算符结构
问题 : 多输出节点的复杂 sourceIndex 计算
旧方法 (手动):
// IF 节点连接
{
type: "addConnection",
source: "IF",
target: "Handler",
sourceIndex: 0 // 哪个输出?很难记!
}
新方法 (智能参数):
// IF 节点 - 语义分支名称
{
type: "addConnection",
source: "IF",
target: "True Handler",
branch: "true" // 清晰易读!
}
{
type: "addConnection",
source: "IF",
target: "False Handler",
branch: "false"
}
// Switch 节点 - 语义 case 编号
{
type: "addConnection",
source: "Switch",
target: "Handler A",
case: 0
}
问题 : 工具响应帮助较小
// 错误 - 响应没有上下文
n8n_update_partial_workflow({
id: "abc",
operations: [{type: "addNode", node: {...}}]
})
// 正确 - 更好的 AI 响应
n8n_update_partial_workflow({
id: "abc",
intent: "为 API 失败添加错误处理",
operations: [{type: "addNode", node: {...}}]
})
常见工作流程 : 步骤之间平均 18 秒
// 步骤 1: 搜索 (快!)
const results = await search_nodes({
query: "slack",
mode: "OR", // 默认: 任何单词匹配
limit: 20
});
// → 返回: nodes-base.slack, nodes-base.slackTrigger
// 步骤 2: 获取详情 (~18 秒后,用户查看结果)
const details = await get_node({
nodeType: "nodes-base.slack",
includeExamples: true // 获取真实模板配置
});
// → 返回: 操作、属性、元数据
典型周期 : 23 秒思考,58 秒修复
// 步骤 1: 验证
const result = await validate_node({
nodeType: "nodes-base.slack",
config: {
resource: "channel",
operation: "create"
},
profile: "runtime"
});
// 步骤 2: 检查错误 (~23 秒思考)
if (!result.valid) {
console.log(result.errors); // "缺少必填字段: name"
}
// 步骤 3: 修复配置 (~58 秒修复)
config.name = "general";
// 步骤 4: 再次验证
await validate_node({...}); // 重复直到干净
最常用的更新工具 : 99.0% 成功率,编辑之间平均 56 秒
// 迭代式工作流构建 (非一次性!)
// 编辑 1
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "添加 webhook 触发器",
operations: [{type: "addNode", node: {...}}]
});
// ~56 秒后...
// 编辑 2
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "将 webhook 连接到处理器",
operations: [{type: "addConnection", source: "...", target: "..."}]
});
// ~56 秒后...
// 编辑 3 (验证)
await n8n_validate_workflow({id: "workflow-id"});
// 准备好了?激活!
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "为生产激活工作流",
operations: [{type: "activateWorkflow"}]
});
查看 SEARCH_GUIDE.md 了解:
查看 VALIDATION_GUIDE.md 了解:
查看 WORKFLOW_GUIDE.md 了解:
// 按关键词搜索 (默认模式)
search_templates({
query: "webhook slack",
limit: 20
});
// 按节点类型搜索
search_templates({
searchMode: "by_nodes",
nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
});
// 按任务类型搜索
search_templates({
searchMode: "by_task",
task: "webhook_processing"
});
// 按元数据搜索 (复杂度, 设置时间)
search_templates({
searchMode: "by_metadata",
complexity: "simple",
maxSetupMinutes: 15
});
get_template({
templateId: 2947,
mode: "structure" // 仅节点+连接
});
get_template({
templateId: 2947,
mode: "full" // 完整的工作流 JSON
});
// 将模板部署到你的 n8n 实例
n8n_deploy_template({
templateId: 2947,
name: "My Weather to Slack", // 自定义名称 (可选)
autoFix: true, // 自动修复常见问题 (默认)
autoUpgradeVersions: true // 升级节点版本 (默认)
});
// 返回: 工作流 ID, 所需凭据, 应用的修复
// 所有工具概览
tools_documentation()
// 特定工具详情
tools_documentation({
topic: "search_nodes",
depth: "full"
})
// 代码节点指南
tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
tools_documentation({topic: "python_code_node_guide", depth: "full"})
// 全面的 AI 工作流指南
ai_agents_guide()
// 返回: 架构、连接、工具、验证、最佳实践
// 快速健康检查
n8n_health_check()
// 详细诊断
n8n_health_check({mode: "diagnostic"})
// → 返回: 状态、环境变量、工具状态、API 连通性
始终可用 (无需 n8n API):
需要 n8n API (N8N_API_URL + N8N_API_KEY):
如果 API 工具不可用,请使用模板和仅验证的工作流。
详情级别 (mode="info", 默认):
minimal (~200 token) - 仅基本元数据standard (~1-2K token) - 基本属性 + 操作 (推荐)full (~3-8K token) - 完整模式 (谨慎使用)操作模式 :
info (默认) - 带有详情级别的节点模式
docs - 可读的 markdown 文档
search_properties - 查找特定属性 (与 propertyQuery 一起使用)
versions - 列出所有版本及其破坏性变更
compare - 比较两个版本
breaking - 仅显示破坏性变更
migrations - 显示可自动迁移的变更
// 标准 (推荐) get_node({nodeType: "nodes-base.httpRequest"})
// 获取文档 get_node({nodeType: "nodes-base.webhook", mode: "docs"})
// 搜索属性 get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
// 检查版本 get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})
模式 :
full (默认) - 包含错误/警告/建议的全面验证minimal - 仅快速检查必填字段配置文件 (用于 mode="full"):
minimal - 非常宽松
runtime - 标准 (默认,推荐)
ai-friendly - 为 AI 工作流平衡
strict - 最彻底 (生产环境)
// 使用 runtime 配置文件的完整验证 validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
// 快速必填字段检查 validate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})
| 工具 | 响应时间 | 负载大小 |
|---|---|---|
| search_nodes | <20ms | 小 |
| get_node (standard) | <10ms | ~1-2KB |
| get_node (full) | <100ms | 3-8KB |
| validate_node (minimal) | <50ms | 小 |
| validate_node (full) | <100ms | 中 |
| validate_workflow | 100-500ms | 中 |
| n8n_create_workflow | 100-500ms | 中 |
| n8n_update_partial_workflow | 50-200ms | 小 |
| n8n_deploy_template | 200-500ms | 中 |
get_node({detail: "standard"})profile: "runtime")branch, case) 以提高清晰度intent 参数includeExamples: true 获取真实配置n8n_deploy_template 快速开始detail: "full" (浪费 token)nodes-base.*)n8n-nodes-base.*)最重要的几点 :
detail: "standard" (默认) - 覆盖 95% 的使用场景nodes-base.* (搜索/验证) 对比 n8n-nodes-base.* (工作流)runtime)branch="true", case=0)activateWorkflow 操作)常见工作流程 :
详情请参阅:
相关技能 :
每周安装
1.3K
仓库
GitHub 星标
3.3K
首次出现
2026年1月20日
安全审计
安装于
opencode1.1K
gemini-cli1.1K
codex1.1K
github-copilot972
cursor860
kimi-cli843
Master guide for using n8n-mcp MCP server tools to build workflows.
n8n-mcp provides tools organized into categories:
| Tool | Use When | Speed |
|---|---|---|
search_nodes | Finding nodes by keyword | <20ms |
get_node | Understanding node operations (detail="standard") | <10ms |
validate_node | Checking configurations (mode="full") | <100ms |
n8n_create_workflow | Creating workflows | 100-500ms |
n8n_update_partial_workflow | Editing workflows (MOST USED!) | 50-200ms |
validate_workflow | Checking complete workflow | 100-500ms |
n8n_deploy_template | Deploy template to n8n instance | 200-500ms |
Workflow :
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [Optional] get_node({nodeType: "nodes-base.name", mode: "docs"})
Example :
// Step 1: Search
search_nodes({query: "slack"})
// Returns: nodes-base.slack
// Step 2: Get details
get_node({nodeType: "nodes-base.slack"})
// Returns: operations, properties, examples (standard detail)
// Step 3: Get readable documentation
get_node({nodeType: "nodes-base.slack", mode: "docs"})
// Returns: markdown documentation
Common pattern : search → get_node (18s average)
Workflow :
1. validate_node({nodeType, config: {}, mode: "minimal"}) - Check required fields
2. validate_node({nodeType, config, profile: "runtime"}) - Full validation
3. [Repeat] Fix errors, validate again
Common pattern : validate → fix → validate (23s thinking, 58s fixing per cycle)
Workflow :
1. n8n_create_workflow({name, nodes, connections})
2. n8n_validate_workflow({id})
3. n8n_update_partial_workflow({id, operations: [...]})
4. n8n_validate_workflow({id}) again
5. n8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]})
Common pattern : iterative updates (56s average between edits)
Two different formats for different tools!
// Use SHORT prefix
"nodes-base.slack"
"nodes-base.httpRequest"
"nodes-base.webhook"
"nodes-langchain.agent"
Tools that use this :
// Use FULL prefix
"n8n-nodes-base.slack"
"n8n-nodes-base.httpRequest"
"n8n-nodes-base.webhook"
"@n8n/n8n-nodes-langchain.agent"
Tools that use this :
// search_nodes returns BOTH formats
{
"nodeType": "nodes-base.slack", // For search/validate tools
"workflowNodeType": "n8n-nodes-base.slack" // For workflow tools
}
Problem : "Node not found" error
// WRONG
get_node({nodeType: "slack"}) // Missing prefix
get_node({nodeType: "n8n-nodes-base.slack"}) // Wrong prefix
// CORRECT
get_node({nodeType: "nodes-base.slack"})
Problem : Huge payload, slower response, token waste
// WRONG - Returns 3-8K tokens, use sparingly
get_node({nodeType: "nodes-base.slack", detail: "full"})
// CORRECT - Returns 1-2K tokens, covers 95% of use cases
get_node({nodeType: "nodes-base.slack"}) // detail="standard" is default
get_node({nodeType: "nodes-base.slack", detail: "standard"})
When to use detail="full" :
Better alternatives :
get_node({detail: "standard"}) - for operations list (default)get_node({mode: "docs"}) - for readable documentationget_node({mode: "search_properties", propertyQuery: "auth"}) - for specific propertyProblem : Too many false positives OR missing real errors
Profiles :
minimal - Only required fields (fast, permissive)
runtime - Values + types (recommended for pre-deployment)
ai-friendly - Reduce false positives (for AI configuration)
strict - Maximum validation (for production)
// WRONG - Uses default profile validate_node({nodeType, config})
// CORRECT - Explicit profile validate_node({nodeType, config, profile: "runtime"})
What happens : ALL nodes sanitized on ANY workflow update
Auto-fixes :
Cannot fix :
Broken connections
Branch count mismatches
Paradoxical corrupt states
// After ANY update, auto-sanitization runs on ALL nodes n8n_update_partial_workflow({id, operations: [...]}) // → Automatically fixes operator structures
Problem : Complex sourceIndex calculations for multi-output nodes
Old way (manual):
// IF node connection
{
type: "addConnection",
source: "IF",
target: "Handler",
sourceIndex: 0 // Which output? Hard to remember!
}
New way (smart parameters):
// IF node - semantic branch names
{
type: "addConnection",
source: "IF",
target: "True Handler",
branch: "true" // Clear and readable!
}
{
type: "addConnection",
source: "IF",
target: "False Handler",
branch: "false"
}
// Switch node - semantic case numbers
{
type: "addConnection",
source: "Switch",
target: "Handler A",
case: 0
}
Problem : Less helpful tool responses
// WRONG - No context for response
n8n_update_partial_workflow({
id: "abc",
operations: [{type: "addNode", node: {...}}]
})
// CORRECT - Better AI responses
n8n_update_partial_workflow({
id: "abc",
intent: "Add error handling for API failures",
operations: [{type: "addNode", node: {...}}]
})
Common workflow : 18s average between steps
// Step 1: Search (fast!)
const results = await search_nodes({
query: "slack",
mode: "OR", // Default: any word matches
limit: 20
});
// → Returns: nodes-base.slack, nodes-base.slackTrigger
// Step 2: Get details (~18s later, user reviewing results)
const details = await get_node({
nodeType: "nodes-base.slack",
includeExamples: true // Get real template configs
});
// → Returns: operations, properties, metadata
Typical cycle : 23s thinking, 58s fixing
// Step 1: Validate
const result = await validate_node({
nodeType: "nodes-base.slack",
config: {
resource: "channel",
operation: "create"
},
profile: "runtime"
});
// Step 2: Check errors (~23s thinking)
if (!result.valid) {
console.log(result.errors); // "Missing required field: name"
}
// Step 3: Fix config (~58s fixing)
config.name = "general";
// Step 4: Validate again
await validate_node({...}); // Repeat until clean
Most used update tool : 99.0% success rate, 56s average between edits
// Iterative workflow building (NOT one-shot!)
// Edit 1
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Add webhook trigger",
operations: [{type: "addNode", node: {...}}]
});
// ~56s later...
// Edit 2
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Connect webhook to processor",
operations: [{type: "addConnection", source: "...", target: "..."}]
});
// ~56s later...
// Edit 3 (validation)
await n8n_validate_workflow({id: "workflow-id"});
// Ready? Activate!
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Activate workflow for production",
operations: [{type: "activateWorkflow"}]
});
See SEARCH_GUIDE.md for:
See VALIDATION_GUIDE.md for:
See WORKFLOW_GUIDE.md for:
// Search by keyword (default mode)
search_templates({
query: "webhook slack",
limit: 20
});
// Search by node types
search_templates({
searchMode: "by_nodes",
nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
});
// Search by task type
search_templates({
searchMode: "by_task",
task: "webhook_processing"
});
// Search by metadata (complexity, setup time)
search_templates({
searchMode: "by_metadata",
complexity: "simple",
maxSetupMinutes: 15
});
get_template({
templateId: 2947,
mode: "structure" // nodes+connections only
});
get_template({
templateId: 2947,
mode: "full" // complete workflow JSON
});
// Deploy template to your n8n instance
n8n_deploy_template({
templateId: 2947,
name: "My Weather to Slack", // Custom name (optional)
autoFix: true, // Auto-fix common issues (default)
autoUpgradeVersions: true // Upgrade node versions (default)
});
// Returns: workflow ID, required credentials, fixes applied
// Overview of all tools
tools_documentation()
// Specific tool details
tools_documentation({
topic: "search_nodes",
depth: "full"
})
// Code node guides
tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
tools_documentation({topic: "python_code_node_guide", depth: "full"})
// Comprehensive AI workflow guide
ai_agents_guide()
// Returns: Architecture, connections, tools, validation, best practices
// Quick health check
n8n_health_check()
// Detailed diagnostics
n8n_health_check({mode: "diagnostic"})
// → Returns: status, env vars, tool status, API connectivity
Always Available (no n8n API needed):
Requires n8n API (N8N_API_URL + N8N_API_KEY):
If API tools unavailable, use templates and validation-only workflows.
Detail Levels (mode="info", default):
minimal (~200 tokens) - Basic metadata onlystandard (~1-2K tokens) - Essential properties + operations (RECOMMENDED)full (~3-8K tokens) - Complete schema (use sparingly)Operation Modes :
info (default) - Node schema with detail level
docs - Readable markdown documentation
search_properties - Find specific properties (use with propertyQuery)
versions - List all versions with breaking changes
compare - Compare two versions
breaking - Show only breaking changes
migrations - Show auto-migratable changes
// Standard (recommended) get_node({nodeType: "nodes-base.httpRequest"})
// Get documentation get_node({nodeType: "nodes-base.webhook", mode: "docs"})
// Search for properties get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
Modes :
full (default) - Comprehensive validation with errors/warnings/suggestionsminimal - Quick required fields check onlyProfiles (for mode="full"):
minimal - Very lenient
runtime - Standard (default, recommended)
ai-friendly - Balanced for AI workflows
strict - Most thorough (production)
// Full validation with runtime profile validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
// Quick required fields check validate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})
| Tool | Response Time | Payload Size |
|---|---|---|
| search_nodes | <20ms | Small |
| get_node (standard) | <10ms | ~1-2KB |
| get_node (full) | <100ms | 3-8KB |
| validate_node (minimal) | <50ms | Small |
| validate_node (full) | <100ms | Medium |
| validate_workflow | 100-500ms | Medium |
| n8n_create_workflow | 100-500ms | Medium |
| n8n_update_partial_workflow | 50-200ms | Small |
| n8n_deploy_template | 200-500ms | Medium |
get_node({detail: "standard"}) for most use casesprofile: "runtime")branch, case) for clarityintent parameter in workflow updatesincludeExamples: true for real configsn8n_deploy_template for quick startsdetail: "full" unless necessary (wastes tokens)nodes-base.*)n8n-nodes-base.*) with search/validate toolsMost Important :
detail: "standard" (default) - covers 95% of use casesnodes-base.* (search/validate) vs n8n-nodes-base.* (workflows)runtime recommended)branch="true", case=0)activateWorkflow operation)Common Workflow :
For details, see:
Related Skills :
Weekly Installs
1.3K
Repository
GitHub Stars
3.3K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
opencode1.1K
gemini-cli1.1K
codex1.1K
github-copilot972
cursor860
kimi-cli843
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
AI智能体长期记忆系统 - 精英级架构,融合6种方法,永不丢失上下文
1,200 周安装
AI新闻播客制作技能:实时新闻转对话式播客脚本与音频生成
1,200 周安装
Word文档处理器:DOCX创建、编辑、分析与修订痕迹处理全指南 | 自动化办公解决方案
1,200 周安装
React Router 框架模式指南:全栈开发、文件路由、数据加载与渲染策略
1,200 周安装
Nano Banana AI 图像生成工具:使用 Gemini 3 Pro 生成与编辑高分辨率图像
1,200 周安装
SVG Logo Designer - AI 驱动的专业矢量标识设计工具,生成可缩放品牌标识
1,200 周安装
// Check versions get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})