Home / MCP / n8n MCP Server

n8n MCP Server

Bridges AI assistants with n8n by exposing MCP endpoints to manage workflows, executions, and webhooks.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

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

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 an n8n workflow via a webhook endpoint, using the configured webhook credentials.

workflow_list

List all workflows available in the connected n8n instance.

workflow_get

Retrieve details for a specific workflow.

workflow_create

Create a new workflow in n8n.

workflow_update

Update an existing workflow in n8n.

workflow_delete

Delete a workflow in n8n.

workflow_activate

Activate a workflow so it can run.

workflow_deactivate

Deactivate a workflow to prevent runs.

execution_run

Execute a workflow via the API.

execution_get

Get details of a specific execution.

execution_list

List executions for a workflow.

execution_stop

Stop a running execution.