n8n MCP Server

by leonardsellem
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Uses .env files for configuration of the MCP server, allowing setting of n8n API URL, API key, and debug options.

  • Used for cloning the repository during source installation of the MCP server.

  • Provides access to the source code repository for manual installation and development of the MCP server.

n8n MCP Server

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

Overview

This MCP server provides tools and resources for AI assistants to manage n8n workflows and executions. It allows assistants to:

  • List, create, update, and delete workflows
  • Activate and deactivate workflows
  • Execute workflows and monitor their status
  • Access workflow information and execution statistics

Installation

Prerequisites

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

Install from npm

npm install -g 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 .

Configuration

Create a .env file in the directory where you'll run the server, using .env.example as a template:

cp .env.example .env

Configure the following environment variables:

VariableDescriptionExample
N8N_API_URLURL of the n8n APIhttp://localhost:5678/api/v1
N8N_API_KEYAPI key for authenticating with n8nn8n_api_...
DEBUGEnable debug logging (optional)true or false

Generating an n8n API Key

  1. Open your n8n instance in a browser
  2. Go to Settings > API > API Keys
  3. Create a new API key with appropriate permissions
  4. Copy the key to your .env file

Usage

Running the Server

From the installation directory:

n8n-mcp-server

Or if installed globally:

n8n-mcp-server

Integrating with AI Assistants

To use this MCP server with AI assistants, you need to register it with your AI assistant platform. The exact method depends on the platform you're using.

For example, with the MCP installer:

npx @anaisbetts/mcp-installer

Then register the server:

install_local_mcp_server path/to/n8n-mcp-server

Available Tools

The server provides the following tools:

Workflow Management

  • workflow_list: List all workflows
  • workflow_get: Get details of a specific workflow
  • workflow_create: Create a new workflow
  • workflow_update: Update an existing workflow
  • workflow_delete: Delete a workflow
  • workflow_activate: Activate a workflow
  • workflow_deactivate: Deactivate a workflow

Execution Management

  • execution_run: Execute a workflow
  • execution_get: Get details of a specific execution
  • execution_list: List executions for a workflow
  • execution_stop: Stop a running execution

Resources

The server provides the following resources:

  • n8n://workflows/list: List of all workflows
  • n8n://workflow/{id}: Details of a specific workflow
  • n8n://executions/{workflowId}: List of executions for a workflow
  • n8n://execution/{id}: Details of a specific execution

Development

Building

npm run build

Running in Development Mode

npm run dev

Testing

npm test

Linting

npm run lint

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that enables AI assistants to interact with n8n workflows through natural language, supporting actions like listing, creating, updating, executing and monitoring workflows.

  1. Overview
    1. Installation
      1. Prerequisites
      2. Install from npm
      3. Install from source
    2. Configuration
      1. Generating an n8n API Key
    3. Usage
      1. Running the Server
      2. Integrating with AI Assistants
    4. Available Tools
      1. Workflow Management
      2. Execution Management
    5. Resources
      1. Development
        1. Building
        2. Running in Development Mode
        3. Testing
        4. Linting
      2. License