How to Use Claude with n8n: Build Workflows Faster with MCP and Claude Code
How to use Claude with n8n in 2026: connect Claude to n8n over MCP, build and debug workflows with Claude Code, and use Claude as the model inside n8n AI agents.

The biggest change in how people build with n8n this year is that they are no longer building alone. Builders now describe a workflow to Claude, let it draft the nodes, and spend their own time on the parts that need judgement: the logic, the edge cases and the client. Here are the three ways Claude and n8n fit together, and the tutorials that show each one.
Three ways to use Claude with n8n
| Use | What it means | Best for |
|---|---|---|
| Claude inside n8n | Claude is the chat model on an n8n AI Agent node | Agents that reason, write or analyse |
| Claude talks to n8n (MCP) | Claude connects to your n8n instance or workflows as tools | Building, triggering and inspecting workflows from chat |
| Claude Code builds n8n | An AI coding agent writes and edits workflow JSON | Drafting complex workflows and debugging fast |
1. Claude as the model in your n8n agents
The simplest integration. Add an AI Agent node, attach the Anthropic Chat Model sub-node, and add your Anthropic API key as a credential. Claude models are a popular choice for agents that need to follow long instructions, use tools carefully and write well. You can switch models later without rebuilding the workflow, which makes it easy to test which model fits each job. For the full agent setup, see our n8n AI agent tutorial.
2. Connect Claude to n8n with MCP
The Model Context Protocol (MCP) is an open standard that lets AI assistants use external tools. n8n supports it in both directions:
- n8n as an MCP server: the MCP Server Trigger node exposes your workflows as tools. Connect Claude to that endpoint and you can ask Claude to run them ("add this lead to the CRM", "send today's report").
- n8n as an MCP client: the MCP Client Tool lets an n8n AI agent use tools from any MCP server, so your agent can reach services that have no n8n node.
- Instance-level access: n8n has also added ways for AI assistants to work with workflows on your instance directly. Check the n8n docs for what your version supports.
Security first
Anything you expose over MCP can be triggered by the connected AI. Protect MCP endpoints with authentication, expose only the workflows you intend to, and never give an assistant tools that delete data or send money without a human approval step.
Recommended tutorials from the library
3. Build and debug n8n workflows with Claude Code
n8n workflows are JSON under the hood, and AI coding agents are very good at JSON. Builders describe what they want, let Claude Code draft the workflow (often using an n8n MCP server that knows every node's parameters), import it, and then test and refine in the canvas. The same approach works for debugging: paste the failed execution's error and the workflow, and ask what is wrong.
The honest caveat from experienced builders: AI-built workflows look right more often than they are right. You still need to understand data flow, expressions and error handling to review what Claude produced. Claude makes a good n8n builder much faster; it does not make a beginner into a good builder.
Recommended tutorials from the library
Will Claude replace n8n?
You will see videos arguing both ways. For one-off scripts and complex custom logic, a coding agent can be the better tool. For workflows a business depends on every day (with credentials, retries, execution history and a visual canvas a client can understand) n8n still wins, and Claude increasingly works as the person who builds it. We compare the options in n8n vs Zapier vs Make.
Recommended tutorials from the library
Learning n8n with Claude as your coach
Claude is also a good teacher, if it knows where you are. That is the idea behind the AI coach in n8n Academy: you connect your own Claude account, tell it your goal and timeframe, and it builds a course from our curated n8n tutorials, module by module. It reads your progress and your learning journal, so every session picks up where the last one ended.
Learn Claude Code step by step
All courses are included in one $12.99 payment. See every course
Frequently asked questions
Can Claude build n8n workflows?
Yes. Claude, especially through Claude Code or an n8n MCP server, can draft workflow JSON that you import into n8n, and can debug failed executions. You still need n8n fundamentals to review and test the result, because AI-built workflows can look right without working correctly.
Does n8n support MCP?
Yes. n8n can act as an MCP server through the MCP Server Trigger node, exposing workflows as tools to AI assistants like Claude, and as an MCP client through the MCP Client Tool, letting n8n agents use tools from other MCP servers.
How do I use Claude in an n8n AI agent?
Add an AI Agent node, attach the Anthropic Chat Model as its chat model, and create an Anthropic API credential with your key. Then add memory and tools as usual. You can switch between Claude models from the sub-node without changing the rest of the workflow.








