Skip to main content
Glama
n8n Automation MCP Server

n8n Automation MCP Server

πŸ€– n8n MCP Server β€” AI-Powered Automation

The Most Advanced Model Context Protocol Server for n8n β€” 54 Tools, Full Control

Version MCP SDK TypeScript Docker License: MIT n8n API

Give Claude, Cursor, or any MCP-compatible AI full control over your n8n instance.
Build workflows, debug executions, manage credentials, audit security β€” all by chatting with AI.

πŸš€ Quick Start β€’ πŸ› οΈ 55 Tools β€’ πŸ’» Client Setup β€’ 🐳 Docker β€’ πŸ’‘ AI Prompts β€’ πŸ” FAQ


🎯 What Is This?

n8n MCP Server is a Model Context Protocol server that exposes the complete n8n REST API as 55 structured tools that AI agents can call directly.

Connect it to Claude Desktop, Cursor AI, Windsurf, VS Code, or any MCP-compatible client β€” and your AI can autonomously:

  • πŸ”¨ Build and deploy production-ready n8n workflows from scratch

  • πŸ” Debug failed executions by inspecting node-by-node input/output data

  • πŸ” Manage credentials securely (secrets are never exposed in responses)

  • πŸ“Š Generate analytics β€” success rates, avg duration, error trends

  • πŸ›‘οΈ Run security audits β€” detect unprotected webhooks, risky nodes, CVE exposure

  • πŸ“ Organize projects and manage team member access

  • πŸ”„ Sync Git repositories via source control pull

  • πŸ‘₯ Administer users β€” invite, remove, change roles


Related MCP server: n8n Workflow Builder

✨ Key Features

Feature

Details

πŸ€–

54 Production-Ready Tools

Full coverage of n8n REST API v1 β€” Workflows, Executions, Credentials, Tags, Variables, Projects, Security Audit, Source Control, Users

🧠

AI-Optimized Descriptions

Every tool has rich, actionable descriptions that help Claude choose the right tool automatically

βš™οΈ

Typed Workflow Settings

Strongly-typed settings schema: timezone, errorWorkflow, callerPolicy, executionTimeout, saveDataSuccessExecution, and more

πŸ“¦

23-Node Template Library

Built-in JSON snippets for Webhooks, Schedule, HTTP Request, Code, Switch, OpenAI, Slack, Gmail, Telegram, Postgres, MySQL, and more

πŸ“Š

Execution Analytics

Success rate, avg/min/max duration, status breakdown across N recent executions

πŸ—‘οΈ

Bulk Delete w/ Dry-Run

Preview exactly what will be deleted before committing β€” safety-first

πŸ›‘οΈ

Security Audit

Severity-ranked report (Critical/High/Medium/Low) via POST /api/v1/audit

πŸ”„

Git Source Control

Pull from connected Git repos, check sync status and branch info

πŸ”

Auto Retry + Backoff

3 automatic retries with exponential backoff on 429/5xx errors

🐳

Docker Multi-Stage

Optimized production image β€” secrets injected at runtime, never baked in

⚑

Fast Build

esbuild compiles the entire server in < 400ms


πŸ“ Architecture

flowchart LR
    subgraph AI["πŸ€– AI Clients (MCP)"]
        A[Claude Desktop]
        B[Cursor AI]
        C[Windsurf / VS Code]
        D[Any MCP Client]
    end

    subgraph MCP["βš™οΈ n8n MCP Server v2.0.0"]
        direction TB
        E[54 Registered Tools]
        F[Zod Schema Validation]
        G[Axios Client\nRetry + Tracing]
    end

    subgraph N8N["πŸ”§ n8n Instance"]
        direction TB
        H[(Workflows Engine)]
        I[(Executions Log)]
        J[(Credentials Store)]
        K[(Variables / Tags)]
        L[(Projects / Users)]
        M[(Git Source Control)]
    end

    A <-->|stdio Transport| E
    B <-->|stdio Transport| E
    C <-->|stdio Transport| E
    D <-->|stdio Transport| E

    E --> F --> G
    G <-->|"n8n REST API v1\nX-N8N-API-KEY"| H
    G <-->|REST| I
    G <-->|REST| J
    G <-->|REST| K
    G <-->|REST| L
    G <-->|REST| M

πŸš€ Quick Start

