跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 n8n-extending-mcp-official

N8n Extending Mcp Official

想要曝光 n8n 工作流程时使用作为编码代理可以调用的工具. 两起 (1)包装n8n API能力 MCP不本地曝光:文件夹删除,项目创建/重命名,标签重命名/删除,实例元数据,证书创建. (2)将通用工作流程曝光为代理工具:一种调用第三方API,运行业务逻辑的工作流程,或执行任何要代理引用的任务. 触发"曝光为MCP工具","为我的经纪人建造一个工具","我需要知道X",其中X不是MCP工具"删除文件夹","重命名标记",或任何能力漏洞.

2294 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

想要曝光 n8n 工作流程时使用作为编码代理可以调用的工具. 两起 (1)包装n8n API能力 MCP不本地曝光:文件夹删除,项目创建/重命名,标签重命名/删除,实例元数据,证书创建. (2)将通用工作流程曝光为代理工具:一种调用第三方API,运行业务逻辑的工作流程,或执行任何要代理引用的任务. 触发"曝光为MCP工具","为我的经纪人建造一个工具","我需要知道X",其中X不是MCP工具"删除文件夹","重命名标记",或任何能力漏洞.

何时用

您想要将 n8n 工作流程曝光为编码代理可以调用的工具。 两起 (1)包装n8n API能力 MCP不本地曝光:文件夹删除,项目创建/重命名,标签重命名/删除,实例元数据,证书创建. (2) 介绍一项普通用途工作f

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:n8n Extending MCP、When to reach for this、Non-negotiables、Protocol、The pattern, end to end、Common case-1 wrappers (missing MCP capabilities)。 其中含规范建议的小节:分步指令。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Use when you want to expose an n8n workflow as a tool the coding agent can call. Two cases. (1) Wrap n8n API capabilities the MCP doesn''t natively expose: folder deletion, project create/rename, tag rename/delete, instance metadata, credential creation. (2) Expose a general-purpose workflow as an agent tool: a workflow that calls a third-party API, runs business logic, or does any task you want the agent to invoke. Triggers on "expose as MCP tool", "build a tool for my agent", "I need to know X" where X isn''t an MCP tool, "delete folder", "rename tag", or any capability gap.

n8n Extending MCPWhen to reach for thisNon-negotiablesProtocolThe pattern, end to endCommon case-1 wrappers (missing MCP capabilities)1. Folder delete and project management2. Instance metadataHow the agent invokes a tool workflowAnti-patterns

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
n8n-extending-mcp-official
description
Use when you want to expose an n8n workflow as a tool the coding agent can call. Two cases. (1) Wrap n8n API capabilities the MCP doesn''t natively expose: folder deletion, project create/rename, tag rename/delete, instance metadata, credential creation. (2) Expose a general-purpose workflow as an agent tool: a workflow that calls a third-party API, runs business logic, or does any task you want the agent to invoke. Triggers on "expose as MCP tool", "build a tool for my agent", "I need to know X" where X isn''t an MCP tool, "delete folder", "rename tag", or any capability gap.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「n8n-extending-mcp-official」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-fe5632464bd612f9-N8n-%E6%89%A9%E5%B1%95-Mcp-%E5%AE%98%E6%96%B9.html
请存为 .cursor/skills/n8n-extending-mcp-official/SKILL.md 或 .claude/skills/n8n-extending-mcp-official/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/n8n-io/skills' --list

