If you are searching for how to connect Claude Code to n8n, or how to wire Claude Code into an automation pipeline — this is the practical answer. No theory. Just how it works.
Claude Code + n8n: Webhooks Are the Bridge
n8n is an open-source workflow automation platform. Claude Code is a terminal-based AI agent. They do not natively talk to each other. Webhooks connect them.
The setup:
1. In n8n, create a workflow that starts with a Webhook trigger node. This gives you a URL. 2. In Claude Code, make an HTTP request to that webhook URL — either through a Bash curl command or through a custom skill that hits the endpoint. 3. n8n receives the payload and executes whatever workflow you have built: send an email, update a database, trigger a Slack message, anything n8n supports.
What this looks like in production: We have a skill in Claude Code that researches a lead, drafts a personalized email, and fires it to an n8n webhook. The n8n workflow takes that payload, routes it through an SMTP node with our email credentials, and sends the email. Claude Code never touches email credentials directly. n8n handles delivery. Clean separation.
Claude Code + MCP: The Integration Layer
MCP (Model Context Protocol) is how Claude Code connects to everything that is not n8n.
Your .mcp.json file in the project root defines which servers Claude Code can access. Each server exposes tools that Claude Code can call with natural language. Add a server, restart Claude Code, and the tools are available immediately.
Connections we run daily:
Gmail — Read inbox, draft replies, search threads. Google Calendar — Check availability, create events, find mutual free time. Canva — Generate designs, export images, manage brand assets. Playwright — Browse any website, read DOM content, take screenshots. Post-Bridge — Publish content as drafts across X, Instagram, YouTube, TikTok. n8n MCP — Full read/write access to n8n workflows from Claude Code.
The community MCP ecosystem has servers for Notion, Slack, GitHub, PostgreSQL, MongoDB, Stripe, and more. If an app has an API, someone has probably built an MCP server for it.
What a Real Pipeline Looks Like
Here is an actual workflow we run:
1. Claude Code researches a prospect using web search and Playwright (visits their website, reads their offering). 2. Claude Code drafts a personalized outreach email based on what it found. 3. Claude Code hits an n8n webhook with the email payload (recipient, subject, body). 4. n8n sends the email through SMTP credentials stored securely in n8n, not in Claude Code. 5. Claude Code logs the outreach to our CRM.
One command. Five steps. Three systems. No manual handoffs.
The Key Principle
Claude Code is the brain. MCP servers are the hands. n8n is the nervous system for anything that needs to run on a schedule, handle credentials securely, or execute outside of a Claude Code session.
You do not pick one. You wire them together. Claude Code decides what to do. MCP lets it reach into apps. n8n lets it trigger background processes and handle the parts that need to run reliably without Claude Code being active.
That is the stack. It works.
Ready to see what AI can do for your business?
We build custom AI systems like the ones we write about. Fifteen minutes is all it takes to map your workflows and show you what is possible.
Book an AI Intro Consultation