Get the FREE Ultimate OpenClaw Setup Guide →

n8n-workflow-builder

MCP server that allow LLM in agent mode builds 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 ifmelate-n8n-workflow-builder-mcp npx -y n8n-workflow-builder-mcp \
  --env N8N_API_KEY="your-n8n-api-key-here" \
  --env N8N_API_URL="http://localhost:5678" \
  --env N8N_VERSION="optional"

How to use

This MCP server helps you build and manipulate n8n workflows as JSON payloads from Cursor IDE prompts. It exposes a set of tools to create, modify, validate, and connect nodes within an n8n workflow, all orchestrated through AI-friendly prompts. You can discover available node types, create workflows, add or edit nodes, and wire connections between nodes, with the added capability to wire AI-related components into your workflows. The server is designed to work with your local or remote n8n instance and will return workflow JSON that you can paste directly into the n8n workflow editor or save as a file for version control.

Key capabilities include: Core workflow management (create, list, get details, and validate workflows), Node management (add, edit, delete, and list available nodes with filtering), and Connection management (add connections and AI-specific connections to integrate models, tools, memory, embeddings, and vector stores). It also includes AI-friendly tooling and automatic n8n version handling to maintain compatibility across versions. To use it, configure your MCP via npx (as shown in the installation instructions), provide your n8n instance URL and API key, and start issuing prompts that map to the available tools and parameters. The result will be a structured n8n workflow in JSON that you can import into the n8n editor.

Note: The server focuses on generating valid workflow JSON and wiring nodes; execution of workflows is not implemented in all cases yet, and some node types or parameters may require refinement by the LLM prompts.

How to install

Prerequisites:

  • Node.js v14 or newer
  • npm (comes with Node.js)
  • Cursor IDE v0.48 or newer
  • Access to a running n8n instance if you plan to connect workflows to real data

Installation options:

Option A: Using npx (recommended for most users)

  1. Ensure your .cursor/mcp.json is configured as shown in the README example.
  2. The MCP server will be installed and run on demand via npx when Cursor starts.

Option B: Development installation (from source)

  1. Clone the repository:
git clone https://github.com/ifmelate/n8n-workflow-builder-mcp.git
cd n8n-workflow-builder-mcp
  1. Install dependencies:
npm install
  1. Build the TypeScript project (if applicable):
npm run build
  1. Configure in .cursor/mcp.json to point to the built index:
{
  "mcpServers": {
    "n8n-workflow-builder": {
      "command": "node",
      "args": ["/absolute/path/to/n8n-workflow-builder-mcp/dist/index.js"],
      "env": {
        "N8N_API_URL": "http://localhost:5678",
        "N8N_API_KEY": "your-n8n-api-key-here",
        // "N8N_VERSION": "1.76.1" // optional
      }
    }
  }
}
  1. For development with auto-rebuild:
npm run dev

Alternative: Cursor Settings UI

  1. Start Cursor IDE
  2. Go to Settings > Features > MCP Servers
  3. Click "Add Server" and configure using the npx command with arguments ["-y", "n8n-workflow-builder-mcp"]
  4. Set environment variables for N8N_API_URL, N8N_API_KEY, and optional N8N_VERSION
  5. Enable and restart Cursor for changes to take effect

Additional notes

Tips and common considerations:

  • Ensure your n8n instance is reachable from the environment where Cursor runs; N8N_API_URL should point to the reachable endpoint (default http://localhost:5678).
  • Keep your N8N_API_KEY secure; treat it as a credential.
  • The N8N_VERSION variable is optional; if omitted, the MCP will attempt to auto-detect the version from the API.
  • If prompts produce incorrect parameters, you may need to adjust the prompt templates or post-process the produced JSON before importing into n8n.
  • When using development mode, frequent rebuilds (npm run build) may be required if source files change.
  • The MCP offers comprehensive tools for workflow, node, and connection management, including AI-related tool wiring; consult the tool list in the README for exact parameter names.

Related MCP Servers

Sponsor this space

Reach thousands of developers