The n8n Workflow Builder MCP Server enables AI assistants to interact with your n8n automation platform. This Model Context Protocol (MCP) server creates a bridge between AI tools like Claude Desktop or ChatGPT and your n8n instance, allowing you to manage workflows through natural language commands.
The simplest option is using the hosted version:
Run locally with NPX:
npx @makafeli/n8n-workflow-builder
For development or customization:
# Clone the repository
git clone https://github.com/makafeli/n8n-workflow-builder.git
cd n8n-workflow-builder
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm start
Configure these environment variables to connect to your n8n instance:
Variable | Description | Example |
---|---|---|
N8N_HOST |
Your n8n instance URL | http://localhost:5678 or https://your-n8n.com/api/v1 |
N8N_API_KEY |
Your n8n API key | n8n_api_1234567890abcdef... |
# For local testing
export N8N_HOST="http://localhost:5678"
export N8N_API_KEY="your-api-key-here"
# Then run the server
npx @makafeli/n8n-workflow-builder
Add this configuration to your claude_desktop_config.json
:
{
"mcpServers": {
"n8n-workflow-builder": {
"command": "npx",
"args": ["@makafeli/n8n-workflow-builder"],
"env": {
"N8N_HOST": "http://localhost:5678",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
Add this to your Cline MCP settings:
{
"mcpServers": {
"n8n-workflow-builder": {
"command": "npx",
"args": ["@makafeli/n8n-workflow-builder"],
"env": {
"N8N_HOST": "http://localhost:5678",
"N8N_API_KEY": "your-api-key-here"
}
}
}
}
The MCP server provides comprehensive tools for n8n workflow management:
// List all workflows
await callTool("list_workflows", {});
// Get detailed information about a workflow
await callTool("get_workflow", { id: "workflow-123" });
// Execute a workflow manually
await callTool("execute_workflow", { id: "workflow-123" });
// Create a simple workflow
await callTool("create_workflow", {
workflow: {
name: "My Automation Workflow",
nodes: [
{
id: "trigger",
name: "Schedule Trigger",
type: "n8n-nodes-base.scheduleTrigger",
typeVersion: 1,
position: [240, 300],
parameters: {
interval: [{ field: "unit", value: "hours" }]
}
},
{
id: "action",
name: "HTTP Request",
type: "n8n-nodes-base.httpRequest",
typeVersion: 4,
position: [460, 300],
parameters: {
url: "https://api.example.com/webhook",
method: "POST"
}
}
],
connections: {
"Schedule Trigger": {
"main": [[{ "node": "HTTP Request", "type": "main", "index": 0 }]]
}
}
}
});
// Activate a workflow
await callTool("activate_workflow", { id: "workflow-123" });
// Update a workflow
await callTool("update_workflow", {
id: "workflow-123",
workflow: { name: "Updated Workflow Name" }
});
// Deactivate a workflow
await callTool("deactivate_workflow", { id: "workflow-123" });
N8N_HOST
is correct and n8n is runningN8N_API_KEY
is correctlist_workflows
to get valid workflow IDsnode --version
npm cache clean --force
npm install && npm run build
For detailed logging, set the debug environment variable:
DEBUG=n8n-workflow-builder npx @makafeli/n8n-workflow-builder
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "n8n-workflow-builder" '{"command":"node","args":["/root/n8n-workflow-builder/build/index.js"],"env":{"N8N_HOST":"https://n8n.io/api/v1/","N8N_API_KEY":"YOUR_N8N_API_KEY_HERE"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"n8n-workflow-builder": {
"command": "node",
"args": [
"/root/n8n-workflow-builder/build/index.js"
],
"env": {
"N8N_HOST": "https://n8n.io/api/v1/",
"N8N_API_KEY": "YOUR_N8N_API_KEY_HERE"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"n8n-workflow-builder": {
"command": "node",
"args": [
"/root/n8n-workflow-builder/build/index.js"
],
"env": {
"N8N_HOST": "https://n8n.io/api/v1/",
"N8N_API_KEY": "YOUR_N8N_API_KEY_HERE"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect