Get the FREE Ultimate OpenClaw Setup Guide →

n8n

A Model-Controller-Provider (MCP) server implementation for n8n workflow automation

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio s17s17-n8n-mcp-server node server.js \
  --env N8N_URL="URL of your n8n instance API (e.g., https://n8n.example.com/api)" \
  --env N8N_API_KEY="Your n8n API key" \
  --env N8N_API_HEADER="Header name for API key (default: X-N8N-API-KEY)"

How to use

This MCP server exposes a JSON-RPC 2.0 API to manage and execute n8n workflows. It acts as a bridge between clients and an n8n instance, allowing you to initialize a connection, discover available workflow tools, and call specific tools to run workflows. The server authenticates requests using the configured n8n API key and forwards requests to your n8n instance, returning results or status information. Use the listTools method to see which workflow tools are available, and use callTool to run a particular workflow with the provided parameters. The initialize and shutdown methods help establish and terminate the connection lifecycle with the n8n backend, ensuring clean startup and teardown in your orchestration pipeline.

How to install

Prerequisites:

  • Node.js >= 14.x
  • npm or pnpm installed
  • An accessible n8n instance and API key

Installation steps:

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

  2. Install dependencies npm install

  3. Configure environment variables cp .env.example .env

    Edit .env with your configuration (N8N_URL, N8N_API_KEY, N8N_API_HEADER, etc.)

  4. Run the server npm start

Optional Docker usage: docker build -t n8n-mcp-server . docker run -p 3000:3000 --env-file .env n8n-mcp-server

Additional notes

Tips:

  • Ensure your n8n instance is reachable from the MCP server host and that the API key has the necessary permissions.
  • If you modify environment variables, restart the server for changes to take effect.
  • Use the provided npm scripts (start, start:dev, start:simple, debug) to fit your development or production workflow.
  • When running in Docker, consider mounting a volume for the .env file to manage configuration securely.
  • If you encounter JSON-RPC errors, verify the API endpoint and headers configured in N8N_URL, N8N_API_KEY, and N8N_API_HEADER.

Related MCP Servers

Sponsor this space

Reach thousands of developers