Prerequisites

  • Node.js v18+

  • n8n instance β€” self-hosted (http://localhost:5678) or n8n Cloud

  • n8n API Key β†’ n8n Settings β†’ API β†’ Create API Key

1. Clone & Install

git clone https://github.com/SohailShabbir867/n8n_mcp.git
cd n8n_mcp
npm install

2. Configure Environment

cp .env.example .env

Edit .env:

# Required
N8N_BASE_URL=http://localhost:5678
N8N_API_KEY=your_n8n_api_key_here

# Optional (default: v1)
N8N_API_VERSION=v1

3. Build

npm run build

βœ… You'll see: dist/index.js 1.3mb Done in ~400ms


πŸ’» Client Setup: Claude & Cursor & Windsurf

Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or
~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "n8n": {
      "command": "node",
      "args": ["C:/path/to/n8n_mcp/dist/index.js"],
      "env": {
        "N8N_BASE_URL": "http://localhost:5678",
        "N8N_API_KEY": "your_n8n_api_key_here"
      }
    }
  }
}

Cursor AI / Windsurf

Go to Settings β†’ MCP Servers β†’ Add Server:

{
  "n8n": {
    "command": "node",
    "args": ["C:/path/to/n8n_mcp/dist/index.js"],
    "env": {
      "N8N_BASE_URL": "http://localhost:5678",
      "N8N_API_KEY": "your_n8n_api_key_here"
    }
  }
}
{
  "mcpServers": {
    "n8n": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "N8N_BASE_URL=http://localhost:5678",
        "-e", "N8N_API_KEY=your_key",
        "n8n-mcp:2.0.0"
      ]
    }
  }
}

🐳 Docker

Build Locally

docker build -t n8n-mcp:2.0.0 .
docker run --rm -i --env-file .env n8n-mcp:2.0.0

Run with inline env vars (PowerShell)

