
n8n-multi-instance
Use when an n8n-mcp account targets more than one n8n instance — i.e. the n8ninstances tool is available, the user mentions multiple n8n instances or environments (prod vs staging, several teams or clients), several agents or chats work on one account in parallel, a workflow / datatable / credential / execution call returns an unexpected NOTFOUND or reads data you don't recognize, or a call is refused with INSTANCEAMBIGUOUS or INSTANCENOTFOUND. Covers naming the target instance on each call with the instance argument, setting the default with switch, verifying the target before high-stakes work — credential writes above all — and recovering from misroutes and fail-closes. Always consult this skill before operating on a specific instance, before any credential create/update/delete on a multi-instance account, or when a call hits the wrong/empty data or an instance error.
- Installs
- 1.9K
- Last 24h
- +17
- Trending rank
- #6505
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/czlonkowski/n8n-skills --skill n8n-multi-instance- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads n8n-multi-instance automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Working with multiple n8n instances over MCP
When the n8n_instances tool is available, the user has multi-instance mode on: one MCP
connection can reach several n8n instances (e.g. prod, staging, or one per client/team).
There are two ways to say which instance a call should hit:
- Name it on the call — every n8n tool (
n8n_get_workflow,n8n_list_workflows,n8n_update_partial_workflow,n8n_manage_datatable,n8n_manage_credentials,n8n_executions,n8n_test_workflow,n8n_health_check, …) takes an optionalinstance: "<name>". It routes that one call and changes nothing else. Prefer this. - Set the default with
switch—n8n_instances({mode:"switch", name})sets the instance used by calls that don't name one.
The default is shared more widely than it looks. On claude.ai (and other hosted connectors) one
connection serves every chat and agent using it, so a switch in one chat moves all the
others too — and their next unnamed call silently lands on your instance. A wrong target is
usually silent: a read returns the wrong data and a write lands in the wrong place. So name the
instance.
If the n8n_instances tool is not present, the account is single-instance: ignore this skill
and use the n8n tools directly.
Availability. The
instanceargument needs hosted n8n-mcp backend 0.1.120+ / n8n-mcp 2.94.0+. It is there when the n8n tools' input schemas list aninstanceproperty (and then8n_instanceslist output carries ahintabout it). If it isn't listed, the server predates it: fall back toswitch, in its own turn, as described under Switching.
Golden rules
- Discover first. Call
n8n_instances({mode:"list"})so you know the exact instance names and which one iscurrent. Never guess a name. - Name the instance on every call when it matters — whenever you work on more than one
instance, on any instance other than
current, or alongside other agents/chats on the same account:n8n_list_workflows({instance:"prod"}). Names are case-insensitive. Pass the name the same way on every call of the task; there is nothing to "set up" first. - An
instanceyou name is never silently replaced. An unknown name fails withINSTANCE_NOT_FOUNDand lists theavailablenames — pick one from that list and retry. It never falls back to another instance. - Use
switchonly to change the default, and only when you're the sole user of the connection. Switch in its own turn — never in the same parallel batch as a call that depends on it (batch order isn't guaranteed). - Credential writes: name the instance.
n8n_manage_credentials({action:"create", …, instance:"prod"}). A named write is explicit, so it is neverINSTANCE_AMBIGUOUS. Check the name againstlistfirst — naming the wrong instance writes the secret there. - An unexpected
NOT_FOUNDis almost always a wrong-instance misroute, not a deletion. Don't recreate the object. Retry withinstanceset to where it lives (see Recovery).
Core workflow
1. n8n_instances({mode:"list"}) # names, current, default
2. n8n_list_workflows({instance:"client-a"}) # read on client-a
3. n8n_get_workflow({id:"…", instance:"client-b"}) # read on client-b — no switch needed
4. n8n_update_partial_workflow({id:"…", operations:[…], instance:"client-b"})
5. Credential write:
n8n_manage_credentials({action:"create", name:"…", type:"…", data:{…}, instance:"client-a"})
Every call names its target, so it doesn't matter what any other chat switched to in between, and calls can safely run in the same parallel batch even when they target different instances.
The instance argument
- Value: an instance name from
n8n_instanceslist(available[].name), matched case-insensitively. Not the id, not the URL — the same URL can be registered under several names. - Scope: routes only the call that carries it. It does not change
currentor the default for anyone. - Omitted (or empty): the call uses the default — the last
switchon this connection, or the account default. - Fails closed with
INSTANCE_NOT_FOUND(the call never reaches n8n, no quota charged) when:- the name matches no instance — the error lists
available; - the value isn't a string;
- multi-instance mode is off and the name isn't the one instance the connection reaches.
- the name matches no instance — the error lists
{
"error": "INSTANCE_NOT_FOUND",
"message": "No n8n instance named \"clinet-a\". Pass one of the available names as `instance`, …",
"available": ["client-a", "client-b"]
}
n8n_instances itself doesn't take instance — it has its own name argument for switch.
The n8n_instances tool
Two modes (mode is required and enum-validated):
{mode:"list"}→{ current, default, available, hint }, no side effects.currentanddefaultare each one instance{ id, name, url, isDefault }(ornull).availableis every instance, each with an extraisCurrentboolean. Match byname; never hard-codeid.
{mode:"switch", name:"<name>"}→{ previous, current }, and sets the default for calls that don't name an instance.nameis case-insensitive.
Error envelope (from the n8n_instances tool)
Every error returns { error: "<CODE>", message, … }. The ones you'll actually hit:
| Code | When | What to do |
|---|---|---|
UNKNOWN_INSTANCE | switch name matches no instance | Pick a name from the available list in the error payload and retry. |
NAME_REQUIRED | switch with no name | Re-call with a name (the error lists the valid ones in available). |
MULTI_INSTANCE_DISABLED | multi-instance mode is off | There's nothing to switch; use the n8n tools directly. The user can enable it at the n8n-mcp dashboard. |
NO_SESSION | the request has neither an MCP session id nor a credential id | A selection has nowhere to land. Reconnect / initialize a session, then switch — or just name the instance on each call. |
UNKNOWN_MODE | mode wasn't list/switch | Use list or switch. |
INVALID_CONTEXT | server-side metadata missing | A server bug, not your input — report it. |
Instance names can never be
default,current,list, orswitch(reserved), so you'll never see an instance literally named after a mode or field.
INSTANCE_AMBIGUOUS (from the credential-write path, not the tool)
Returned when you call n8n_manage_credentials (or an n8n_manage_agents write) without
instance, and the default this call inherited is ambiguous: this session never switched on its own
but picked up a switch made elsewhere, pointing at a non-default instance. Rather than risk
writing a secret to the wrong instance, the server blocks the write (it never reaches n8n, no
quota is charged) and returns:
{
"error": "INSTANCE_AMBIGUOUS",
"message": "… the session issuing this request never switched there itself … Re-run n8n_instances({mode:\"switch\", name:\"…\"}) on this session to confirm the target …",
"lastSelected": { "id": "…", "name": "…" },
"default": { "id": "…", "name": "…" }
}
Fix: decide which instance you actually want (lastSelected is the inherited switch, default
is the account default) and retry the write with instance:"<that name>". (On a server without
the instance argument, run n8n_instances({mode:"switch", name:"…"}) on this session, then retry.)
How targeting behaves (mental model)
- A named call goes to the named instance, full stop. It's stateless: it neither reads nor changes the default.
- An unnamed call goes to the default: the last
switchon this connection, else the account default. - Who shares the default depends on the client. A hosted connector (claude.ai, and anything that spreads one chat over many MCP sessions) keeps one default per connection, shared by every chat and agent on it. A direct client with a stable MCP session (Claude Code, Cursor) keeps a default per terminal, but can fall back to the connection's last switch after a reconnect. Either way, other work can move your default — that is why rule 2 says to name the instance.
- A
switchpersists across reconnects, idle and backend deploys (~24h, the MCP session lifetime). - Reads and non-credential writes without
instanceroute to the default silently — a misroute produces wrong data or aNOT_FOUND, not an error. - If the default instance is deleted (the user removes it mid-session), unnamed calls silently
fall back to the account default — no error. Named calls to a deleted instance fail with
INSTANCE_NOT_FOUND.
Switching (only when you need to change the default)
Use switch when the user asks to change "the" instance, or on an older server without the
instance argument.
1. n8n_instances({mode:"switch", name:"prod"}) # its own turn
→ returns { previous, current }; confirm current.name == "prod"
2. (then, in a later turn) the unnamed calls
3. Before a credential write: n8n_instances({mode:"list"}) → re-confirm current, then write
Never batch the switch with the work that depends on it, and remember it moves every chat sharing the connection.
Recovery playbook
| Symptom | What it usually means | Do this |
|---|---|---|
INSTANCE_NOT_FOUND | The instance name is wrong (typo, guess, or the instance was removed) | Pick a name from the error's available list and retry. Never drop instance to "make it work" — that silently runs it on the default. |
INSTANCE_AMBIGUOUS on a credential create/update/delete | An unnamed secret write on a session that never chose a target | Retry the write with instance:"<target>" (the error names lastSelected and default — pick the one you want). Never retry blindly. |
NOT_FOUND for a workflow/datatable/credential you know exists | You're pointed at the wrong instance — not that it was deleted | Retry with instance set to where it lives (check names with list). Do not recreate the object. |
| A read returns empty or unfamiliar data | An unnamed call went to a default someone else moved, or fell back after your instance was deleted | Re-run the read with instance:"<name>" before drawing conclusions. |
UNKNOWN_INSTANCE on switch | The name is wrong | Read the available names in the error and switch to one of those. |
n8n_health_check reports an instanceName you didn't expect | Your unnamed calls are going somewhere else | Name the instance on your calls (or switch if you own the connection). n8n_health_check({instance:"…"}) confirms a name resolves. |
To confirm where unnamed calls go, read current from n8n_instances({mode:"list"}) (primary).
n8n_health_check also returns the resolved instance under details.instanceName, but it can be
absent on some paths (legacy/chat), so treat it as a secondary confirmation.
Credential operations (highest stakes)
Credentials hold live secrets, and a misrouted credential write puts a secret on the wrong instance. So:
- Name the instance on every credential create/update/delete:
n8n_manage_credentials({action:"create", …, instance:"client-a"}). Take the name fromlist— a named write to the wrong instance still writes there. - Without
instance, the write goes to the default, which other chats may have moved. The server only catches the ambiguous case (INSTANCE_AMBIGUOUS); an unnamed write after someone else's explicit switch goes through to their instance. - Credential reads (
action:"list"/"get"/"getSchema") don't write a secret, but a read off the wrong instance returns the wrong schema or list — name the instance there too. - For the
n8n_manage_credentialstool itself (CRUD shapes,getSchemadiscovery, never inlining secrets into text fields), seen8n-mcp-tools-expert.
Common multi-instance task: copy something between instances
To recreate a credential or workflow from instance A on instance B:
1. read the source on A: n8n_get_workflow({id:"…", instance:"A"})
(credentials: n8n_manage_credentials({action:"get", id:"…", instance:"A"}))
2. create it on B: n8n_create_workflow({…, instance:"B"})
(credentials: n8n_manage_credentials({action:"create", …, instance:"B"}))
3. verify on B: n8n_get_workflow({id:"<new id>", instance:"B"})
No switching, so nothing can move the target between the read and the write. n8n doesn't return credential secret values, so for a credential the user supplies them again for the create on B.
Quick reference
- See instances:
n8n_instances({mode:"list"})→{ current, default, available, hint } - Target one call: add
instance:"<name>"to any n8n tool call — preferred - Change the default for unnamed calls:
n8n_instances({mode:"switch", name:"<name>"}), its own turn; shared by every chat on a hosted connection INSTANCE_NOT_FOUND→ use a name from the error'savailablelistINSTANCE_AMBIGUOUS(unnamed credential write) → retry withinstance:"<target>"- Unexpected
NOT_FOUND→ retry with the rightinstance; do not recreate - No
instanceproperty in the tool schemas → older server:switchin its own turn, verifycurrentbefore credential writes
Integration with other skills
- n8n-mcp-tools-expert — owns
n8n_manage_credentials(CRUD +getSchema) and the rule that secrets go through the credential system, never text fields. This skill adds the "which instance?" layer on top. - using-n8n-mcp-skills — the router; consult it for which skill owns a given build step.
FAQ
What does the n8n-multi-instance skill do?
Use when an n8n-mcp account targets more than one n8n instance — i.e. the n8ninstances tool is available, the user mentions multiple n8n instances or environments (prod vs staging, several teams or clients), several agents or chats work on one account in parallel, a workflow / datatable / credential / execution call returns an unexpected NOTFOUND or reads data you don't recognize, or a call is refused with INSTANCEAMBIGUOUS or INSTANCENOTFOUND. Covers naming the target instance on each call with the instance argument, setting the default with switch, verifying the target before high-stakes work — credential writes above all — and recovering from misroutes and fail-closes. Always consult this skill before operating on a specific instance, before any credential create/update/delete on a multi-instance account, or when a call hits the wrong/empty data or an instance error.
How do I install n8n-multi-instance?
Run npx skills add https://github.com/czlonkowski/n8n-skills --skill n8n-multi-instance in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/n8n-multi-instance/ (personal) or .claude/skills/n8n-multi-instance/ (project).
Which AI agents can use n8n-multi-instance?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is n8n-multi-instance safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains n8n-multi-instance?
It is published by czlonkowski in czlonkowski/n8n-skills. It has 1,867 recorded installs.
More from czlonkowski/n8n-skills
n8n-workflow-patterns
czlonkowski/n8n-skills
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled tasks. Always consult this skill when the user asks to create, build, or design an n8n workflow, automate a process, or connect services — even if they don't explicitly mention 'patterns'. Covers webhook, API, database, AI, batch processing, and scheduled automation architectures. Also use when optimizing a slow workflow or speeding up large-item-count processing (node count, batchSize, all-items vs per-item).
n8n-mcp-tools-expert
czlonkowski/n8n-skills
Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, organizing workflows into folders, managing credentials, auditing instance security, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns. IMPORTANT — Always consult this skill before calling any n8n-mcp tool — it prevents common mistakes like wrong nodeType formats, incorrect parameter structures, and inefficient tool usage. If the user mentions n8n, workflows, nodes, or automation and you have n8n MCP tools available, use this skill first.
n8n-node-configuration
czlonkowski/n8n-skills
Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between getnode detail levels, or learning common configuration patterns by node type — including the native nodes that replace Code (Summarize, Aggregate, Split Out, Merge, Compare Datasets, Remove Duplicates, Sort, Limit, Date & Time, HTTP Request pagination, Crypto). Always use this skill when setting up node parameters — it explains which fields are required for each operation, how displayOptions control field visibility, and when to use patchNodeField for surgical edits vs full node updates.
n8n-code-javascript
czlonkowski/n8n-skills
Write, review, or debug JavaScript in an n8n Code node. Use when a Code node is already in the workflow (editing it, fixing an error, choosing its mode, making it faster), or when a new one is justified: no native node fits (check the job-to-node table in using-n8n-mcp-skills first) and the job is on the closed list — loops or recursion no node expresses, state across runs, parsing no node handles, an allowlisted library, heavy all-items work, or one short node replacing 4+ glue nodes. Covers $input/$json/$node in code, this.helpers, Luxon, SplitInBatches loops, cross-iteration data, pairedItem, per-item performance, and the "Why Code:" note. Filtering, totals, dedupe, sorting, joins, file formats and API paging have native nodes (Filter, Summarize, Remove Duplicates, Sort, Merge, Extract From File, HTTP Request): see n8n-node-configuration. EXCEPTION — for the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use n8n-code-tool; it has a different runtime contract
n8n-validation-expert
czlonkowski/n8n-skills
Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, the validation loop process, or auto-fix capabilities. Consult this skill whenever a validatenode or validateworkflow call returns errors or warnings — it knows which warnings are false positives and which errors need real fixes.
n8n-expression-syntax
czlonkowski/n8n-skills
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, mapping data between nodes, or referencing webhook data in workflows. Use this skill whenever configuring node fields that reference data from previous nodes — expressions are how n8n passes data between nodes, and getting the syntax wrong is the most common source of workflow errors. Also use when asked whether a complex expression hurts performance.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available