npx skills add 'https://github.com/n8n-io/skills' --skill 'n8n-extending-mcp-official'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: n8n-extending-mcp-official description: 'Use when you want to expose an n8n workflow as a tool the coding agent can call. Two cases. (1) Wrap n8n API capabilities the MCP doesn''t natively expose: folder deletion, project create/rename, tag rename/delete, instance metadata, credential creation. (2) Expose a general-purpose workflow as an agent tool: a workflow that calls a third-party API, runs business logic, or does any task you want the agent to invoke. Triggers on "expose as MCP tool", "build a tool for my agent", "I need to know X" where X isn''t an MCP tool, "delete folder", "rename tag", or any capability gap.' --- # n8n Extending MCP Any n8n workflow with MCP access enabled becomes a tool the coding agent can call by name. Two common cases: 1. **Wrap n8n capabilities the MCP doesn't expose.** The MCP covers workflow CRUD, validation, execution, data tables, credential listing, execution search, folder create/rename/move and folder/project listing, tag listing and attach/detach. Still missing: folder deletion, project create/rename, tag rename/delete, instance metadata, credential creation. Build a workflow that hits the n8n API and exposes the result as an agent tool. 2. **Expose a general-purpose workflow as a tool.** A workflow that has nothing to do with n8n itself (calls a third-party API, runs internal business logic, looks something up in a private system) can be MCP-callable. Lets the agent invoke real operations during a coding session. The MCP calls your workflow as if it were a native tool: input from the `Execute Workflow Trigger`, output from the workflow's last node. ## When to reach for this Case 1 (wrap n8n capability): - Folder delete, and project create/rename: no MCP tool. Folder create/rename/move and moving workflows between folders now have MCP tools (`create_folder`, `update_folder`, `move_workflows_to_folder`), on a registered instance; delete still needs the REST API. - Tag rename/delete: the MCP lists tags (`list_workflow_tags`) and attaches/detaches them (`update_workflow` `addTags`/`removeTags`, auto-creating unknown names), but can't rename or delete tag entities. REST API exists for those. - Instance metadata (limits, plan info, configured integrations): no MCP tool. - Credential creation: REST API exists (`POST /credentials`), no MCP tool yet. - Any n8n API operation the MCP doesn't natively expose. Case 2 (general agent tool): - A recurring agent task you'd rather codify than re-explain (lookup, format, send). - An action against a system the agent doesn't have direct access to (private API, internal service, third-party integration). - Anything you want a future session to invoke without re-deriving the implementation. Don't reach for this for: - One-off questions, ask the user directly. - Things the MCP already exposes natively. ## Non-negotiables 1. **Ask the user before building.** This creates a workflow on their instance, with credentials. They need to OK it explicitly. 2. **Credentials via credential, never text field.** Same rule as everywhere else in n8n. See `n8n-credentials-and-security-official`. ## Protocol - **Search for existing wrappers first.** `search_workflows({ tags: ['tool'] })` and a capability keyword search. If something matches, use it instead of duplicating. - **For case 1, build as a stateless, queryable utility.** Takes input, calls n8n's API, returns the result. No side effects. Case 2 may legitimately have side effects (sending, writing); name them in the tool description. - **Offer to edit the agent's context file yourself** (CLAUDE.md, AGENTS.md, GEMINI.md, whatever the user's agent reads on session start) to add an entry for the new tool. You have Edit/Write tools, so there's no reason to make the user paste a snippet manually. Ask first since it's their config file, then edit it directly when they say yes. ## The pattern, end to end ``` 1. User asks for a capability (missing MCP feature, or a workflow they want the agent to be able to invoke). 2. You: "I can build a workflow that exposes this as a tool the MCP can call. Want me to create it?" 3. User: yes. 4. You build the workflow: - Trigger: Execute Workflow Trigger with declared inputs. - Body: whatever logic the tool needs (HTTP Request to n8n's API, a third-party call, internal computation). - Output: structured response. 5. Validate, test, publish. 6. Ask the user if you can add an entry for this tool to their agent context file (CLAUDE.md / AGENTS.md / etc.) so future sessions know to search for it by name. Edit the file directly when they say yes. 7. The workflow is immediately callable: agent-created workflows have `availableInMCP: true` set by default. ``` ## Common case-1 wrappers (missing MCP capabilities) Most common patterns, by usefulness. Case 2 (general agent tools) is whatever your project needs, no canonical examples. > **n8n REST API reference:** https://docs.n8n.io/api/api-reference/. Start here for any case-1 wrap. Find the endpoint, then wrap it with an HTTP Request node + `n8nApi` credential. Self-hosted instances expose this at `/api/v1/`. ### 1. Folder delete and project management The MCP now creates, renames, and moves folders natively (`create_folder`, `update_folder`, `move_workflows_to_folder`), so those no longer need wrapping. Still missing: **deleting** a folder, and creating/renaming **projects**. n8n's REST API covers both ([Folders endpoint](https://docs.n8n.io/api/api-reference/#tag/folders)), so a one-time wrap fills the gap. ``` Tool: delete folder Input: { projectId: string, folderId: string } Output: { success: boolean } ``` ### 2. Instance metadata Version, configured integrations, environment info. Useful for the SessionStart drift check or adapting workflows to instance capabilities. ``` Tool: get instance info Input: {} Output: { version, edition, integrations: [...], limits: {...} } ``` ## How the agent invokes a tool workflow The MCP **doesn't register each tool-flagged workflow as a separately-named MCP tool.** Discovery and invocation are two steps: 1. **Discover** via `search_workflows({ query: '' })`. Workflows with MCP access on return `availableInMCP: true`. Filter for that. 2. **Invoke** via `execute_workflow({ workflowId, inputs })`. Read the input schema first with `get_workflow_details`. The `Execute Workflow Trigger` defines typed fields. Output is whatever the workflow's last node returns. **MCP access defaults:** Agent-created workflows default to `availableInMCP: true`. UI-created workflows may default off, in which case the user has to toggle MCP access on in the workflow's settings before it appears in search results. Either way, the user can flip it off later to restrict access. **This is why the agent-context-file snippet (CLAUDE.md / AGENTS.md / etc.) matters.** Future sessions don't auto-enumerate tool workflows. The snippet tells them the tool exists by name, so they search for it instead of re-deriving the implementation. ## Anti-patterns | Anti-pattern | What goes wrong | Fix | |---|---|---| | Building an MCP-extension workflow without asking the user | Surprise creation of workflows on their instance with credentials | Always ask permission first | | Not documenting the new tool in the agent's context file | Future sessions don't auto-enumerate tool workflows. Without a hint they'll re-derive the implementation. | Ask the user, then edit CLAUDE.md / AGENTS.md / whichever file their agent reads, directly. Don't make them paste a snippet. | | Hardcoding the n8n API token in the HTTP Request node | Token leak when the workflow is exported or copied | Use a credential of type `n8nApi` or appropriate header auth | | Side-effecting tool with no mention of side effects in its name/description | Agent invokes thinking it's a read, ends up sending real messages or writing real data | Name and describe the side effect explicitly (e.g., `Tool: send Slack message`). Read-only is the safer default for case-1 wrappers. | | Wrapper that does bulk or destructive ops (archive, delete) with no dry-run | One bug touches many workflows | Strong explicit opt-in per call, plus a dry-run mode that lists targets without acting | | Wrapper returns credential *values* | Token leak via tool output | Return IDs, names, types only. Never the secret. | | Skipping the validate + verify + test cycle on the wrapper | The "tool" itself is broken, manifests as confusing tool-not-found or empty-response errors | Same lifecycle as any workflow: see `n8n-workflow-lifecycle-official` |

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…