n8n MCP Server

by dopehunter

442 downloads
Not rated
GitHub

About

Complete MCP server for n8n workflow management in Cursor

Details

Author
dopehunter
Downloads
442
Categories
Other

- List all workflows in the n8n instance
- View details of a specific workflow
- Execute workflows with optional data parameters
- Monitor workflow execution history
- Activate and deactivate workflows
- MCP-compatible interface for AI agents

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name n8n MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the package via npm install @dopehunter/n8n-mcp-server, configure a .env file with N8N_BASE_URL and N8N_API_KEY, then start the server with npm start. Alternatively, run it via npx @dopehunter/n8n-mcp-server or using Docker. Connect your LLM client (e.g., Claude Desktop) to the server URL.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "n8n mcp server": {
            "n8n_MCP_server_complete": {
                "command": "npx",
                "args": [
                    "@dopehunter/n8n-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "n8n_MCP_server_complete": {
        "command": "npx",
        "args": [
            "@dopehunter/n8n-mcp-server"
        ]
    }
}

n8n MCP Server

A Model Context Protocol (MCP) server that enables seamless management of n8n workflows directly within LLMs and AI agents through the Smithery Model Context Protocol.

MCP Compatible
npm version

Features

- List available workflows from n8n
- View workflow details
- Execute workflows
- Monitor workflow executions
- Pass parameters to workflows
- MCP-compatible interface for AI agents

Getting Started

Quick Start

1. Install the package

   npm install @dopehunter/n8n-mcp-server

2. Create a .env file

   cp .env.example .env

3. Configure your n8n connection
Edit the .env file and set:
- N8N_BASE_URL: URL to your n8n instance (e.g., http://localhost:5678/api)
- N8N_API_KEY: Your n8n API key (generate this in n8n settings)

4. Start the server

   npm start

5. Test the server

   curl -X POST http://localhost:3000/mcp -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"mcp.tools.list","params":{}}'

Common Issues and Troubleshooting

- Connection Refused Errors: Make sure your n8n instance is running and accessible at the URL specified in N8N_BASE_URL
- API Key Issues: Verify your n8n API key is correct and has appropriate permissions
- Docker Issues: Ensure Docker is running before attempting to build or run the Docker image

For more detailed troubleshooting, see the Troubleshooting Guide.

Components

Tools

n8n_list_workflows
List all workflows in the n8n instance
Input: None

n8n_get_workflow
Get details of a specific workflow
Input: workflowId (string, required): ID of the workflow to retrieve

n8n_execute_workflow
Execute an n8n workflow
Inputs:
workflowId (string, required): ID of the workflow to execute
data (object, optional): Data to pass to the workflow

n8n_get_executions
Get execution history for a workflow
Inputs:
workflowId (string, required): ID of the workflow to get executions for
limit (number, optional): Maximum number of executions to return

n8n_activate_workflow
Activate a workflow
Input: workflowId (string, required): ID of the workflow to activate

n8n_deactivate_workflow
Deactivate a workflow
Input: workflowId (string, required): ID of the workflow to deactivate

Prerequisites

- Node.js (v14+)
- n8n instance with API access
- An LLM or AI agent that supports the Model Context Protocol

Configuration Options

Docker Configuration

{
  "mcpServers": {
    "n8n": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "-e", "N8N_API_KEY=$N8N_API_KEY", "-e", "N8N_BASE_URL=$N8N_BASE_URL", "mcp/n8n-mcp-server"]
    }
  }
}

NPX Configuration

{
  "mcpServers": {
    "n8n": {
      "command": "npx",
      "args": ["-y", "@dopehunter/n8n-mcp-server"]
    }
  }
}

Installation

NPM

npm install @dopehunter/n8n-mcp-server

Direct Usage with npx

npx @dopehunter/n8n-mcp-server

From Source

```bash git clone https://github.com/dopehunter/n8n_MCP_server_complete.git cd n8n_MCP_server_complete npm install cp .env.example .env
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.