docker run --rm -i `
  -e N8N_BASE_URL=https://your-n8n.com `
  -e N8N_API_KEY=your_key_here `
  n8n-mcp:2.0.0

βœ… The Dockerfile uses multi-stage builds β€” your .env secrets are never baked into the image.


πŸ› οΈ Tool Reference (55 Tools)

πŸ“‹ Workflows β€” 14 Tools

Tool

Description

Key Parameters

list_workflows

List workflows with filters

active, tags, name, projectId, limit

get_workflow

Get full workflow detail

id, excludePinData

create_workflow

Create a new workflow

name, nodes, connections, settings, activate, pinData

update_workflow

Partial update β€” any field

id, name, nodes, settings, active, pinData

delete_workflow

Permanently delete

id

activate_workflow

Enable trigger

id

deactivate_workflow

Pause trigger

id

duplicate_workflow

Clone a workflow

id, name, activate

export_workflow

Export as portable JSON

id, includePinData

import_workflow

Import from JSON string

workflowJson, activate, projectId

search_workflows

Advanced search + date filters (client-side, avoids an n8n API 500 bug)

query, active, tags, createdAfter, createdBefore

get_workflow_stats

Execution analytics per workflow

id, last (N executions)

transfer_workflow

Move to another project

id, destinationProjectId

list_common_nodes

23 copy-paste node templates

category, search

When creating or updating a workflow, the settings object supports:

Setting

Type

Description

executionOrder

"v0" | "v1"

Execution strategy (use v1)

timezone

string

e.g. "America/New_York", "Asia/Karachi"

saveManualExecutions

boolean

Save manual test runs

saveExecutionProgress

boolean

Save progress for long-running workflows

saveDataSuccessExecution

"all" | "none"

Save output on success

saveDataErrorExecution

"all" | "none"

Save output on error

executionTimeout

number

Max runtime in seconds (-1 = unlimited)

errorWorkflow

string

Workflow ID to call on failure

callerPolicy

"any" | "none" | "workflowsFromAList" | "workflowsFromSameOwner"

Who can call this workflow

callerIds

string

Comma-separated workflow IDs (for workflowsFromAList)


⚑ Executions β€” 8 Tools

Tool

Description

Key Parameters

list_executions

List with filters + date range

workflowId, status, startedAfter, startedBefore, limit

get_execution

Node-by-node detail + summary

id, includeData

delete_execution

Delete execution record

id

run_workflow

Manually trigger

id, data, startNode, destinationNode

retry_execution

Retry a failed run

id, loadWorkflowFromDb

stop_execution

Cancel running execution

id

get_execution_summary

Aggregated stats for a workflow

workflowId, limit

bulk_delete_executions

Safe bulk delete with dry-run

workflowId, status, startedBefore, dryRun, maxDelete


πŸ”‘ Credentials β€” 7 Tools

Tool

Description

Key Parameters

list_credentials

List all credential metadata

name, limit

get_credential

Inspect type & dates (masked)

id

create_credential

Create new credential

name, type, data, projectId

update_credential

Update name/type/data

id, name, type, data

delete_credential

Permanently delete

id

list_credential_types

Curated reference list of type IDs (e.g. openAiApi) β€” n8n's API has no endpoint to list ALL installed types

search, limit

get_credential_schema

Get the exact required fields for a credential type before creating one

credentialTypeName


🏷️ Tags β€” 4 Tools

Tool

Description

Key Parameters

list_tags

List all tags

limit, cursor

create_tag

Create a new tag

name

update_tag

Rename a tag

id, name

delete_tag

Delete a tag

id


πŸ”§ Variables β€” 4 Tools

Tool

Description

Key Parameters

list_variables

List instance variables

limit, cursor

create_variable

Create $vars.KEY

key, value

update_variable

Update key or value

id, key, value

delete_variable

Delete a variable

id


πŸ›‘οΈ Security Audit β€” 1 Tool

Tool

Description

Key Parameters

run_security_audit

Full security report with severity ranking

categories, daysAbandonedWorkflow

Categories: credentials Β· database Β· filesystem Β· instance Β· nodes

Detects: Unprotected webhooks Β· Unused credentials Β· Risky community nodes Β· Outdated n8n version Β· Dangerous security configs Β· Abandoned workflows


πŸ“ Projects β€” 7 Tools (Enterprise/Team)

Tool

Description

Key Parameters

list_projects

List all projects

limit, cursor

get_project

Get project details (paginates list_projects client-side β€” n8n's API has no single-project GET endpoint)

id

create_project

Create team/personal project

name, type

update_project

Rename project

id, name

delete_project

Delete (with migration option)

id, migrateToProject

add_project_member

Add user with role

projectId, userId, role

remove_project_member

Remove user from project

projectId, userId

Roles: project:admin Β· project:editor Β· project:viewer


πŸ”„ Source Control β€” 2 Tools (Enterprise Git)

Tool

Description

Key Parameters

pull_from_git

Pull latest from Git repo

force, variables

get_source_control_status

View repo, branch, SSH key status

β€”


πŸ‘₯ System & Users β€” 8 Tools

Tool

Description

Key Parameters

test_connection

Health check + latency + version

β€”

get_instance_info

n8n version, DB type, license, plan

β€”

list_users

List all users with role filter

role, limit

get_user

User details by ID or email

id

invite_user

Send invite + get invite link

email, role

delete_user

Remove user (with workflow transfer)

id, migrateWorkflowsTo

change_user_role

Change global role

id, role

Global Roles: global:owner Β· global:admin Β· global:member


πŸ’‘ Example AI Prompts

Copy these directly into Claude or Cursor:

Test the connection to my n8n server and show me the version and API latency.
Create an active workflow called "Daily Sales Report" with a Schedule Trigger 
at 9am every weekday, a Postgres node to fetch yesterday's sales, 
and a Slack node to post the summary to #sales-team.
Find all failed executions from the last 7 days for workflow ID "abc123", 
inspect the first one to see which node failed, then retry it.
Run a security audit on my n8n instance and give me a prioritized action 
plan to fix all Critical and High severity risks.
List all my workflows and show me stats (success rate, avg duration) 
for the top 5 most-executed ones.
Bulk delete all "error" executions older than 30 days for workflow "xyz" β€” 
first show me a dry run, then confirm deletion.
Invite user@company.com to n8n as a global:member and add them to 
project "Marketing Automations" as a project:editor.
Export workflow "Weekly Newsletter" as JSON, then duplicate it and rename 
the copy "Weekly Newsletter β€” TEST" and keep it deactivated.

πŸ” Troubleshooting & FAQ

git pull origin main
npm install
npm run build
# Then restart your MCP client
docker run --rm -i `
  -e N8N_BASE_URL=https://your-n8n.com `
  -e N8N_API_KEY=your_key `
  n8n-mcp:2.0.0

🀝 Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository

  2. Create your branch: git checkout -b feature/my-feature

  3. Commit: git commit -m 'feat: add my feature'

  4. Push: git push origin feature/my-feature

  5. Open a Pull Request

Please follow Conventional Commits for commit messages.


πŸ“œ License

Distributed under the MIT License β€” see LICENSE for details.


Made with ❀️ by Sohail Shabbir

⭐ Star this repo if it saves you time!

GitHub stars GitHub forks

Available Tools

34 tools
activate_workflowA

Activate a workflow so it runs automatically on triggers.

Inputs: id (required).

create_credentialC

Create a new credential instance.

Inputs: data (required), name (required), type (required).

create_tagA

Create a new tag.

Inputs: name (required).

create_variableA

Create a custom environment variable in n8n.

Inputs: key (required), value (required).

create_workflowA

Create a new n8n workflow with nodes, connections, and settings. Optionally activate immediately.

Inputs: name (required), tags, nodes, activate, +2 more.

deactivate_workflowA

Deactivate a workflow so it stops running on triggers.

Inputs: id (required).

delete_credentialC
Destructive

Delete a credential.

Inputs: id (required).

delete_executionA
Destructive

Delete an execution record.

Inputs: id (required).

delete_tagB
Destructive

Delete a tag permanently.

Inputs: id (required).

delete_variableB
Destructive

Delete an environment variable.

Inputs: id (required).

delete_workflowA
Destructive

Permanently delete a workflow by ID.

Inputs: id (required).

duplicate_workflowC

Duplicate an existing workflow.

Inputs: id (required), name.

export_workflowA
Read-only

Export a workflow as a formatted JSON structure for backup or sharing.

Inputs: id (required).

get_credentialA
Read-only

Get metadata for a credential (secret data is hidden).

Inputs: id (required).

get_executionA
Read-only

Get detailed node-by-node input and output data for a specific execution.

Inputs: id (required), includeData.

get_userA
Read-only

Get details of a specific user by ID.

Inputs: id (required).

get_workflowA
Read-only

Get full details of a workflow including nodes, connections, and settings.

Inputs: id (required).

import_workflowB

Import a workflow directly from a JSON string definition.

Inputs: workflowJson (required), activate.

list_common_nodesA
Read-only

Get documentation and JSON template snippets for common n8n node types (Webhook, Schedule, HTTP Request, Code, Switch, OpenAI, Slack).

Inputs: category.

list_credentialsB
Read-only

List saved credentials.

Inputs: name, limit, cursor.

list_credential_typesA
Read-only

List supported credential types in n8n with optional search query.

Inputs: search.

list_executionsB
Read-only

List workflow executions filtered by workflow ID, status (error/success/waiting/running/canceled), and date.

Inputs: limit, cursor, status, workflowId, +1 more.

list_tagsA
Read-only

List all workflow tags.

Inputs: limit, cursor.

list_usersA
Read-only

List registered users in the n8n instance.

Inputs: limit, cursor.

list_variablesA
Read-only

List n8n environment/instance variables.

Inputs: limit, cursor.

list_workflowsA
Read-only

List all workflows in n8n with filtering by active status, tags, or name. Returns node counts and metadata.

Inputs: name, tags, limit, active, +1 more.

retry_executionB

Retry a failed execution using the workflow definition.

Inputs: id (required), loadWorkflowFromDb.

run_workflowC

Manually trigger a workflow execution with optional payload data.

Inputs: id (required), data.

stop_executionA
Destructive

Stop or cancel a currently running execution.

Inputs: id (required).

test_connectionA
Read-only

Health check: Test connection to n8n instance and verify API key and response latency.

Inputs: no named parameters.

update_credentialB
Idempotent

Update an existing credential.

Inputs: id (required), data, name, type.

update_tagA
Idempotent

Rename an existing tag.

Inputs: id (required), name (required).

update_variableA
Idempotent

Update an existing variable key or value.

Inputs: id (required), key, value.

update_workflowA
Idempotent

Update an existing workflow's name, nodes, connections, settings, tags, or active status.

Inputs: id (required), name, tags, nodes, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 34 tools

    Disambiguation5/5

    Each tool targets a distinct resource-action pair: workflows, executions, credentials, tags, variables, and users each have their own operations. There is no overlap between tools; for example, 'run_workflow' and 'activate_workflow' are clearly different (manual trigger vs. scheduled).

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_workflows, create_credential, update_tag). Plural nouns are used for list operations, singular for others, and this pattern is uniform across all resource types.

    Tool Count2/5

    With 34 tools, the server exceeds the 25+ threshold the rubric defines as 'too many'. While each tool serves a legitimate purpose given the broad scope of n8n management, the sheer number may overwhelm an agent and is heavier than the typical well-scoped server.

    Completeness5/5

    The surface covers the full lifecycle for workflows (create, read, update, delete, activate, deactivate, duplicate, export, import), executions (list, get, run, retry, stop, delete), credentials (CRUD plus types), tags and variables (full CRUD), and user listing, plus a health check. There are no obvious gaps or dead ends.

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides seamless integration between MCP-compatible AI assistants and n8n workflow automation, enabling intelligent management and automation of n8n workflows through natural language.
      5
      -
    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides AI assistants with direct access to the n8n automation platform to manage and execute workflows, variables, and credentials. It features 18 integrated tools that allow for seamless automation management via the Model Context Protocol.
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and double-validated workflow creation.
      43
      1
      MIT