The toolkit for building code‑heavy n8n workflows
agent-first, MCP-native.
Code nodes as files in git: write TypeScript with shared helpers & types, verify with preflights offline or on your instance, and sync draft-first over n8n's built-in MCP server. decanter owns the code; your agent drives the rest over n8n's guarded MCP.
npm install -g n8n-decanterRun n8n-decanter with no arguments — pick a workflow, run a verb.
Code nodes as files, in git
A folder per workflow, every Code node its own .js or .ts file — real diffs, PRs, and blame at the code level, with every push and pull auto-committed. Workflow structure is mirrored into a read-only snapshot, so structural changes show up as clean diffs too.
TypeScript or typed JS
Write nodes in TS (compiled on push) or JSDoc-typed JS — n8n globals ($input, $('…'), DateTime, …) are typed in both, so you get real editor autocomplete and inline errors before anything reaches your instance.
Shared types & helpers
.ts nodes import helpers and types from shared/ and opted-in npm packages; push bundles them into self-contained nodes that run anywhere, n8n Cloud included — no NODE_FUNCTION_ALLOW_* setup.
Preflights
check, simulate, and test — verify offline or on your instance. check is static; simulate replays the workflow through a real engine offline (Docker); test runs it on your instance, draft-only. Each diffs every node against a real capture and exits 1 on divergence — and preflight runs the whole ladder as one scored, read-only, CI-gateable verdict.
Draft-first over n8n's MCP
Sync Code-node source over n8n's built-in MCP server: every push lands on the workflow's draft, and publish is the deliberate go-live step. watch pushes on save; the open n8n editor tab reflects each push live (n8n's own draft-edit refresh, no proxy).
Agent-native, your own model
init scaffolds Claude Code / Cursor / Codex configs and guard hooks; the scaffolded .mcp.json spawns mcp connect, a guard that holds your credentials so agents never see them (mcp serve is the HTTP variant). decanter never calls an LLM itself — your agent and subscription do 100%.
…or hand it to your coding agent — it edits, tests offline, and pushes.
How it compares
n8n-decanter is Code-node-first — the loop of writing, typing, verifying, and shipping the code inside your workflows. It builds on n8n's own MCP server and skills; the comparison here is against the native editor and n8n-as-code:
Choose n8n-as-code if you…
Need an enterprise-ready automation framework — where AI agents assemble complete workflows, multi-environment Dev → Prod pipelines automatically handle credential governance, and full TypeScript GitOps ensures strict auditability across your team.
Choose n8n-decanter if you…
Your workflows live or die by their Code nodes — you want typed TypeScript, shared libraries, preflights (offline or instance-side), and code-level git history, synced draft-first between your IDE, your coding agent, and n8n (even on Cloud).
| Capability | Native n8n | n8n-as-code | n8n-decanter |
|---|---|---|---|
| TypeScript for Code nodes | ❌ JS or Python only | ❌ TS at workflow level, not node logic | ✅ Code nodes as .ts, compiled on push, typed globals |
| Shared types & helpers | ❌ self-host allow-list only, no libraries | ❌ not part of its model | ✅ shared/*.ts + npm bundled into self-contained nodes |
| Code as individual files | ❌ no source files (JSON blob) | 🟡 one .workflow.ts per workflow | ✅ folder per workflow; each Code node its own .js/.ts |
| Code-level git versioning | 🟡 in-app history; Git is Enterprise-only | ✅ GitOps sync of workflow source | ✅ real git — diffs, PRs, blame; auto-commit each sync |
| Preflights (check / simulate / test / preflight) | 🟡 re-run in-editor, online only | 🟡 inspect against a live env | ✅ offline check + simulate, instance-side test; preflight scores the whole ladder into one read-only, CI-gateable verdict |
| Draft-first code sync | ✅ editor Save vs Publish (manual) | 🟡 API sync republishes on push | ✅ pushes land on the draft; publish is deliberate (over MCP) |
| Live editing | ✅ the canvas (baseline) | 🟡 explicit pull/push, no auto-watch | ✅ watch: push on save; the editor tab reflects each push live (n8n-native) |
| Agent-native tooling | 🟡 n8n's own canvas AI, not your agent | ✅ Workbench, skills, MCP, plugins | ✅ scaffolds Claude/Cursor/Codex incl. a pre-wired mcp connect guard; offline loop |
| Model ownership | ❌ locked to n8n's hosted AI | 🟡 plugin uses your sub; Workbench needs a key | ✅ never calls an LLM — your agent/subscription does 100% |
| Agentic workflow creation | 🟡 AI Builder, Cloud / plan-gated | ✅ node schemas + templates + skills | ✅ agent builds structure over n8n's MCP (through the pre-wired mcp connect guard); decanter owns the code |
| Whole-workflow authoring | ❌ | ✅ .workflow.ts decorator classes | 🟡 built live over MCP, mirrored read-only |
| Multi-environment promotion | 🟡 Enterprise environments | ✅ promote remaps creds + refs | 🟡 a sync dir per instance, no promote yet |
✅ first-class · 🟡 partial or indirect · ❌ not supported