Basic information
About n8n MCP Server
MCP server that provides tools and resources for interacting with n8n API
n8n MCP Server is a MCP server in the Other category listed in the AddMCP.net directory, published by leonardsellem. It exposes 3 tools, including Cursor, Debugging, Operations. Supported transport: stdio. Runtime: node. License: MIT. The repository has 1,631 GitHub stars. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"n8n-mcp-server": {
"command": "docker",
"args": [
"pull",
"leonardsellem/n8n-mcp-server"
]
}
}
}
{
"mcpServers": {
"n8n-mcp-server": {
"command": "docker",
"args": [
"pull",
"leonardsellem/n8n-mcp-server"
]
}
}
}
{
"servers": {
"n8n-mcp-server": {
"command": "docker",
"args": [
"pull",
"leonardsellem/n8n-mcp-server"
]
}
}
}
n8n MCP Server — by leonardsellem config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"n8n-mcp-server": {
"command": "docker",
"args": [
"pull",
"leonardsellem/n8n-mcp-server"
]
}
}
}
n8n MCP Server — by leonardsellem tools
- Cursor
- Debugging — "Show the last five failed executions of the invoice-sync workflow and what went wrong."
- Operations — "Stop the execution that has been running for over an hour, then deactivate that workflow."
Overview
What is n8n MCP Server?
This n8n MCP server is a community-built Model Context Protocol server (@leonardsellem/n8n-mcp-server) that lets AI assistants list, create, update, activate and run n8n workflows and inspect their executions through the n8n REST API, using natural language.
It is not made by n8n. It connects to your own n8n instance, cloud or self-hosted, with an n8n API key, and runs locally over stdio from npm, from source or as a Docker image. n8n itself now also offers built-in MCP options, covered in the comparison below.
How to use n8n MCP Server?
Prerequisites: Node.js 20 or later, and an n8n instance with API access enabled.
1. Create an n8n API key. In your n8n instance, go to Settings > API > API Keys, create a key with appropriate permissions and copy it.
2. Install the server.
npm install -g @leonardsellem/n8n-mcp-server
Or run it with Docker:
docker run -e N8N_API_URL=http://your-n8n:5678/api/v1 \
-e N8N_API_KEY=your_n8n_api_key \
-e N8N_WEBHOOK_USERNAME=username \
-e N8N_WEBHOOK_PASSWORD=password \
leonardsellem/n8n-mcp-server
3. Set environment variables.
| Variable | Purpose | |---|---| | N8N_API_URL | Full n8n API URL including /api/v1, e.g. http://localhost:5678/api/v1 | | N8N_API_KEY | Your n8n API key | | N8N_WEBHOOK_USERNAME / N8N_WEBHOOK_PASSWORD | Basic Auth credentials, only if you use webhook tools | | DEBUG | Optional debug logging |
Claude Desktop and VS Code
The README's example config runs the built file with node. Use the absolute path to build/index.js after npm run build:
{
"mcpServers": {
"n8n-local": {
"command": "node",
"args": ["/path/to/your/cloned/n8n-mcp-server/build/index.js"],
"env": {
"N8N_API_URL": "http://your-n8n-instance:5678/api/v1",
"N8N_API_KEY": "YOUR_N8N_API_KEY"
},
"disabled": false,
"autoApprove": []
}
}
}
If you installed globally from npm, the README notes you can use n8n-mcp-server as the command instead of the node path.
Claude Code
With the global npm install:
claude mcp add n8n -e N8N_API_URL=http://localhost:5678/api/v1 -e N8N_API_KEY=YOUR_N8N_API_KEY -- n8n-mcp-server
Cursor
Use the same mcpServers block in ~/.cursor/mcp.json, with n8n-mcp-server or the node path as the command.
Key features of n8n MCP Server
- Full workflow management: list, get, create, update, delete, activate and deactivate
- Run workflows through the n8n API or through webhooks
- Inspect, list and stop executions
- MCP resources for workflows and executions, such as
n8n://workflows/list - Webhook calls authenticated automatically with Basic Auth from environment variables
- Works with n8n cloud or self-hosted instances via the public REST API
- Available on npm, from source and on Docker Hub; MIT-licensed
n8n MCP Server tools
The tools fall into two groups:
- Workflow management:
workflow_list,workflow_get,workflow_create,workflow_update,workflow_delete,workflow_activateandworkflow_deactivate. - Execution management:
execution_runruns a workflow via the API,run_webhooktriggers a webhook workflow by name (it calls<n8n-url>/webhook/<workflowName>), andexecution_get,execution_listandexecution_stopinspect or stop runs.
Resources expose the same data for reading: n8n://workflows/list, n8n://workflow/{id}, n8n://executions/{workflowId} and n8n://execution/{id}.
Use cases of n8n MCP Server
- Workflow inventory: "List all my n8n workflows and tell me which ones are inactive."
- Building from chat: "Create a workflow that posts new form submissions to Slack, but leave it inactive."
- Triggering automations: "Run the hello-world webhook workflow with the prompt 'Hello from AI assistant!'"
- Debugging: "Show the last five failed executions of the invoice-sync workflow and what went wrong."
- Operations: "Stop the execution that has been running for over an hour, then deactivate that workflow."
n8n MCP Server vs alternatives
n8n now ships its own MCP features. The MCP Server Trigger node turns a single n8n workflow into an MCP server whose tools are n8n tool nodes, over SSE or Streamable HTTP. Instance-level MCP access lets an owner or admin expose selected workflows to MCP clients from n8n's settings. Choose this community n8n MCP server when you want an agent to manage workflows themselves (create, edit, activate, delete) through the REST API from a local stdio server. Other community n8n MCP projects exist with different tool sets.
Troubleshooting n8n MCP Server
- Authentication or 404 errors: check that
N8N_API_URLincludes/api/v1and that the API key is valid and has the needed permissions. - Client can't start the server: run
npm run buildfirst, and use the absolute path tobuild/index.jswith the correct separators (double backslashes on Windows). - Webhook calls fail:
run_webhookuses Basic Auth. SetN8N_WEBHOOK_USERNAMEandN8N_WEBHOOK_PASSWORD, and enable Basic Authentication on the webhook node. - Running an old version: update with
npm install -g @leonardsellem/n8n-mcp-server@latestordocker pull leonardsellem/n8n-mcp-server:latest, then restart the server. - Need more detail: set
DEBUG=trueto enable debug logging.
Frequently asked questions
1 Is this the official n8n MCP server?
No. It is a community project by leonardsellem, maintained part-time. n8n's own MCP options are the MCP Server Trigger node and instance-level MCP access.
2 Is the n8n MCP server free?
Yes, it is MIT-licensed and free. You need your own n8n instance; n8n cloud or self-hosted pricing is separate.
3 Which API key does it need?
An n8n API key created under Settings > API > API Keys in your instance, set as N8N_API_KEY, plus N8N_API_URL pointing at your instance's /api/v1 endpoint.
4 Does n8n MCP work with Claude Code, Cursor and VS Code?
It is a standard stdio server. The README shows the config for Claude Desktop and VS Code; Claude Code and Cursor can launch the same command with the same environment variables.
5 Does it work with self-hosted n8n?
Yes. Point N8N_API_URL at any n8n instance with API access enabled, including one running locally on http://localhost:5678/api/v1.
6 Can the agent delete or change my workflows?
Yes. workflow_update, workflow_delete and workflow_deactivate act on your live instance. Keep tool approval on, and consider an API key on a non-production instance.
7 Is it a remote MCP server?
No. It runs locally over stdio and talks to your n8n instance over HTTP. For a remote MCP endpoint hosted by n8n itself, use n8n's built-in MCP features.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In