home / mcp / n8n mcp server

n8n MCP Server

Provides a Model Context Protocol server to manage and execute n8n workflows via natural language.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "leonardsellem-n8n-mcp-server": {
      "command": "node",
      "args": [
        "/path/to/your/cloned/n8n-mcp-server/build/index.js"
      ],
      "env": {
        "DEBUG": "true",
        "N8N_API_KEY": "YOUR_N8N_API_KEY",
        "N8N_API_URL": "http://your-n8n-instance:5678/api/v1",
        "N8N_WEBHOOK_PASSWORD": "YOUR_WEBHOOK_PASSWORD",
        "N8N_WEBHOOK_USERNAME": "YOUR_WEBHOOK_USERNAME"
      }
    }
  }
}

You have a Model Context Protocol (MCP) server that lets AI assistants interact with n8n workflows through natural language. It acts as a bridge so you can manage n8n workflows and executions programmatically using conversational commands.

How to use

Install and run the MCP server, then connect your AI assistant client to it using a standard MCP configuration. Once connected, you can list workflows, start executions, trigger webhooks, and monitor results through natural language prompts. Use the server to automate common n8n tasks such as creating or updating workflows, running executions on demand, and querying workflow or execution details. For webhook-based workflows, ensure authentication is configured so your assistant can trigger the correct webhook securely. Keep a consistent naming scheme for your MCP server configurations to avoid confusion when you manage multiple connections.

How to install

Prerequisites you need before installing the MCP server:

- Node.js 20 or later

- An n8n instance with API access enabled

Choose one of the installation methods below and follow the steps precisely.

Install from npm

npm install -g @leonardsellem/n8n-mcp-server

Install from source

# Clone the repository
git clone https://github.com/leonardsellem/n8n-mcp-server.git
cd n8n-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Optional: Install globally
npm install -g .

Docker Installation

# Pull the image
docker pull leonardsellem/n8n-mcp-server

# Run the container with your n8n API configuration
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

Available tools

run_webhook

Trigger a workflow via a webhook by providing the workflow name and any input data.

workflow_list

List all workflows available in the connected n8n instance.

workflow_get

Retrieve detailed information for a specific workflow by its identifier.

workflow_create

Create a new workflow in your n8n instance.

workflow_update

Update an existing workflow with new configuration or content.

workflow_delete

Delete a workflow from your n8n instance.

workflow_activate

Activate a workflow so it can be executed.

workflow_deactivate

Deactivate a workflow to prevent execution.

execution_run

Execute a workflow and return its run details.

execution_get

Get details for a specific execution instance.

execution_list

List all executions for a given workflow.

execution_stop

Stop a currently running execution.

n8n MCP Server - leonardsellem/n8n-mcp-server