К основному содержанию
скилл CX Codex

n8n-extending-mcp-official — скилл для Claude Code: обёртки n8n

Скилл показывает, как завернуть workflow n8n в инструмент, который агент вызывает по имени, если MCP не умеет нужную операцию.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add n8n-io/skills --skill n8n-extending-mcp-official -a claude-code
Открыть на GitHub

Что делает n8n-extending-mcp-official

Скилл закрывает два случая. Первый: в n8n MCP нет операции, которая вам нужна — удаление папки, создание или переименование проекта, переименование и удаление тегов, метаданные инстанса, создание credential. Второй: у вас есть свой workflow, который дергает сторонний API или считает бизнес-логику, и вы хотите, чтобы агент вызывал его прямо в сессии.

Устроено так: любой workflow с включённым доступом к MCP становится инструментом. Вход берётся из Execute Workflow Trigger, выход — из последнего узла. Агент не видит его как отдельный MCP-инструмент: сначала находит через search_workflows по флагу availableInMCP: true, потом запускает через execute_workflow, а схему входа читает из get_workflow_details. Для обёрток над API n8n скилл советует делать workflow без побочных эффектов: принял вход, сходил в API, вернул результат.

Перед сборкой нужно явное согласие пользователя, потому что на его инстансе появится новый workflow с credentials. Секреты скилл требует передавать через credential, а не текстовым полем. Ещё он предлагает сам дописать запись о новом инструменте в контекстный файл агента — CLAUDE.md, AGENTS.md, GEMINI.md — чтобы следующая сессия знала, что искать. Файл чужой, поэтому спрашивать разрешение нужно до правки.

Какие задачи решает

  • завернуть удаление папки в n8n, которого нет в MCP
  • создать или переименовать проект через REST API n8n
  • переименовать и удалить тег workflow
  • отдать агенту свой workflow со сторонним API как инструмент
  • дописать новый инструмент в CLAUDE.md или AGENTS.md

Примеры запросов агенту

  • Мне нужно удалять папки в n8n, а MCP этого не умеет — собери workflow-обёртку над REST API
  • Хочу, чтобы агент вызывал мой workflow с внутренней бизнес-логикой как инструмент
  • Добавь запись о новом инструменте в AGENTS.md, чтобы следующая сессия его нашла

Как установить n8n-extending-mcp-official

1Через Skills CLI (Vercel)

npx skills add n8n-io/skills --skill n8n-extending-mcp-official -a claude-code

2Вручную: положить файлы

~/.claude/skills/n8n-extending-mcp-official/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/n8n-extending-mcp-official/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о n8n-extending-mcp-official

Как установить n8n-extending-mcp-official в Claude?

Выполните npx skills add n8n-io/skills --skill n8n-extending-mcp-official -a claude-code. Скилл встанет в ~/.claude/skills/n8n-extending-mcp-official/SKILL.md.

Что делает n8n-extending-mcp-official?

Описывает, как превратить workflow n8n в инструмент, который вызывает кодинг-агент. Годится и для операций n8n API, которых нет в MCP, и для ваших собственных workflow.

Нужен ли доступ к API n8n?

Для обёрток над операциями n8n — да, скилл строит их на HTTP Request к REST API с credential n8nApi. У self-hosted инстанса API живёт по адресу <instance-url>/api/v1/.

Исходный текст

SKILL.md · Apache-2.0
---
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.'
---

<!-- TEMPORARY: update whenever n8n mcp capacities are added. a lot of listed functionalities missing are coming soon -->
# 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 `<instance-url>/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: '<keyword>' })`. 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` |

© n8n-io · Apache-2.0 · n8n-io/skills

Похожие скиллы

Все скиллы по теме «Автоматизация и no-code: n8n, Zapier, Make» →
n8n-workflow claude-office-skills Скилл помогает агенту собирать цепочки обработки документов в n8n: от триггера до отправки результата. Пригодится, когда нужно связать PDF, OCR, почту и Slack без ручной работы. CX Codex +1 4 800установок n8n-workflow-patterns czlonkowski Даёт шесть архитектурных паттернов для n8n-воркфлоу: webhook, API, база данных, AI-агент, расписание, пакетная обработка. Подсказывает, какой паттерн выбрать и какие ноды нужны. CX Codex +1 11 700установок n8n-code-javascript czlonkowski Помогает писать и отлаживать JavaScript в нодах Code для n8n, выбирать правильный режим выполнения и заменять цепочки промежуточных узлов. CX Codex +1 7 200установок workflow-automation davila7 Скилл для проектирования воркфлоу с durable execution: шаги переживают сбой сети и продолжают с места остановки. Пригодится, когда платёжный или фоновый процесс нельзя терять. 1 661установок airtable-automation claude-office-skills Помогает агенту проектировать базы Airtable, настраивать представления, формулы и сценарии автоматизации. Пригодится для задач, проектов и связок с n8n. CX Codex +1 6 200установок loopy Forward-Future Находит повторяющиеся задачи в репозитории или истории тредов, превращает их в замкнутые циклы агента и проверяет надёжность проверок перед запуском. CX Codex +1 3 100установок

Из того же набора14

using-n8n-skills-official Всегда включённый протокол плагина n8n-skills: направляет агента к нужному скиллу и перечисляет правила работы с воркфлоу n8n. CX Codex +1 2 000установок n8n-code-nodes-official Скилл помогает ИИ-агенту выбирать правильный способ обработки данных в n8n и не писать лишний код в узлах Code, когда подходят выражения или Edit Fields. CX Codex +1 2 000установок n8n-credentials-and-security-official Скилл следит, чтобы ключи и токены в воркфлоу n8n шли через систему учётных данных, а не лежали текстом в нодах. CX Codex +1 2 000установок n8n-error-handling-official Скилл для Claude, который заставляет агента настраивать обработку ошибок в n8n: коды ответов по причине, ветки ошибок и аварийные workflow. CX Codex +1 2 000установок n8n-loops-official Скилл объясняет агенту три модели циклов в n8n: стандартную построчную обработку массивов, переключатель executeOnce и узел Loop Over Items. Помогает избежать лишних дублей и вызовов API. CX Codex +1 1 900установок n8n-binary-and-data-official Скилл объясняет, как в n8n устроена работа с файлами, картинками и вложениями и почему бинарные данные не проходят через инструменты агента. CX Codex +1 1 900установок n8n-subworkflows-official Скилл учит агента выносить повторяющуюся логику n8n в сабворкфлоу с типизированными входами и чистыми контрактами вместо копипасты по воркфлоу. CX Codex +1 1 900установок n8n-expressions-official Скилл задаёт правила для написания выражений n8n в синтаксисе {{...}}. Он заменяет вызовы $json на прямые имена нод и убирает промежуточные узлы Set. CX Codex +1 1 900установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой