@ericrisco/rsc 0.1.36 → 0.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +9 -3
  2. package/manifest.json +153 -4
  3. package/package.json +1 -1
  4. package/scripts/lib/domains.js +2 -1
  5. package/scripts/lib/recommend.js +6 -0
  6. package/skills/automation-flows/SKILL.md +1 -1
  7. package/skills/automation-strategy/SKILL.md +131 -0
  8. package/skills/automation-strategy/evals/README.md +16 -0
  9. package/skills/automation-strategy/evals/cases.yaml +48 -0
  10. package/skills/automation-strategy/references/automate-decision-and-roi.md +118 -0
  11. package/skills/automation-strategy/references/orchestration-and-antipatterns.md +107 -0
  12. package/skills/automation-strategy/references/platform-selection-matrix.md +86 -0
  13. package/skills/fable-operator/SKILL.md +170 -0
  14. package/skills/fable-operator/evals/README.md +8 -0
  15. package/skills/fable-operator/evals/cases.yaml +52 -0
  16. package/skills/harness/references/providers.yaml +100 -0
  17. package/skills/make/SKILL.md +255 -0
  18. package/skills/make/evals/README.md +14 -0
  19. package/skills/make/evals/cases.yaml +45 -0
  20. package/skills/make/references/api-v2-cheatsheet.md +114 -0
  21. package/skills/make/references/blueprint-round-trip.md +128 -0
  22. package/skills/make/references/make-mcp-and-auth.md +101 -0
  23. package/skills/n8n/SKILL.md +205 -0
  24. package/skills/n8n/evals/README.md +14 -0
  25. package/skills/n8n/evals/cases.yaml +45 -0
  26. package/skills/n8n/references/auth-and-selfhost.md +62 -0
  27. package/skills/n8n/references/n8n-mcp-tools.md +84 -0
  28. package/skills/n8n/references/rest-api-cheatsheet.md +94 -0
  29. package/skills/power-automate/SKILL.md +169 -0
  30. package/skills/power-automate/evals/README.md +17 -0
  31. package/skills/power-automate/evals/cases.yaml +43 -0
  32. package/skills/power-automate/references/dataverse-web-api.md +187 -0
  33. package/skills/power-automate/references/entra-auth-setup.md +75 -0
  34. package/skills/power-automate/references/flowstudio-mcp-and-limits.md +62 -0
  35. package/skills/roast-me/tools/adapters/__pycache__/__init__.cpython-312.pyc +0 -0
  36. package/skills/roast-me/tools/adapters/__pycache__/base.cpython-312.pyc +0 -0
  37. package/skills/roast-me/tools/adapters/__pycache__/claude.cpython-312.pyc +0 -0
  38. package/skills/roast-me/tools/adapters/__pycache__/codex.cpython-312.pyc +0 -0
  39. package/skills/roast-me/tools/adapters/__pycache__/gemini.cpython-312.pyc +0 -0
  40. package/skills/roast-me/tools/adapters/__pycache__/registry.cpython-312.pyc +0 -0
  41. package/skills/zapier/SKILL.md +145 -0
  42. package/skills/zapier/evals/README.md +5 -0
  43. package/skills/zapier/evals/cases.yaml +50 -0
  44. package/skills/zapier/references/programmatic-limits-and-partner-api.md +48 -0
  45. package/skills/zapier/references/when-to-use-vs-n8n-make.md +44 -0
  46. package/skills/zapier/references/zapier-mcp-tools.md +72 -0
