Get the FREE Ultimate OpenClaw Setup Guide →

n8n

A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio czlonkowski-n8n-mcp npx n8n-mcp \
  --env MCP_MODE="stdio" \
  --env LOG_LEVEL="error" \
  --env DISABLE_CONSOLE_OUTPUT="true"

How to use

n8n-mcp exposes a structured MCP interface that lets AI models access and query n8n node documentation, node properties, and node operations. With either the npx-based run or the Docker-based image, you start a lightweight MCP server that serves JSON-RPC endpoints and a rich database of n8n nodes, templates, and tooling. Use the provided configuration to connect your MCP client (e.g., Claude Desktop or another agent) and enable access to documentation, validation tools, and, if you supply API keys for n8n, workflow management functions via the integrated tooling.

Once running, you can query the MCP server for node details, operations, and example workflows. The environment variable MCP_MODE=stdio ensures that only JSON-RPC messages are exchanged with stdout, which prevents debug logs from interfering with the protocol. The Docker deployment keeps the runtime isolated and includes a pre-built database, while the npx option fetches the latest release on demand for quick experiments.

How to install

Prerequisites:

  • Node.js (for npx-based setup) or Docker (for containerized usage)
  • Basic command-line knowledge

Option 1: Quick local setup with npx

  1. Install Node.js from https://nodejs.org/
  2. Run the MCP server directly with npx:
    npx n8n-mcp
    
  3. Configure your MCP client to connect to the server via stdio (MCP_MODE=stdio) as shown in the configuration examples.

Option 2: Docker deployment (isolated, reproducible)

  1. Install Docker on your platform: https://www.docker.com/products/docker-desktop
  2. Pull and run the MCP server in Docker:
    docker run -i --rm --init -e MCP_MODE=stdio -e LOG_LEVEL=error -e DISABLE_CONSOLE_OUTPUT=true ghcr.io/czlonkowski/n8n-mcp:latest
    
  3. If you need integration with an actual n8n instance, pass the N8N_API_URL and N8N_API_KEY environment variables as shown in the full configuration example.

Notes:

  • The npx option downloads the latest MCP version automatically. The Docker image is pre-built and includes a database of n8n nodes.

Additional notes

Tips and common considerations:

  • If you’re using Claude Desktop, set MCP_MODE=stdio to avoid JSON parsing errors caused by mixed logs.
  • When using Docker, you can point to a local n8n instance by setting N8N_API_URL (e.g., http://host.docker.internal:5678) and optionally N8N_API_KEY for workflow management features.
  • The DISABLE_CONSOLE_OUTPUT flag can reduce noisy logs in production setups.
  • The Docker container is optimized to be smaller by excluding n8n dependencies while providing full MCP functionality.
  • Ensure network access between your MCP client and the running MCP server so that JSON-RPC messages and responses flow correctly.
  • The npm package name for this MCP server is n8n-mcp; you can also reference it in package.json if building a custom workflow.

Related MCP Servers

Sponsor this space

Reach thousands of developers