n8n MCP Server
Provides tools for managing n8n workflows and executions, including listing, creating, updating, deleting, activating, deactivating workflows, retrieving execution details, triggering webhook-enabled workflows, and managing folders.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n MCP Server Show me all active workflows"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
n8n MCP Server
An MCP server that lets any MCP-compatible client (Claude Code, Claude Desktop, etc.) manage workflows and executions on your own self-hosted n8n instance, via n8n's public REST API. Runs locally over stdio — your n8n URL and API key never leave your machine.
Requirements
Python 3.11+
A running n8n instance with the public API enabled
An n8n API key (n8n → Settings → API)
Related MCP server: n8n MCP Server
Setup
Clone this repository and install dependencies:
git clone https://github.com/mastrangi/mcp-n8n.git cd mcp-n8n uv syncCreate
.env(never committed) from the template:cp .env.example .envFill in:
N8N_URL— your n8n instance's base URL (e.g.https://n8n.example.com)N8N_API_KEY— generated from your n8n instance's Settings → API page
Register with your MCP client. For Claude Code, run from the directory you cloned this repo into:
claude mcp add n8n -- uv run --directory "$(pwd)" n8n-mcpFor other clients, point them at the same command (
uv run --directory /absolute/path/to/mcp-n8n n8n-mcp) using stdio transport.Verify it's connected:
claude mcp list
Tools
Tool | Description |
| List workflows, filtered by active status, name, or tags |
| Get a workflow's full definition by ID |
| Create a workflow from nodes/connections/settings (pass |
| Replace a workflow's definition |
| Delete a workflow by ID |
| Activate a workflow |
| Deactivate a workflow |
| List executions, filtered by workflow or status |
| Get a specific execution's details |
| Trigger a workflow via its Webhook trigger node (only works for workflows that have one and are active — n8n's public API has no generic "run by ID" endpoint), optionally forwarding |
| List folders in a project, filtered by parent folder or name |
| Create a folder in a project, optionally nested under a parent folder |
Why no execute_workflow_by_id?
n8n's public REST API has no generic "run this workflow now" endpoint —
only workflows with a Webhook trigger node can be invoked externally, by
calling that webhook directly. execute_workflow does exactly that: it
looks up the workflow's Webhook node and calls it, returning an error that
explains why when the workflow has no webhook or isn't active.
Development
uv run pytest -vSecurity
N8N_API_KEYlives only in your local.envfile, which is gitignored. No tool logs, prints, or returns the key.execute_workflowcalls the target webhook without the n8n API key attached — n8n's Webhook node captures request headers into execution data, so sending the key there would let it leak back out throughget_execution(include_data=True).
License
MIT — see LICENSE.
Available Tools
12 toolsactivate_workflowActivate WorkflowC
Activate a workflow by ID.
Inputs: workflow_id (required). Returns: object
create_folderCreate FolderA
Create a folder within a project. Pass parent_folder_id to nest it inside
another folder instead of the project root.
project_id is required (see list_folders for how to find it), except that
n8n also accepts the literal string "personal" to mean your own personal
project.
Inputs: name (required), project_id (required), parent_folder_id. Returns: object
create_workflowCreate WorkflowA
Create a new workflow. workflow must include name, nodes, connections, and settings.
To place the workflow in a folder instead of the project root, include
parentFolderId (a folder ID from list_folders) in workflow. To create it
in a project other than your personal one, include projectId.
Inputs: workflow (required). Returns: object
deactivate_workflowDeactivate WorkflowC
Deactivate a workflow by ID.
Inputs: workflow_id (required). Returns: object
delete_workflowDelete WorkflowB
Delete a workflow by ID.
Inputs: workflow_id (required). Returns: object
execute_workflowExecute WorkflowA
Trigger a workflow's execution via its Webhook trigger node, if it has one.
n8n's public API has no generic "run workflow by ID" endpoint, so this only
works for workflows containing a Webhook trigger node, and the workflow must
be active for the webhook to respond. data, if given, is sent as the JSON
request body, landing in the workflow's $json.body.
Inputs: workflow_id (required), data. Returns: object
get_executionGet ExecutionA
Get details of a specific execution by ID. Set include_data=True to include input/output data.
Inputs: execution_id (required), include_data. Returns: object
get_workflowGet WorkflowA
Get the full definition (nodes, connections, settings) of a workflow by ID.
Inputs: workflow_id (required). Returns: object
list_executionsList ExecutionsA
List workflow executions, optionally filtered by workflow ID or status (success, error, running, waiting).
Defaults to returning up to 100 executions. n8n caps this at 250 per request;
pass a higher limit (up to 250) explicitly if you need more and results
seem truncated.
Inputs: limit, status, workflow_id. Returns: result
list_foldersList FoldersA
List folders within a project, optionally filtered by parent folder or name.
project_id is required — n8n's public API has no way to discover it if your
license doesn't support listing projects. If you don't know it, call
list_workflows and read shared[0]["projectId"] off any returned workflow.
n8n defaults to returning only 10 folders per page. Pass a higher take (or
page through with skip) if a project has more folders than that — results
are silently truncated to take with no other signal that more exist.
Inputs: project_id (required), name, skip, take, +1 more. Returns: result
list_workflowsList WorkflowsA
List n8n workflows, optionally filtered by active status, name, or comma-separated tags.
Defaults to returning up to 100 workflows. n8n caps this at 250 per request;
pass a higher limit (up to 250) explicitly if you need more and results
seem truncated.
Inputs: name, tags, limit, active. Returns: result
update_workflowUpdate WorkflowA
Replace an existing workflow's definition. workflow must include name, nodes, connections, and settings.
Inputs: workflow (required), workflow_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct resource-action pair: workflow CRUD/lifecycle, execution retrieval/triggering, and folder listing/creation are clearly separated. Even execute_workflow and activate_workflow are unambiguous because their descriptions clarify webhook triggering versus status changes.
All tool names follow a consistent verb_noun snake_case pattern, such as list_workflows, create_folder, and deactivate_workflow. The naming is predictable and makes the action and resource immediately clear.
With 12 tools, the server is well-scoped for managing n8n workflows, executions, and folders. Each tool covers a meaningful operation without redundancy or excessive granularity.
Workflow lifecycle coverage is strong: create, read, update, delete, activate, deactivate, and list are all present. Minor gaps exist for folders (no update or delete operations) and executions (no cancel or delete), but core workflows are fully covered and workarounds are available.
Related MCP Connectors
n8n MCP — query your own n8n instance (BYO).
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to create, retrieve, update, and manage n8n workflows through the n8n API. Supports full workflow lifecycle management including activation, deactivation, and deletion operations.3923 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables ChatGPT to manage n8n workflows through the official REST API. Supports creating, updating, deleting, and running workflows with execution status monitoring.-
- AlicenseNot gradedqualityDmaintenanceEnables management of multiple N8N workflow automation instances through MCP. Supports listing, creating, updating, deleting, executing workflows and monitoring their executions across different N8N environments.MIT
- FlicenseAqualityDmaintenanceWraps the n8n self-hosted REST API to let Claude and MCP-compatible LLMs manage workflows, executions, credentials, and more via natural language.39-