githubEdit

N8n MCP

n8n MCP

What This Does

Enables Claude Code to create, validate, test, and manage n8n workflows programmatically.

Prerequisites

  • Docker Desktop installed

  • n8n instance with API access enabled

  • n8n API Key (from Settings → API)

Step 1: Create Local Config Folder

mkdir -p ~/.config/mcp/n8n

Step 2: Get Credentials

  1. Open your n8n instance

  2. Go to Settings → API

  3. Click Create API Key

  4. Copy the API key (starts with n8n_api_)

  5. Note your n8n URL (e.g., https://your-instance.n8n.cloud)

Step 3: Save Credentials Locally

Create ~/.config/mcp/n8n/.env:

Replace with your actual values.

Step 4: Pull Docker Image

Step 5: Test the Connection

Step 6: Add to Claude Code

Add to ~/.claude/settings.json:

Note: ${HOME} expansion may not work in all environments. If it doesn't, use the full absolute path:

Step 7: Verify It Works

Restart Claude Code and test:

Expected: You should see a list of your n8n workflows.

Available Tools

Tool
Description

n8n_create_workflow

Create new workflows

n8n_get_workflow

Retrieve workflow details

n8n_update_full_workflow

Update entire workflow

n8n_delete_workflow

Delete workflows

n8n_list_workflows

List all workflows

n8n_validate_workflow

Validate workflow structure

n8n_test_workflow

Test/trigger workflow execution

n8n_executions

View execution history

search_nodes

Search available nodes

get_node

Get node documentation

Troubleshooting

Issue
Solution

Connection refused

Verify N8N_API_URL is accessible

401 Unauthorized

Check API key is correct

Image not found

Run docker pull ghcr.io/czlonkowski/n8n-mcp:latest

Workflows not visible

Ensure API key has workflow access

env-file not found

Use absolute path instead of ${HOME}

Last updated