Get the FREE Ultimate OpenClaw Setup Guide →

mcp-n8n

MCP server for n8n API integration - Connect Claude AI to n8n workflows

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ahmadsoliman-mcp-n8n-server npx -y @ahmad.soliman/mcp-n8n-server \
  --env PROJECT_ID="" \
  --env N8N_API_KEY="" \
  --env N8N_HOST_URL=""

How to use

This MCP server exposes an interface to manage and trigger n8n workflows through the Model Context Protocol (MCP). It provides tools to list all available n8n workflows, inspect workflow webhooks, and invoke webhooks either via GET or POST requests. This makes it compatible with Claude Desktop and other MCP clients, enabling seamless integration for conversational agents or automation pipelines to interact with your n8n instance. Use the remote server configuration to connect via Claude or run locally with npm and connect from Claude Desktop.

Available tools include:

  • list-workflows: retrieves all n8n workflows.
  • list-workflow-webhooks: retrieves webhooks for a specific workflow (requires id parameter).
  • call-webhook-get: calls a webhook using a GET request (requires url parameter).
  • call-webhook-post: calls a webhook using a POST request (requires url and data parameters).

To use these with Claude or another MCP client, configure the MCP server in your client’s settings to point to this server (via npx or a local node path as shown in the installation notes) and pass the appropriate parameters to each tool when you want to list workflows, view webhooks, or trigger webhooks with data.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to install global npm packages or run via npx

Installation options:

  1. Global installation (recommended for remote usage)
  • Run: npm install -g @ahmad.soliman/mcp-n8n-server
  • Create or edit your .env with your n8n configuration (see Configuration below)
  1. Using with npx (no installation required)
  • Run: npx -y @ahmad.soliman/mcp-n8n-server
  • This spawns the MCP server on demand; ensure your environment variables are set as indicated in the Configuration section
  1. Local installation

Configuration (ENV):

  • Create a .env file in your working directory and add the following variables: N8N_HOST_URL=https://your-n8n-instance.com PROJECT_ID=your_project_id_here (optional for cloud instances) N8N_API_KEY=your_api_key_here

If you are running locally, ensure your N8N_HOST_URL points to a reachable n8n instance and that the API key has appropriate permissions.

Additional notes

Tips and common considerations:

  • Ensure your .env file is loaded in the environment where the MCP server runs. When using npx or global install, you may need to export or prefix environment variables in your shell or deployment environment.
  • The N8N_HOST_URL should be the base URL for your n8n instance (e.g., http://localhost:5678 or https://your-n8n.example.com). The N8N_API_KEY must have access to the n8n resources you intend to manipulate.
  • PROJECT_ID is optional and only needed for certain cloud/n8n configurations. Include it if your instance requires it.
  • When using Claude Desktop, update claude_desktop_config.json (or equivalent) to reference the MCP server with the appropriate command and arguments. If you run locally, you may point to a local node path or use npx as shown in the examples.
  • If you encounter authentication or CORS errors from n8n, verify that the API key is valid and that the host URL is reachable from the environment running the MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers