N8n MCP Server

Enables AI assistants to interact with and manage n8n workflows through natural language.

Local serverstdioTypeScript 1.6k

What is the N8n MCP server?

N8n MCP server exists for a simple reason — assistants are far more useful when they can act on N8n directly instead of describing what you should do. Enables AI assistants to interact with and manage n8n workflows through natural language.

What you get

A Model Context Protocol (MCP) server that allows AI assistants to interact with n8n workflows through natural language.

This project provides a Model Context Protocol (MCP) server that empowers AI assistants to seamlessly interact with n8n, a popular workflow automation tool. It acts as a bridge, enabling AI assistants to programmatically manage and control n8n workflows and executions using natural language commands.

  • Learn and Grow: — Sharpen your skills in areas like TypeScript, Node.js, API integration, and AI tool development
  • Collaborate: — Work alongside other motivated developers and AI users
  • Make an Impact: — Directly shape the future of this project and help build a valuable tool for the AI community
  • Open Source: — Gain experience contributing to an open-source project

Setting it up

Installation goes through your MCP client rather than a global install: point it at @leonardsellem/n8n-mcp-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What the assistant can call

Once N8n is connected, these are the calls the assistant has available:

  • Prerequisites — The Prerequisites tool exposed by this server
  • Building — The Building tool exposed by this server
  • Testing — The Testing tool exposed by this server
  • Linting — The Linting tool exposed by this server

Configuration and credentials

You will need 5 environment variables: N8N_API_URL, N8N_API_KEY, N8N_WEBHOOK_USERNAME, N8N_WEBHOOK_PASSWORD, YOUR_N8N_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js 20 or later - n8n instance with API access enabled

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the n8n mcp server does with a few real requests.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. N8n's toolset — Prerequisites, Building, Testing and 1 more — is a fair guide to whether it matches your workflow. It is maintained by leonardsellem; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
PrerequisitesThe Prerequisites tool exposed by this server.
BuildingThe Building tool exposed by this server.
TestingThe Testing tool exposed by this server.
LintingThe Linting tool exposed by this server.

How to install the N8n MCP server

{
  "mcpServers": {
    // Give your server a unique name
    "n8n-local": {
      // Use 'node' to execute the built JavaScript file
      "command": "node",
      // Provide the *absolute path* to the built index.js file
      "args": [
        "/path/to/your/cloned/n8n-mcp-server/build/index.js"
        // On Windows, use double backslashes:
        // "C:\\path\\to\\your\\cloned\\n8n-mcp-server\\build\\index.js"
      ],
      // Environment variables needed by the server
      "env": {
        "N8N_API_URL": "http://your-n8n-instance:5678/api/v1", // Replace with your n8n URL
        "N8N_API_KEY": "YOUR_N8N_API_KEY", // Replace with your key
        // Add webhook credentials only if you plan to use webhook tools
        // "N8N_WEBHOOK_USERNAME": "your_webhook_user",
        // "N8N_WEBHOOK_PASSWORD": "your_webhook_password"
      },
      // Ensure the server is enabled
      "disabled": false,
      // Default autoApprove settings
      "autoApprove": []
    }
    // ... other servers might be configured here
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js 20 or later - n8n instance with API access enabled
VariableDescriptionRequired
N8N_API_URLEndpoint or connection string the server talks to.Yes
N8N_API_KEYCredential the server authenticates with.Yes
N8N_WEBHOOK_USERNAMEConfiguration value read at startup.Optional
N8N_WEBHOOK_PASSWORDConfiguration value read at startup.Optional
YOUR_N8N_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use N8n to Prerequisites.
  • Use N8n to Building.
  • Use N8n to Testing.

Frequently asked questions

The n8n MCP Server allows AI assistants to interact with and manage your n8n workflows using natural language. It acts as a bridge between your AI assistant and your n8n instance.