# mcp-n8n [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/leonardosepulvedat/mcp-n8n  
**GitHub Stars:** 22  
**npm Downloads (last month):** 1640  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-n8n

## Description
Operate and build n8n: 61 tools, 560-node catalog, validation, autofix, snapshots and backups.

## Tools
Capabilities this server exposes over MCP:

- **n8n_create_workflow** — Create a new workflow in n8n. Prefer n8n_search_nodes + n8n_validate_workflow first so the JSON is valid. You can specify nodes, connections, and settings.
- **n8n_list_workflows** — List all workflows with full details. Can filter by active status, tags, name, or project. WARNING: Returns complete workflow data including nodes and connections - use n8n_list_workflows_summary for better token efficiency.
- **n8n_list_workflows_summary** — List workflows with minimal data (id, name, active, tags, updatedAt only). Recommended for browsing and listing - uses 90% fewer tokens than n8n_list_workflows. Use n8n_get_workflow to fetch full details of a specific workflow.
- **n8n_get_workflow** — Get detailed information about a specific workflow by ID.
- **n8n_update_workflow** — Update an existing workflow. Supports partial updates: omitted fields keep their current values (the current workflow is fetched and merged automatically).
- **n8n_delete_workflow** — Delete a workflow permanently. A local snapshot is saved first so it can be restored with n8n_rollback_workflow (into a new workflow).
- **n8n_activate_workflow** — Activate a workflow to start receiving triggers.
- **n8n_deactivate_workflow** — Deactivate a workflow to stop receiving triggers.
- **n8n_transfer_workflow** — Transfer a workflow to another project.
- **n8n_get_workflow_tags** — Get all tags associated with a workflow.
- **n8n_update_workflow_tags** — Update tags for a workflow.
- **n8n_list_executions** — List workflow executions. Can filter by status, workflow ID, or project. TIP: Set includeData=false and use fields parameter to reduce token usage.
- **n8n_get_execution** — Get detailed information about a specific execution.
- **n8n_delete_execution** — Delete an execution record.
- **n8n_retry_execution** — Retry a failed execution.
- **n8n_create_credential** — Create a new credential for a specific node type.
- **n8n_delete_credential** — Delete a credential (owner only).
- **n8n_get_credential_schema** — Get the schema for a credential type to understand required fields.
- **n8n_transfer_credential** — Transfer a credential to another project.
- **n8n_create_tag** — Create a new tag for organizing workflows.
- **n8n_list_tags** — List all tags available in n8n.
- **n8n_get_tag** — Get information about a specific tag.
- **n8n_update_tag** — Update a tag name.
- **n8n_delete_tag** — Delete a tag.
- **n8n_create_variable** — Create a new environment variable in n8n.
- **n8n_list_variables** — List all environment variables.
- **n8n_update_variable** — Update an environment variable.
- **n8n_delete_variable** — Delete an environment variable.
- **n8n_list_users** — List all users (owner only).
- **n8n_create_users** — Create multiple users at once.
- **n8n_get_user** — Get user by ID or email (owner only).
- **n8n_delete_user** — Delete a user.
- **n8n_change_user_role** — Change a user's global role.
- **n8n_create_project** — Create a new project in n8n.
- **n8n_list_projects** — List all projects.
- **n8n_update_project** — Update a project.
- **n8n_delete_project** — Delete a project.
- **n8n_add_user_to_project** — Add a user to a project with a specific role.
- **n8n_remove_user_from_project** — Remove a user from a project.
- **n8n_change_user_project_role** — Change a user's role within a project.
- **n8n_generate_audit** — Generate a security audit report.
- **n8n_pull_source_control** — Pull changes from remote source control repository.
- **n8n_export_all_workflows** — Back up every workflow of the instance as individual JSON files in a local directory. Complements the per-change snapshots with a full-instance safety net.
- **n8n_import_workflows** — Import workflow JSON files from a local directory (e.g. a backup created with n8n_export_all_workflows) as new workflows in the instance.
- **n8n_list_workflow_templates** — List available workflow templates with their metadata. Use this to discover what pre-built workflows are available.
- **n8n_get_workflow_template** — Get a specific workflow template by ID or intelligently find the best matching template based on user requirements.
- **n8n_create_workflow_from_template** — Create a new workflow in n8n based on a template. Automatically selects the best template if not specified.
- **n8n_search_nodes** — Search the full catalog of 560 n8n nodes (extracted from the real n8n packages). Use this BEFORE creating a workflow so node types are correct. Returns summaries; use n8n_get_node for the full parameter schema.
- **n8n_get_node** — Get the real parameter schema of an n8n node type: parameters with types, options and display conditions, required params, credentials, latest typeVersion, plus curated notes and an example for common nodes.
- **n8n_autofix_workflow** — Apply safe mechanical fixes to a workflow: missing typeVersion, missing positions, duplicate node names, connections to nonexistent nodes, and missing "=" prefixes on expressions. By default returns a preview; set apply=true to save (a snapshot is taken first).
- **n8n_validate_workflow** — Validate a workflow JSON before creating or updating it. Checks node names, types, required parameters, and connections. Always call this before n8n_create_workflow or n8n_activate_workflow.
- **n8n_update_workflow_partial** — Apply surgical edits to an existing workflow without rewriting it. Operations: setName, addNode, removeNode, updateNode, addConnection, removeConnection. Fetches the current workflow, applies the ops, and saves.
- **n8n_debug_last_error** — Get the most recent failed execution (optionally for one workflow) with the failing node and error message. Use this to repair a broken workflow.
- **n8n_get_node_execution_data** — Inspect the data that flowed through a specific node in an execution, without downloading the whole execution. Without nodeName, returns an overview of all executed nodes (status, item counts, errors). With nodeName, returns the actual output items (limited sample) and error details for that node.
- **n8n_workflow_health** — Operational health report computed from recent executions: success rate, failure count, average duration, and last failure per workflow, sorted worst-first. Use it to find which workflows need attention.
- **n8n_search_public_templates** — Search official n8n.io workflow templates (thousands, always current). Returns summaries only. Then use n8n_import_public_template to copy one into the instance.
- **n8n_import_public_template** — Download an official n8n.io template by ID and create it as a workflow in this instance. Credentials still have to be attached in n8n.
- **n8n_trigger_webhook** — Call a Webhook-trigger workflow on the n8n instance to test it end-to-end and see the real response. Use test=true only while the workflow is in "Listen for test event" mode in the editor; otherwise the workflow must be active.
- **n8n_list_workflow_snapshots** — List local snapshots of a workflow. A snapshot is saved automatically before every update, partial update, or delete done through this server.
- **n8n_rollback_workflow** — Restore a workflow to a previous snapshot (latest by default). The current state is snapshotted first, so a rollback can itself be undone. If the workflow was deleted, set recreate=true to restore it as a new workflow.
- **n8n_diff_workflow_snapshot** — Compare a workflow snapshot against the current state (or another snapshot): nodes added/removed/modified, changed parameters, and connection changes. Useful before deciding whether to roll back.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-n8n": {
    "command": "npx",
    "args": ["-y","mcp-n8n"],
    "env": {
      "N8N_BASE_URL": "",
      "N8N_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `N8N_BASE_URL`, `N8N_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-n8n does

The mcp-n8n MCP server gives an AI client access to n8n operations through the n8n API. It covers workflow creation, retrieval, updates, deletion, activation, project transfers, and tags. It also exposes execution monitoring, retries, execution-history cleanup, credential creation and schema discovery, variables, projects, users, permissions, and audit logs.

For workflow construction, mcp-n8n includes a catalog of 560 nodes gathered from n8n packages. Node entries include parameter types, allowed values, display conditions, credential information, and current type versions. Agents can search the catalog, inspect node definitions, validate workflows, repair common structural problems, and make partial edits without replacing the entire workflow.

## How it works

The server communicates with an n8n instance using the base URL and an API key. It normally runs as a local stdio process, but it can also serve MCP over streamable HTTP. HTTP mode includes a health endpoint and can require a bearer token for incoming requests.

Validation checks node types, required parameters, conditional requirements, option values, type versions, connections, and selected expression errors before a workflow is saved or activated. The autofix operation can add missing positions or type versions, rename duplicates, repair dangling connections, and correct expression prefixes. Agents can preview changes before applying them.

The server creates a local snapshot before updates, partial edits, autofixes, and deletions. Snapshots support rollback and comparison with the current workflow. A deleted workflow can be recreated from a snapshot when requested. Webhook-trigger workflows can also be called for end-to-end testing, returning the actual HTTP response.

## Setup and configuration

Install the package globally with npm or run it through npx. Configure `N8N_BASE_URL` with the n8n instance address and `N8N_API_KEY` with an API key generated in n8n settings. `N8N_TOOLSETS` is optional and defaults to `all`; `core,builder` limits the available areas, while `admin` selects administration tools.

Set `N8N_MCP_HTTP_PORT` to enable streamable HTTP instead of the default local stdio mode. Set `N8N_MCP_HTTP_TOKEN` to require `Authorization: Bearer` authentication for HTTP requests. Snapshot storage defaults to `~/.mcp-n8n/snapshots` and can be changed with `N8N_SNAPSHOT_DIR`. Docker usage can mount `/data` to persist snapshots between runs.

Cursor uses an npx-based configuration in the supplied example. No hosted account is required for the MCP server itself, but it does need access to a configured n8n instance.

## Tools and capabilities

The mcp-n8n MCP server includes tools for:

- Listing, creating, updating, activating, deleting, tagging, and transferring workflows.
- Searching and inspecting nodes, importing public n8n.io templates, and using bundled templates.
- Validating, autofixing, partially editing, and testing workflows.
- Inspecting node-level execution data and diagnosing the latest error.
- Calculating workflow health from recent executions, including success rates, failures, duration, and last failure.
- Exporting all workflows to JSON files and importing them later.
- Managing credentials, variables, projects, users, permissions, and audit records.

The package also provides `build-workflow` and `fix-workflow` MCP prompts that guide an agent through construction, validation, testing, and repair. Listing supports a summary endpoint, field filtering, smaller default result sets, and warnings for operations likely to consume many tokens.

## Limitations and notes

The server operates against the n8n instance available through the configured API credentials; its access therefore depends on that instance and the permissions of the key. HTTP authentication is optional in configuration but is recommended when exposing the server remotely. The node catalog is regenerated weekly by CI, so its schemas represent the generated catalog rather than an independently maintained list. Snapshot files and exported workflow JSON require suitable local or mounted storage.

_Full upstream README: https://allmcps.com/mcp/mcp-n8n/readme_

