npx skills add ...
npx skills add n8n-io/skills --skill n8n-extending-mcp-official
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.
npx skills add n8n-io/skills --skill n8n-extending-mcp-official
Any n8n workflow with MCP access enabled becomes a tool the coding agent can call by name. Two common cases:
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.
Case 1 (wrap n8n capability):
create_folder, update_folder, move_workflows_to_folder), on a registered instance; delete still needs the REST API.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.POST /credentials), no MCP tool yet.Case 2 (general agent tool):
Don't reach for this for:
n8n-credentials-and-security-official.search_workflows({ tags: ['tool'] }) and a capability keyword search. If something matches, use it instead of duplicating.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 +
n8nApicredential. Self-hosted instances expose this at<instance-url>/api/v1/.
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), so a one-time wrap fills the gap.
Version, configured integrations, environment info. Useful for the SessionStart drift check or adapting workflows to instance capabilities.
The MCP doesn't register each tool-flagged workflow as a separately-named MCP tool. Discovery and invocation are two steps:
search_workflows({ query: '<keyword>' }). Workflows with MCP access on return availableInMCP: true. Filter for that.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-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 |