@@ -0,0 +1,101 @@
1
+ # Make MCP server & auth setup
2
+
3
+ The Make MCP server exposes your Make account to an MCP client (Claude, Cursor,
4
+ ChatGPT, or any MCP-capable agent) so it can run — and, on paid plans, manage —
5
+ scenarios as tools. It is **GA and free on every plan**; you pay only the normal
6
+ scenario **credits** each run consumes. Verify specifics at
7
+ [developers.make.com/mcp-server](https://developers.make.com/mcp-server) at
8
+ author time — tool names and transports move.
9
+
10
+ ## Transports
11
+
12
+ Two ways to authenticate the connection:
13
+
14
+ ### OAuth (remote, recommended for end users)
15
+
16
+ Point the client at the hosted endpoint:
17
+
18
+ ```
19
+ https://mcp.make.com # stateless (default)
20
+ https://mcp.make.com/stream # streamable HTTP
21
+ https://mcp.make.com/sse # server-sent events
22
+ ```
23
+
24
+ The client runs an OAuth consent flow; the **scopes you grant at consent decide
25
+ which tools appear**. No token to manage by hand.
26
+
27
+ ### MCP token (per-zone URL)
28
+
29
+ Generate an **MCP token** in Make (Profile → API/SDK) and embed it in a zoned URL:
30
+
31
+ ```
32
+ https://{zone}.make.com/mcp/u/{MCP_TOKEN}/stateless
33
+ https://{zone}.make.com/mcp/u/{MCP_TOKEN}/stream
34
+ https://{zone}.make.com/mcp/u/{MCP_TOKEN}/sse
35
+ ```
36
+
37
+ - `{zone}` is your org's zone (`eu1|eu2|us1|us2`, + `celonis`) — same **zone
38
+ trap** as the REST API: wrong zone = auth failure.
39
+ - The MCP token is **separate** from the REST API token.
40
+
41
+ ### Timeout — pick the transport by run length
42
+
43
+ | Transport | Timeout | Use for |
44
+ |---|---|---|
45
+ | `/stateless` | ~60 s | quick scenarios, simple clients |
46
+ | `/stream` | ~5 min 20 s | long-running scenarios |
47
+ | `/sse` | ~5 min 20 s | streaming clients |
48
+
49
+ A scenario that takes longer than 60 s on `/stateless` will time out — use
50
+ `/stream` or `/sse`.
51
+
52
+ ## Tool tiers
53
+
54
+ Exact tool names change; confirm in the client's tool list. The **tiers** are
55
+ stable:
56
+
57
+ - **Run tools — all plans.** List the account's on-demand scenarios and execute
58
+ a chosen one with inputs, returning its output bundle. This is what lets an
59
+ agent *use* an automation you built.
60
+ - **Management tools — paid plans only.** View and modify scenarios,
61
+ connections, hooks, data stores, teams, and organizations — effectively the
62
+ REST CRUD surfaced as MCP tools. On a free plan these do not appear.
63
+
64
+ On the OAuth transport, missing scopes (not just plan tier) can also hide tools.
65
+
66
+ ## Client config sketches
67
+
68
+ Token transport (generic `mcpServers` block; adapt to your client):
69
+
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "make": {
74
+ "url": "https://eu2.make.com/mcp/u/${MAKE_MCP_TOKEN}/stream"
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ For stdio-only clients, bridge a streamable-HTTP URL to stdio with a proxy such
81
+ as `mcp-proxy`.
82
+
83
+ ## Legacy local server
84
+
85
+ `integromat/make-mcp-server` is the **older local stdio** server. It runs as a
86
+ local process and exposes your on-demand scenarios as tools over stdio. It
87
+ predates the cloud server; prefer the cloud MCP unless you specifically need a
88
+ local, offline-ish process (e.g. an air-gapped client that cannot reach
89
+ `mcp.make.com`).
90
+
91
+ ## Credits, not a free lunch
92
+
93
+ The MCP *server* is free, but every scenario an MCP call runs burns the same
94
+ **credits** as any other run. An agent that loops over a run tool can quietly
95
+ drain credits — cap it the way you would any autonomous consumer.
96
+
97
+ ## When NOT to use MCP
98
+
99
+ If the operator is your own deterministic script/CI, the REST API v2 is simpler
100
+ and fully controllable — MCP earns its keep only when an **agent** is the one
101
+ driving Make.
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: n8n
3
+ description: "Use when operating a live n8n instance programmatically — driving its public REST API (`{host}/api/v1`, `X-N8N-API-KEY`) or the n8n-mcp server to create, validate, test, activate/deactivate, list, update, or delete workflows and read executions, on self-host or `*.app.n8n.cloud`. Triggers: 'deploy this workflow to my n8n over the API', 'push my workflow JSON to n8n with curl', 'I set active:true in the create call but it stays inactive', 'connect n8n-mcp / n8n_create_workflow to Claude', 'validate and autofix my n8n workflow', 'run an n8n workflow by id from a script', 'delete a workflow via the API', 'automatiza n8n por API', 'desplega el workflow a n8n.cloud'. NOT designing the flow's trigger-step-error logic or hand-building the importable workflow JSON (that is automation-flows), NOT operating Make / Zapier / Power Automate (their own skills), NOT a typed API client with auth+pagination+retry (api-connector-builder), NOT the inbound webhook receiver in your own app (webhooks)."
4
+ tags: [n8n, automation, workflows, mcp, rest-api, no-code, integrations]
5
+ recommends: [automation-flows, automation-strategy, api-connector-builder, webhooks]
6
+ profiles: [full]
7
+ origin: risco
8
+ ---
9
+
10
+ # n8n — operate a live instance over its REST API and MCP
11
+
12
+ You already have a workflow *design* (the trigger→steps→error shape and the importable JSON).
13
+ This skill is the **operate** half: push that JSON into a running n8n, validate it, test it, flip it
14
+ live, watch its executions, and tear it down safely — all without touching the UI. n8n has the
15
+ richest programmatic story of the no-code platforms: a first-party REST API **plus** a mature MCP
16
+ server, both hitting the same instance.
17
+
18
+ Designing the flow itself (what fires it, how errors are handled, dedup) is **automation-flows** —
19
+ this skill *consumes* that skill's `references/n8n-workflow-json.md` payload; it does not re-teach
20
+ design.
21
+
22
+ ## Connect first — REST API vs MCP
23
+
24
+ Two ways to drive the same instance. Pick by who is at the wheel.
25
+
26
+ | | **Public REST API** | **n8n-mcp** (czlonkowski, de-facto standard) |
27
+ |---|---|---|
28
+ | What it is | n8n's own HTTP API at `{host}/api/v1` | MCP server wrapping that API **+** offline node/expression knowledge |
29
+ | Best for | scripts, CI/CD, deterministic deploys, no extra dependency | an agent (Claude) building/fixing workflows in the loop — it can look up node schemas, then validate/autofix before it writes |
30
+ | Auth | API key in header `X-N8N-API-KEY` | management tools need `N8N_API_URL` + `N8N_API_KEY`; **node-knowledge tools need no auth** |
31
+ | Surface | identical on self-host **and** `*.app.n8n.cloud` | same underlying API; hosted trial at `dashboard.n8n-mcp.com` |
32
+
33
+ **Version reality (verify at author time — n8n moves fast):**
34
+ - API base is `{host}/api/v1`. Self-host ships interactive Swagger at `/api/v1/docs`; **cloud does not**.
35
+ - `POST /workflows/{id}/execute` (run-by-id) is **recent** (n8n PR #20234). Older instances lack it —
36
+ there, the only programmatic run is POSTing to a Webhook node's URL. It also takes **no custom input**.
37
+ - The API surface is the SAME whether you self-host or run on `*.app.n8n.cloud`; only the host differs.
38
+
39
+ ### `.env`
40
+
41
+ ```bash
42
+ # host root only — you append /api/v1 for REST; n8n-mcp reads it whole
43
+ N8N_API_URL=https://your-instance.app.n8n.cloud # or N8N_HOST for self-host, e.g. http://localhost:5678
44
+ N8N_API_KEY=n8n_api_... # Settings → n8n API → Create an API key
45
+ ```
46
+
47
+ Never inline the key in a command that gets logged, and never put a *node* credential (Slack token,
48
+ etc.) in the workflow payload — reference it by the n8n **credential store** id/name (see
49
+ automation-flows' JSON schema). Full key-creation + self-host vs cloud + MCP install:
50
+ `references/auth-and-selfhost.md`.
51
+
52
+ ## The payload you POST
53
+
54
+ The create/update body is exactly the automation-flows workflow JSON. Required top-level keys on
55
+ **create**: `name`, `nodes`, `connections`, `settings`. Build it per
56
+ `../automation-flows/references/n8n-workflow-json.md` — non-empty `nodes` with one trigger, a wired
57
+ `connections` map, `settings.errorWorkflow`, credentials referenced by store (never inlined).
58
+
59
+ **Node/expression essentials** (pointer, not a tutorial): node `type` is namespaced
60
+ (`n8n-nodes-base.webhook`), `typeVersion` must match a node version installed on the target instance
61
+ or activation/execution fails; field values use expressions like `={{ $json.email }}` or
62
+ `={{ $node["Webhook"].json.body.id }}`. If you are hand-authoring nodes, let n8n-mcp's node-knowledge
63
+ tools (`search_nodes`, `get_node_essentials`, `validate_node_operation`) fill in the exact property
64
+ shapes rather than guessing — that is the single biggest reason to drive via MCP.
65
+
66
+ ## Dynamic lifecycle
67
+
68
+ create → **validate** → test → **activate** → manage → delete. A concrete sketch per step, curl and
69
+ n8n-mcp side by side.
70
+
71
+ ### 1. Validate (do this BEFORE create)
72
+
73
+ REST has no validation endpoint — n8n only tells you at create/activate time. MCP does, so validate
74
+ first when it is available:
75
+
76
+ ```
77
+ n8n_validate_workflow { "workflow": { …the full JSON… } }
78
+ n8n_autofix_workflow { "workflow": { … } } # repairs common structural errors, returns fixed JSON
79
+ ```
80
+
81
+ ### 2. Create
82
+
83
+ ```bash
84
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows" \
85
+ -H "X-N8N-API-KEY: $N8N_API_KEY" -H "Content-Type: application/json" \
86
+ -d @workflow.json # body = { name, nodes, connections, settings }
87
+ # → returns the created workflow WITH its "id" — capture it for every step below
88
+ ```
89
+ ```
90
+ n8n_create_workflow { "name": "...", "nodes": [ … ], "connections": { … }, "settings": { … } }
91
+ ```
92
+
93
+ ### 3. Test / dry-run
94
+
95
+ - **No input needed** → run by id (recent instances only): `POST /workflows/{id}/execute`.
96
+ - **Needs input** → the execute endpoint accepts none. Make the trigger a **Webhook node** and POST to
97
+ its URL (test URL `/webhook-test/<path>` while "Listen for test event" is armed; production
98
+ `/webhook/<path>` once active).
99
+
100
+ ```bash
101
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows/$ID/execute" -H "X-N8N-API-KEY: $N8N_API_KEY"
102
+ curl -sS -X POST "$N8N_HOST/webhook-test/my-path" -H "Content-Type: application/json" -d '{"foo":"bar"}'
103
+ ```
104
+ ```
105
+ n8n_test_workflow { "id": "$ID" }
106
+ ```
107
+
108
+ ### 4. Activate — the step people miss
109
+
110
+ `active` in the create/update body is **read-only and silently ignored**. Setting `"active": true`
111
+ does nothing. You MUST call the separate endpoint:
112
+
113
+ ```bash
114
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows/$ID/activate" -H "X-N8N-API-KEY: $N8N_API_KEY"
115
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows/$ID/deactivate" -H "X-N8N-API-KEY: $N8N_API_KEY"
116
+ ```
117
+ n8n-mcp deliberately does not expose activate/deactivate as tools (activation has live side effects).
118
+ Check the current tool list; if absent, call the REST `/activate` endpoint as above.
119
+
120
+ ### 5. Manage
121
+
122
+ ```bash
123
+ curl -sS "$N8N_API_URL/api/v1/workflows?limit=50" -H "X-N8N-API-KEY: $N8N_API_KEY" # list (paginate via nextCursor)
124
+ curl -sS "$N8N_API_URL/api/v1/workflows/$ID" -H "X-N8N-API-KEY: $N8N_API_KEY" # get
125
+ curl -sS -X PUT "$N8N_API_URL/api/v1/workflows/$ID" -H "X-N8N-API-KEY: $N8N_API_KEY" \
126
+ -H "Content-Type: application/json" -d @workflow.json # FULL replace
127
+ curl -sS "$N8N_API_URL/api/v1/executions?workflowId=$ID&limit=20" -H "X-N8N-API-KEY: $N8N_API_KEY"
128
+ ```
129
+ ```
130
+ n8n_list_workflows {} n8n_get_workflow { "id": "$ID" } n8n_executions { "workflowId": "$ID" }
131
+ n8n_update_full_workflow { "id": "$ID", "nodes": [ … ], "connections": { … } } # replace everything
132
+ n8n_update_partial_workflow { "id": "$ID", "operations": [ … ] } # atomic diff — preferred
133
+ n8n_health_check {} # confirm API reachable + which features the instance supports
134
+ ```
135
+ `PUT` is a **full replace** — GET, mutate the whole object, PUT it back, or you drop the nodes you
136
+ omitted. n8n-mcp's `n8n_update_partial_workflow` applies a targeted, atomic batch instead (safer).
137
+
138
+ ### 6. Delete — irreversible
139
+
140
+ `DELETE` is a **hard delete: no trash, no undo.** Export the current JSON first, every time.
141
+
142
+ ```bash
143
+ curl -sS "$N8N_API_URL/api/v1/workflows/$ID" -H "X-N8N-API-KEY: $N8N_API_KEY" > backup-$ID.json # export FIRST
144
+ curl -sS -X DELETE "$N8N_API_URL/api/v1/workflows/$ID" -H "X-N8N-API-KEY: $N8N_API_KEY"
145
+ ```
146
+ ```
147
+ n8n_get_workflow { "id": "$ID" } → save output → n8n_delete_workflow { "id": "$ID" }
148
+ ```
149
+
150
+ **Irreversibility rule:** never DELETE (or full-replace) a live workflow without exporting it first.
151
+
152
+ ## Governance
153
+
154
+ If you expose n8n-mcp to an agent, lock down destructive tools with the `DISABLED_TOOLS` env var
155
+ (comma-separated), e.g. `DISABLED_TOOLS=n8n_delete_workflow,n8n_update_full_workflow`. Scope the API
156
+ key itself too — n8n supports scoped keys (e.g. grant `workflow:read` without `workflow:execute`).
157
+ Details in `references/n8n-mcp-tools.md`.
158
+
159
+ ## Honesty / gotchas
160
+
161
+ - **`active` and `tags` are read-only on create/update** — ignored in the body; activate/tag via the
162
+ dedicated endpoints. This is the #1 "why is my workflow inactive" bug.
163
+ - **`/workflows/{id}/execute` takes no custom input** — for runtime params, trigger a Webhook workflow
164
+ by POSTing to its URL. Also, it is a newer endpoint; older instances 404 it.
165
+ - **`DELETE` and `PUT` are destructive** — hard delete (no trash) and full replace. Export first; prefer
166
+ `n8n_update_partial_workflow` for edits.
167
+ - **`typeVersion` must exist on the target** — a node version the instance doesn't have fails only at
168
+ activate/execute time, not at create. Validate (MCP) or test before activating.
169
+ - **Credential secrets are not fully manageable over the public API** — you can reference existing
170
+ credentials by id/name and create some, but you cannot read secrets back; provision credentials in
171
+ the UI / n8n-mcp `n8n_manage_credentials` and reference them.
172
+ - **Cloud has no Swagger** — `/api/v1/docs` is self-host only; on cloud, work from the docs.
173
+ - **Activation can succeed via API where the UI would block it** — the public API historically skips a
174
+ few UI-side activation validations, so a workflow can be "active" yet non-functional. Test it live.
175
+
176
+ ## Related skills
177
+
178
+ - **automation-flows** — *design* the flow and produce the importable JSON this skill deploys. Design
179
+ vs operate boundary: they decide the trigger/steps/error path; you push it live. Start there if the
180
+ flow's logic isn't settled yet.
181
+ - **automation-strategy** — whether n8n is even the right platform (cost model, self-host vs cloud) vs
182
+ Make/Zapier/Power Automate.
183
+ - **make / zapier / power-automate** — the other platforms' operate stories (Zapier and Power Automate
184
+ can't create flows via API — n8n's edge).
185
+ - **api-connector-builder** — a generic typed HTTP client with auth/pagination/backoff, when the answer
186
+ is real code, not a workflow.
187
+ - **webhooks** — building the inbound receiver *in your own app*; here webhooks are just n8n triggers.
188
+
189
+ ## Checklist
190
+
191
+ - [ ] `.env` has `N8N_API_URL`/`N8N_HOST` + `N8N_API_KEY` (key from Settings → n8n API); key not logged.
192
+ - [ ] Payload has `name`, `nodes` (one trigger), `connections`, `settings` per automation-flows' schema;
193
+ node credentials referenced by store, never inlined.
194
+ - [ ] Validated (`n8n_validate_workflow` / `n8n_autofix_workflow`) before create when MCP is available.
195
+ - [ ] Created via `POST /workflows` or `n8n_create_workflow`; captured the returned `id`.
196
+ - [ ] Tested — `execute`-by-id (no input) or POST to the webhook URL (with input) — and the run succeeded.
197
+ - [ ] Activated via `POST /workflows/{id}/activate` (NOT `active:true` in the body).
198
+ - [ ] Before any DELETE or full-replace: exported the current JSON (hard delete, no trash).
199
+ - [ ] If MCP is exposed to an agent: `DISABLED_TOOLS` set and/or the API key scoped.
200
+
201
+ ## References
202
+
203
+ - `references/rest-api-cheatsheet.md` — every workflow/execution endpoint with curl, pagination, scopes.
204
+ - `references/n8n-mcp-tools.md` — the management + node-knowledge tool list, the auth split, `DISABLED_TOOLS`.
205
+ - `references/auth-and-selfhost.md` — API-key creation, self-host vs cloud, Swagger, installing/pointing n8n-mcp.
@@ -0,0 +1,14 @@
1
+ # Evals — n8n
2
+
3
+ `cases.yaml` has three groups. `should_trigger` covers the operate tasks this skill owns: deploying a
4
+ workflow JSON over the REST API, the read-only-`active` gotcha, wiring n8n-mcp management tools,
5
+ running a workflow by id, hard-delete safety, and validate/autofix — with a Spanish phrasing. Each
6
+ `should_not_trigger` names a real sibling: flow design + importable JSON → automation-flows,
7
+ platform/cost choice → automation-strategy, another platform → make, a typed code client →
8
+ api-connector-builder, an in-app inbound receiver → webhooks. `capability` is one end-to-end deploy
9
+ scenario whose `must_include` rubric pins the current API/MCP calls, the honesty limits (read-only
10
+ `active`, no-input `execute`), and the irreversibility rule (export before hard delete).
11
+
12
+ No automated runner. Score by judgement: feed each `should_trigger`/`should_not_trigger` prompt to the
13
+ routing layer and confirm it activates or routes to the listed sibling; for `capability`, have the
14
+ skill produce the deploy plan/commands and check every `must_include` bullet by hand.
@@ -0,0 +1,45 @@
1
+ skill: n8n
2
+
3
+ should_trigger:
4
+ - prompt: "Push my workflow JSON to n8n over the API with curl and turn it on."
5
+ why: Canonical operate task — POST /workflows then the separate /activate endpoint. Core deliverable.
6
+ - prompt: "I set active:true in my POST to /api/v1/workflows but the workflow stays inactive. Why?"
7
+ why: The read-only-active gotcha — active/tags are ignored on create; must call /workflows/{id}/activate.
8
+ - prompt: "Wire n8n-mcp into Claude Code so it can call n8n_create_workflow and n8n_update_partial_workflow against my instance."
9
+ why: MCP operate path — configuring the management tier with N8N_API_URL + N8N_API_KEY.
10
+ - prompt: "How do I run an n8n workflow by its id from a shell script, and can I pass it input data?"
11
+ why: POST /workflows/{id}/execute (recent) plus the no-custom-input limit → webhook trigger for params.
12
+ - prompt: "Delete this workflow from my n8n via the API — is there an undo?"
13
+ why: Hard-delete irreversibility; must export (GET) first, no trash.
14
+ - prompt: "desplega este workflow a mi n8n.cloud por la API y valídalo antes de activarlo"
15
+ why: Spanish; programmatic deploy + validate + activate against cloud — same REST surface.
16
+ - prompt: "Validate and autofix my n8n workflow before I create it, then list its executions."
17
+ why: n8n_validate_workflow / n8n_autofix_workflow then n8n_executions — MCP management lifecycle.
18
+
19
+ should_not_trigger:
20
+ - prompt: "Design an n8n flow: Stripe payment → Notion row → Slack, with an error path and dedup. Give me the importable JSON."
21
+ route_to: automation-flows
22
+ why: Designing the trigger/steps/error shape and producing the JSON is automation-flows; this skill only deploys/operates that JSON.
23
+ - prompt: "Should I use n8n, Make, or Zapier for 50k runs a month, and self-host or cloud?"
24
+ route_to: automation-strategy
25
+ why: Platform/cost-model selection, not operating a specific live n8n instance.
26
+ - prompt: "Create this scenario in my Make account programmatically."
27
+ route_to: make
28
+ why: Operating a different platform (Make) — its own skill; Make also has no create-via-API story like n8n's.
29
+ - prompt: "Write a TypeScript client for the Acme REST API with API-key auth, cursor pagination, and exponential backoff."
30
+ route_to: api-connector-builder
31
+ why: A typed HTTP client in code, not driving n8n's API or MCP.
32
+ - prompt: "Build the endpoint in my Express app that receives and verifies inbound webhook signatures."
33
+ route_to: webhooks
34
+ why: An inbound receiver in the user's own app; here webhooks are only n8n triggers, not something this skill builds.
35
+
36
+ capability:
37
+ - scenario: "User has an importable n8n workflow JSON (webhook trigger → HTTP node → Slack) and wants it deployed to their n8n.cloud instance: created, tested, activated, and later safely removed — via the REST API and/or n8n-mcp."
38
+ must_include:
39
+ - "Reads N8N_API_URL/N8N_HOST + N8N_API_KEY from env; key from Settings → n8n API; sends it as the X-N8N-API-KEY header (not a bearer token)."
40
+ - "Builds the create body per automation-flows' n8n-workflow-json schema (name, nodes, connections, settings); node credentials referenced by the credential store, never inlined."
41
+ - "Creates with POST /workflows (or n8n_create_workflow) and captures the returned id for subsequent calls."
42
+ - "States that active (and tags) are read-only on create/update and activates with a separate POST /workflows/{id}/activate."
43
+ - "Notes POST /workflows/{id}/execute takes no custom input (and is a recent endpoint), so runtime params require POSTing to a Webhook node URL."
44
+ - "Exports the workflow (GET /workflows/{id}) before any DELETE, and states DELETE is a hard delete with no trash."
45
+ - "When driving via MCP, validates/autofixes (n8n_validate_workflow / n8n_autofix_workflow) before create; notes management tools need the two env vars while node-knowledge tools do not."
@@ -0,0 +1,62 @@
1
+ # n8n auth, self-host vs cloud, and pointing n8n-mcp
2
+
3
+ ## Get an API key
4
+
5
+ 1. In n8n, open **Settings → n8n API**.
6
+ 2. **Create an API key.** Prefer a **scoped** key — pick only the resource scopes the automation needs
7
+ (e.g. `workflow:read`, `workflow:create`, `workflow:execute`, `execution:read`). An unscoped key can
8
+ do everything the user can, including delete.
9
+ 3. Copy it once (it is shown once) and store it as `N8N_API_KEY`. Rotate by deleting + recreating.
10
+
11
+ Every REST call carries it as a header: `X-N8N-API-KEY: <key>`. It is NOT a bearer token and NOT in
12
+ the query string.
13
+
14
+ ```bash
15
+ export N8N_API_KEY="n8n_api_..."
16
+ export N8N_API_URL="https://your-instance.app.n8n.cloud" # host root; append /api/v1 for REST
17
+ ```
18
+
19
+ ## Self-host vs cloud — what actually differs
20
+
21
+ | | Self-host | Cloud (`*.app.n8n.cloud`) |
22
+ |---|---|---|
23
+ | API base | `{host}/api/v1` (e.g. `http://localhost:5678/api/v1`) | `https://<tenant>.app.n8n.cloud/api/v1` |
24
+ | API surface | **identical** | **identical** |
25
+ | Interactive Swagger | **Yes** at `/api/v1/docs` | **No** — work from docs.n8n.io |
26
+ | Where data lives | your infra | n8n's |
27
+ | Enabling the API | on by default; can be toggled via `N8N_PUBLIC_API_DISABLED=true` | always on |
28
+ | Base URL override | `WEBHOOK_URL` / `N8N_HOST`/`N8N_PROTOCOL`/`N8N_PORT` shape the host + webhook URLs | fixed |
29
+
30
+ The only thing that changes between environments is the host and (self-host) the Swagger page.
31
+ Scripts written against one work against the other by swapping `N8N_API_URL`.
32
+
33
+ Webhook URLs on self-host derive from `WEBHOOK_URL` (or host/protocol/port). If your production webhook
34
+ URLs look wrong (localhost behind a proxy), that env var is usually why.
35
+
36
+ ## Pointing n8n-mcp at your instance
37
+
38
+ `n8n-mcp` reads the **same two env vars** for its management tier:
39
+
40
+ ```bash
41
+ N8N_API_URL=https://your-instance.app.n8n.cloud
42
+ N8N_API_KEY=n8n_api_...
43
+ ```
44
+
45
+ Ways to run it:
46
+
47
+ - **Hosted** — `dashboard.n8n-mcp.com`: add an instance (URL + key), get an MCP endpoint. Fastest trial;
48
+ free tier caps daily tool calls.
49
+ - **Local (npx)** — run the `n8n-mcp` package and register it in your MCP client's config
50
+ (Claude Code / Claude Desktop / Cursor / Windsurf), passing the two env vars.
51
+ - **Docker** — the repo ships an image; inject the env vars.
52
+
53
+ Node-knowledge tools work with **no** auth; only the management tools need the two vars. Confirm the
54
+ link with `n8n_health_check` — it reports reachability and which features (e.g. the `/execute`
55
+ endpoint) the target instance supports.
56
+
57
+ ## Governance quick-set
58
+
59
+ - **Scope the key** at creation (least privilege) — see above.
60
+ - **`DISABLED_TOOLS`** on n8n-mcp to gate destructive tools — see `n8n-mcp-tools.md`.
61
+ - **Never** commit `N8N_API_KEY` or inline node-credential secrets in a workflow payload; reference
62
+ credentials from the n8n credential store by id/name.
@@ -0,0 +1,84 @@
1
+ # n8n-mcp — tool reference & governance
2
+
3
+ `n8n-mcp` (github.com/czlonkowski/n8n-mcp, ~22k★, the de-facto community standard) is an MCP server
4
+ that gives an agent two things: **offline knowledge** of n8n's node/expression catalogue, and
5
+ **management** of a live instance via its REST API. Distinct from n8n's own first-party built-in MCP
6
+ node, which lets a *workflow* act as an MCP server/client — that is not this.
7
+
8
+ Tool names and counts move; **verify against the running server's tool list** (or
9
+ `dashboard.n8n-mcp.com` / the repo docs) before relying on any one name.
10
+
11
+ ## Two tiers, two auth requirements
12
+
13
+ | Tier | Needs auth? | Purpose |
14
+ |---|---|---|
15
+ | **Node-knowledge tools** | **No** | Search/describe nodes, get property essentials, validate a node's config, browse templates — all offline. Safe to expose broadly. |
16
+ | **Management tools** | **Yes** — `N8N_API_URL` + `N8N_API_KEY` | CRUD/validate/test/run/inspect a real instance. These are the ones governance applies to. |
17
+
18
+ Set the same two env vars the REST API uses:
19
+
20
+ ```bash
21
+ N8N_API_URL=https://your-instance.app.n8n.cloud # host root, whole value
22
+ N8N_API_KEY=n8n_api_...
23
+ ```
24
+
25
+ Without them the server still runs — you just get the node-knowledge tier only.
26
+
27
+ ## Node-knowledge tools (no auth)
28
+
29
+ - `search_nodes`, `list_nodes`, `list_ai_tools` — find the right node.
30
+ - `get_node_essentials`, `get_node_info`, `get_node_documentation` — properties & docs for a node type.
31
+ - `validate_node_operation`, `validate_node_minimal` — check a single node's config before you wire it.
32
+ - `search_templates`, `get_template` — reuse community workflow templates.
33
+
34
+ Use these to author node JSON correctly instead of guessing `typeVersion`/property shapes.
35
+
36
+ ## Management tools (need `N8N_API_URL` + `N8N_API_KEY`)
37
+
38
+ | Tool | Does |
39
+ |---|---|
40
+ | `n8n_create_workflow` | Create from a full workflow object. |
41
+ | `n8n_get_workflow` | Fetch one workflow (export before delete/replace). |
42
+ | `n8n_list_workflows` | List/filter workflows. |
43
+ | `n8n_update_full_workflow` | Replace the whole workflow (like REST `PUT`). |
44
+ | `n8n_update_partial_workflow` | **Atomic ordered batch of targeted edits** — if any op fails, nothing is saved. Prefer this for edits. |
45
+ | `n8n_delete_workflow` | **Hard delete.** Export first. |
46
+ | `n8n_validate_workflow` | Structural/connection/expression validation of a workflow object. |
47
+ | `n8n_autofix_workflow` | Repair common errors and return fixed JSON. |
48
+ | `n8n_test_workflow` | Trigger a run for testing. |
49
+ | `n8n_executions` | List/inspect execution runs. |
50
+ | `n8n_workflow_versions` | Version history of a workflow. |
51
+ | `n8n_deploy_template` | Deploy a catalogue template to the instance. |
52
+ | `n8n_manage_credentials` | Create/manage credentials (secrets not readable back). |
53
+ | `n8n_manage_datatable` | Manage n8n data tables. |
54
+ | `n8n_health_check` | Confirm API reachability + which features the instance supports. |
55
+ | `n8n_audit_instance` | Security audit (built-in audit API + deep workflow scan). |
56
+
57
+ **Note on activate/deactivate:** n8n-mcp intentionally does not surface these as tools (activation has
58
+ live side effects). Flip a workflow live with the REST `POST /workflows/{id}/activate` endpoint (see
59
+ `rest-api-cheatsheet.md`) or the UI. Verify the current tool list in case this changes.
60
+
61
+ ## Governance — `DISABLED_TOOLS`
62
+
63
+ For agent-facing deployments, disable destructive/write tools with a comma-separated env var:
64
+
65
+ ```bash
66
+ # read-only agent: no create/replace/delete/autofix/test/template/credential/datatable writes
67
+ DISABLED_TOOLS=n8n_create_workflow,n8n_update_full_workflow,n8n_update_partial_workflow,n8n_delete_workflow,n8n_autofix_workflow,n8n_deploy_template,n8n_test_workflow,n8n_manage_credentials,n8n_manage_datatable
68
+ ```
69
+
70
+ Layer it with a **scoped API key** (grant only `workflow:read`/`execution:read` for a monitoring
71
+ agent) so a disabled tool can't be worked around and the key itself can't mutate. Two independent
72
+ locks: the tool gate and the key scope.
73
+
74
+ ## Sketch: agent-driven deploy
75
+
76
+ ```
77
+ search_nodes / get_node_essentials → get the exact node property shapes
78
+ n8n_validate_workflow { workflow } → catch structural errors offline
79
+ n8n_autofix_workflow { workflow } → auto-repair, re-validate
80
+ n8n_create_workflow { name, nodes, connections, settings } → capture returned id
81
+ n8n_test_workflow { id } → confirm it runs
82
+ # then activate via REST /workflows/{id}/activate (no MCP tool for it)
83
+ n8n_executions { workflowId: id } → confirm the live run
84
+ ```
@@ -0,0 +1,94 @@
1
+ # n8n public REST API — cheat sheet
2
+
3
+ Base URL: `{host}/api/v1`. Auth header on every call: `X-N8N-API-KEY: $N8N_API_KEY`.
4
+ Same surface on self-host and `*.app.n8n.cloud`. Self-host has interactive Swagger at
5
+ `{host}/api/v1/docs`; cloud does not. Verify shapes at author time — n8n ships often.
6
+
7
+ Set once:
8
+
9
+ ```bash
10
+ export N8N_API_URL="https://your-instance.app.n8n.cloud" # or http://localhost:5678
11
+ export N8N_API_KEY="n8n_api_..."
12
+ auth=(-H "X-N8N-API-KEY: $N8N_API_KEY")
13
+ ```
14
+
15
+ ## Workflows
16
+
17
+ | Verb & path | What it does | Notes |
18
+ |---|---|---|
19
+ | `POST /workflows` | Create | Body needs `name, nodes, connections, settings`. `active` + `tags` in the body are **ignored** (read-only). Returns the new object incl. `id`. |
20
+ | `GET /workflows/{id}` | Get one | The full exportable JSON. Use to back up before delete/replace. |
21
+ | `GET /workflows` | List | Query: `limit` (default ~100), `cursor`, `active=true|false`, `tags`, `name`, `projectId`. Paginate with the returned `nextCursor`. |
22
+ | `PUT /workflows/{id}` | **Full replace** | Send the WHOLE object; omitted fields are dropped. GET → mutate → PUT. |
23
+ | `DELETE /workflows/{id}` | **Hard delete** | No trash, no undo. Export first. |
24
+ | `POST /workflows/{id}/activate` | Activate | The ONLY way to go live — the body `active` flag never does it. |
25
+ | `POST /workflows/{id}/deactivate` | Deactivate | Same, in reverse. |
26
+ | `POST /workflows/{id}/execute` | Run by id | **Recent (PR #20234); older instances 404.** Runs `executeManually`; **accepts no custom input** — needs `workflow:execute` scope. |
27
+ | `PUT /workflows/{id}/tags` | Set tags | Tags are managed here, not in the create/update body. |
28
+ | `PUT /workflows/{id}/transfer` | Move to a project | Enterprise/projects. |
29
+
30
+ ```bash
31
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows" "${auth[@]}" \
32
+ -H "Content-Type: application/json" -d @workflow.json
33
+ curl -sS "$N8N_API_URL/api/v1/workflows?limit=50&active=true" "${auth[@]}"
34
+ curl -sS "$N8N_API_URL/api/v1/workflows/$ID" "${auth[@]}" > backup-$ID.json
35
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows/$ID/activate" "${auth[@]}"
36
+ curl -sS -X POST "$N8N_API_URL/api/v1/workflows/$ID/execute" "${auth[@]}"
37
+ curl -sS -X DELETE "$N8N_API_URL/api/v1/workflows/$ID" "${auth[@]}"
38
+ ```
39
+
40
+ Paginate:
41
+
42
+ ```bash
43
+ cursor=""
44
+ while :; do
45
+ page=$(curl -sS "$N8N_API_URL/api/v1/workflows?limit=100&cursor=$cursor" "${auth[@]}")
46
+ echo "$page" | jq -r '.data[].id'
47
+ cursor=$(echo "$page" | jq -r '.nextCursor // empty')
48
+ [ -z "$cursor" ] && break
49
+ done
50
+ ```
51
+
52
+ ## Executions
53
+
54
+ | Verb & path | What it does |
55
+ |---|---|
56
+ | `GET /executions` | List runs. Query: `workflowId`, `status` (`success|error|waiting`), `limit`, `cursor`, `includeData=true`. |
57
+ | `GET /executions/{id}` | One run; `?includeData=true` for the full item data. |
58
+ | `DELETE /executions/{id}` | Delete a run's stored data. |
59
+
60
+ ```bash
61
+ curl -sS "$N8N_API_URL/api/v1/executions?workflowId=$ID&status=error&limit=20" "${auth[@]}"
62
+ ```
63
+
64
+ ## Triggering a run WITH input
65
+
66
+ `/execute` takes no body data. To pass runtime params, the workflow's trigger must be a **Webhook**
67
+ node; POST to its URL:
68
+
69
+ - Test URL (only while the editor's "Listen for test event" is armed): `{host}/webhook-test/<path>`
70
+ - Production URL (only once the workflow is active): `{host}/webhook/<path>`
71
+
72
+ ```bash
73
+ curl -sS -X POST "$N8N_HOST/webhook/my-path" -H "Content-Type: application/json" -d '{"orderId":123}'
74
+ ```
75
+
76
+ ## Other resources
77
+
78
+ - `GET/POST/DELETE /credentials` — create/delete credentials and `GET /credentials/schema/{type}` for
79
+ the field shape. **You cannot read secrets back.** Reference existing creds from a workflow by id/name.
80
+ - `GET/POST/PUT/DELETE /tags`, `/projects`, `/variables`, `/users` (admin), `/source-control/pull`,
81
+ `/audit` (instance security audit).
82
+
83
+ ## API-key scopes (least privilege)
84
+
85
+ Create a **scoped** key in Settings → n8n API. Scopes are grouped by resource, e.g. `workflow:read`,
86
+ `workflow:create`, `workflow:update`, `workflow:delete`, `workflow:execute`, `execution:read`,
87
+ `credential:create`, `tag:*`. Grant only what a given automation needs — e.g. a read-only dashboard
88
+ key gets `workflow:read` + `execution:read` and nothing that can mutate or run.
89
+
90
+ ## Error responses
91
+
92
+ `401` bad/missing key · `403` key lacks the scope · `404` no such id (or `/execute` on an instance
93
+ too old to have it) · `400` malformed body (e.g. missing `connections`) · `500` server-side (often a
94
+ node the instance doesn't have installed).