n8n MCP server for Claude Code: TypeScript-validated workflows
1 min read
Originally from vm.tiktok.com
View source
My notes
Watch on TikTok Tap to open video
Summary
n8n shipped an official MCP server (May 2026) that lets Claude Code/Codex generate validated n8n workflows via TypeScript instead of guessing raw JSON. Workflows compile and type-check before they touch the instance, filtering out the bulk of errors that previous community MCP shims (Lonkowski et al.) couldn’t catch. Practical sweet spot: simple-to-mid automations that need to be handed off to non-technical clients in a visual UI.
Key Insight
- The breakthrough is TypeScript-as-IR, not just “another MCP”. Previous MCP attempts loaded the model with full n8n docs/skill files and prayed the JSON output matched the schema. The new server has Claude write TypeScript, validates and compiles it server-side, then converts to JSON only after it passes - massive error reduction.
- Flow: Claude parses intent, fetches node types from MCP, writes TS, MCP validates/compiles, converts to JSON, auto-populates the n8n instance. No copy-paste loop.
- n8n’s role has narrowed. For complex stuff, write code directly in Claude Code. n8n earns its keep specifically when there’s a need for a visual canvas a non-technical client can poke at - “spin up your own Claude Code instance” is too high a bar for clients.
- Ergonomics for AI agency work: “newsletter automation pulling RSS, summarising with GPT-5, emailing daily” went from “session-long workflow build” to ~5 minutes including one error round-trip (unsupported
temperatureparam on GPT-5). - Setup gotcha: enable Instance Level MCP in settings; existing workflows need explicit per-workflow enable; new ones don’t. Use Access Token auth, set as env var (don’t paste raw token in chat).
- Connection details: server URL + access token + JSON config, paste into Claude Code, restart Claude Code, run
/mcpto verify connection.