Let your agent read, check and fix n8n workflows with n8n MCP
n8n MCP is an open source server that lets Claude, Cursor and other agents look up n8n nodes, validate workflows and, with an API key, edit them. Setup, what I tested in version 2.102.0, and how to keep it safe.
Ask a model to build an n8n workflow from memory and you usually get node names that do not exist, old node versions and required fields left empty. n8n MCP fixes the guessing part. It is an open source server by Romuald Członkowski that ships a local database of n8n nodes and templates, so the agent can look things up and validate a workflow before it ever touches your instance. Add an n8n API key and it can also read executions and edit workflows for you.
It is one of the most starred MCP servers on GitHub and it ships often. Version 2.102.0 came out on November 9 and moves it to n8n 2.46.7. I ran that version locally before writing this. The notes below come from that run and the project README.
Two modes, pick the one you need
Documentation mode needs nothing but Node.js. The agent gets seven tools to search nodes, read node details and docs, search and fetch templates, and validate single nodes or whole workflows. Nothing talks to your n8n.
Management mode adds tools that work on a real instance once you set N8N_API_URL and N8N_API_KEY. That covers workflows, executions, credentials, data tables, folders and a security audit.
Start with documentation mode. It is safe, it is useful on its own, and you can see how your agent behaves before giving it write access.
Add it to Cursor or Claude
This runs the npm package with npx. The MCP_MODE setting is required for stdio clients such as Claude Desktop. Without it, log lines mix with the protocol and the client shows JSON parse errors.
To turn on management mode, add two more entries to env: N8N_API_URL with your instance address and N8N_API_KEY with a key from Settings, then API in n8n. The project also has a hosted version with a free tier and a Docker image if you would rather not run it through npx.
One tip from the docs: if two clients launch it with npx at the same time, for example Claude Desktop and Claude Code, they can fight over the npm cache. Give each client its own npm_config_cache folder in env.
What I saw when I tested it
I started 2.102.0 in documentation mode with no n8n connection and drove it over stdio. It reported itself as n8n-documentation-mcp 2.102.0 and listed the seven documentation tools. A node search for slack came back with the Slack node, the Slack Tool variant meant for AI agents and the Slack Trigger. Asking for the HTTP Request node pointed out that agents should use its Tool variant and explained why.
Validation is the part I would use most. I gave it a webhook connected to a Slack node with no settings, and it flagged the two empty required fields by name. I gave it a made up node type, and it reported the unknown type, reminded me that node types need their package prefix, and warned that the workflow had no trigger. That is the kind of feedback a model can act on in the next turn.
Keep it safe on live workflows
Try changes on a copy or a staging instance first. The README says this plainly.
Do not edit a workflow in the n8n UI while the agent works on it. n8n MCP writes the whole workflow back, so your edit can be overwritten.
It saves a snapshot before changing nodes or connections by default, and n8n_workflow_versions can diff and roll back. Check that a snapshot exists before you rely on it.
For a read only setup, list write tools in DISABLED_TOOLS, block write operations with DISABLED_TOOL_OPERATIONS, and pair that with a read only n8n API key.
n8n MCP or the MCP server built into n8n
Recent n8n versions ship their own MCP server inside the instance, and the n8n docs even use n8n-mcp as an example connection name for it, which confuses people. They are different things. The built in one runs inside a single instance and only sees workflows you mark as available in MCP. n8n MCP runs separately, can serve several instances, can create and update credentials, and adds validation, autofix and templates. The README suggests using the built in server alone if you have one recent instance, and says the two can also work together through one connection.
Find it on PlugMCP
The n8n MCP listing on PlugMCP has the install command and links to the publisher. If your agent can call MCP tools, the PlugMCP directory MCP server lets it search listings like this one and fetch the config itself.