On this page
If you have ever asked Claude to build an n8n workflow and watched it invent a node that does not exist, this is the fix. The Model Context Protocol (MCP) lets Claude talk to n8n directly: it can search the real node catalog, read a node’s actual parameters, validate a workflow before you import it, and, if you allow it, create the workflow in your instance through the API. It takes about ten minutes to set up.
This guide covers the fastest reliable path, the community n8n-MCP server, and how to wire it into both Claude Code and Claude Desktop.
Why connect Claude to n8n at all
Out of the box, an LLM builds n8n workflows from memory. That memory is frozen at its training cutoff and blurry on detail, which is exactly why you get plausible-looking JSON referencing parameters that were renamed two releases ago, or nodes that were never real. You then spend more time correcting the output than you saved.
An MCP server closes that gap. It gives Claude three things it cannot get on its own:
- Ground truth about nodes. Claude queries the server for the current list of nodes and each one’s real parameter schema, so what it proposes maps onto the n8n you actually run.
- Validation before import. It can check a workflow’s structure against the schema and catch missing required fields before you ever paste anything into the canvas.
- Optional write access. With an API key, Claude can create, read, and update workflows in a live instance, turning “here is some JSON to paste” into “I built it, go look.”
The result is less back-and-forth and workflows that import cleanly the first time.
What you need first
- Node.js 18 or newer on your machine (so
npxis available). - Claude Code or Claude Desktop installed.
- Optional, for write access: a running n8n instance and an API key from Settings, n8n API inside n8n. Skip this for now if you just want documentation mode.
Step 1: Decide on documentation mode vs connected mode
Start in documentation mode. It needs no credentials, cannot touch any instance, and lets Claude search nodes and explain builds. It is the safe way to confirm everything works.
Move to connected mode only when you want Claude to actually read and write workflows. That requires two environment values: your instance URL (N8N_API_URL, for example https://n8n.yourdomain.com) and an API key (N8N_API_KEY). Point this at a staging or personal instance first, never your production instance on the first run.
Step 2: Add the server to Claude Code
Claude Code registers MCP servers with a single command. For documentation mode:
claude mcp add n8n -- npx -y n8n-mcp
For connected mode, pass the two environment values through:
claude mcp add n8n \
-e N8N_API_URL=https://n8n.yourdomain.com \
-e N8N_API_KEY=your-scoped-api-key \
-- npx -y n8n-mcp
Then confirm it registered:
claude mcp list
You should see n8n in the list. Restart the session and Claude now has the n8n tools available.
Step 3: Or add it to Claude Desktop
Claude Desktop reads a JSON config file (claude_desktop_config.json, reachable from Settings, Developer, Edit Config). Add an mcpServers entry:
{
"mcpServers": {
"n8n": {
"command": "npx",
"args": ["-y", "n8n-mcp"],
"env": {
"N8N_API_URL": "https://n8n.yourdomain.com",
"N8N_API_KEY": "your-scoped-api-key"
}
}
}
}
Drop the env block entirely to run in documentation mode. Save, fully quit and reopen Claude Desktop, and the n8n tools appear (look for the tools indicator in the message box).
Package names and flags move faster than any blog post, so if a command errors, check the n8n-MCP project’s README for the current invocation before assuming your setup is wrong.
Step 4: Prove it works
Ask Claude something only the server can answer accurately:
“Using the n8n tools, list the parameters for the HTTP Request node and show me a minimal workflow that calls an API on a schedule and posts the result to Slack.”
If MCP is wired up, Claude queries the server, comes back with the real parameters, and hands you a workflow that validates. In connected mode you can go a step further:
“Create that workflow in my n8n instance and give me the link.”
Now it is not describing a workflow, it is building one.
Keep it safe
A write-enabled API key means Claude can change your instance, so a little discipline goes a long way:
- Start in documentation mode, then a staging instance, then production, in that order, only as you build trust.
- Scope the API key as tightly as your n8n version allows, and rotate it if it ever lands somewhere it should not.
- Review before you run. Ask Claude to show you the workflow first; approve, then let it create. Human-in-the-loop is the whole point of doing this well, a theme worth reading more about in the self-building workflows guide.
Where this fits
This is the on-ramp. Once Claude can see your n8n, the interesting work is the daily loop of describing what you want and getting a working build back, which is exactly what the n8n MCP and Claude Code guide goes deep on. And if you want to expose your own workflows as tools for Claude to call, that is the other direction of MCP, covered in MCP servers in n8n.
Key takeaways
MCP turns Claude from a plausible-guesser into an accurate n8n collaborator. Start in documentation mode with a one-line install, confirm it can read your nodes, then connect an API key on a non-production instance when you want it to actually build. Ten minutes of setup buys you workflows that import clean the first time.
Want this wired into your stack properly? Let’s talk about your automation roadmap.
Frequently asked questions
What is an n8n MCP server?
It is a small program that exposes n8n's node catalog and workflow API to an AI client like Claude through the Model Context Protocol. Instead of Claude guessing node names and parameters from memory, it queries the server for the real, current schema, so the workflows it proposes actually validate.
Do I need an n8n API key to use it?
No, not to start. In documentation-only mode Claude can search nodes and explain how to build a workflow without any credentials. You add an n8n API URL and key only when you want Claude to create, read, or update workflows in a running instance.
Is this safe to run against my production n8n?
Treat it like any tool with write access. Start in documentation mode, then point it at a staging or personal instance with a scoped API key before you ever give it your production credentials. Claude proposes changes, but a write-enabled key means it can make them, so review before you connect anything you cannot afford to break.
Does this work with Claude Desktop or only Claude Code?
Both. Claude Code uses the `claude mcp add` command; Claude Desktop uses a small mcpServers block in its config file. The server is the same, only the way you register it differs.
Related reading
Want this built for you?
We design and ship production n8n automation for agencies, and train your team to own it.
Book a build →