n8n-workflow-builder-mcp
Build and edit n8n workflow JSON files locally by prompting an AI agent — no running n8n instance required.
Create workflows with
create_workflowin a workspace directory, and list or inspect them withlist_workflows/get_workflow_details.Add, edit, and delete nodes (
add_node,edit_node,delete_node) with control over type, name, position, parameters, typeVersion, and webhook IDs.Wire nodes together manually with
add_connection, or automatically connect AI models, tools, and memory to an agent viaadd_ai_connections.Discover available node types with
list_available_nodes, optionally filtered by search term or n8n version.Check n8n version capabilities with
get_n8n_version_infoto keep generated workflows compatible with your instance.
Supports integration with LangChain components in n8n workflows, offering special tools for connecting AI components and establishing connections between agent nodes, model nodes, and tool nodes.
Provides tools for building and manipulating n8n workflows through an AI-friendly interface, including creating new workflows, adding/editing nodes, managing connections between nodes, and discovering available node types.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@n8n-workflow-builder-mcp create a workflow that fetches new GitHub issues and sends them to Slack"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
n8n Workflow Builder MCP
A Model Context Protocol (MCP) server for building and manipulating n8n workflows. Build n8n workflows just by prompting with AI — works with Claude Code, VS Code, Cursor, and any MCP-compatible client.
Is this the right MCP server for you?
This server writes n8n workflow JSON files locally. It doesn't need a running n8n instance, and it picks node versions from a bundled catalog that covers n8n 1.86.0 – 2.6.2.
Use this server if you:
want to generate workflow files offline and import them yourself (or commit them to git)
are on an older self-hosted n8n and need workflows whose node
typeVersions your instance actually supports. SetN8N_VERSIONto match it.
Consider an alternative if you:
want the AI to build, test and run workflows directly in your n8n instance. Use n8n's built-in instance-level MCP server.
want a large node documentation and template library with deployment through the n8n API. Use czlonkowski/n8n-mcp.
need nodes added in n8n after 2.6.2. They aren't in the bundled catalog yet.
DEMO VIDEO:
Related MCP server: mcp-n8n-builder
Cursor rules
File with rules is in
rules/n8n-mcp-server-rules.mdc
Key Features
Workflow Management: Create, update, and execute n8n workflows programmatically (execute is not implemented yet)
Node Discovery: Explore available n8n nodes and their capabilities
Connection Management: Create connections between workflow nodes
AI Integration: Special tools for connecting AI components in workflows
AI-Friendly Interface: Designed specifically for interaction with AI agents
N8N Version Management: Automatic version detection and compatibility handling - supports 184+ n8n versions (1.86.0 – 2.6.2) with dynamic node filtering and "closest lower version" matching for backward compatibility
Prerequisites
Node.js (v18 or higher)
npm (for npx command)
An MCP-compatible client (Claude Code, VS Code, Cursor, etc.)
Installation & Setup
Getting your n8n API Key
The API key is optional. The server only uses N8N_API_URL/N8N_API_KEY to detect your n8n version. To work fully offline, skip them and set N8N_VERSION (e.g. N8N_VERSION=1.123.2) instead.
Open your n8n instance in a browser
Go to Settings > API Keys
Click Create API Key
Copy the generated key and use it in your configuration
Claude Code (Recommended)
Add the MCP server using the Claude Code CLI:
claude mcp add n8n-workflow-builder -- npx -y n8n-workflow-builder-mcpThen set the environment variables:
claude mcp add n8n-workflow-builder \
-e N8N_API_URL=http://localhost:5678 \
-e N8N_API_KEY=your-n8n-api-key-here \
-- npx -y n8n-workflow-builder-mcp
N8N_VERSIONis optional — the server auto-detects it from the API.
VS Code / Cursor
Add to your MCP config file (.vscode/mcp.json for VS Code, .cursor/mcp.json for Cursor):
{
"mcpServers": {
"n8n-workflow-builder": {
"command": "npx",
"args": ["-y", "n8n-workflow-builder-mcp"],
"env": {
"N8N_API_URL": "http://localhost:5678",
"N8N_API_KEY": "your-n8n-api-key-here"
}
}
}
}Restart your IDE for changes to take effect.
Development Installation
For development or local testing, clone and build from source:
git clone https://github.com/ifmelate/n8n-workflow-builder-mcp.git
cd n8n-workflow-builder-mcp
npm install
npm run buildThen point your MCP client to the built entry point:
# Claude Code
claude mcp add n8n-workflow-builder -- node /absolute/path/to/n8n-workflow-builder-mcp/dist/index.js
# VS Code / Cursor — use the same JSON config above with "command": "node" and "args": ["/absolute/path/to/dist/index.js"]For development with auto-rebuild:
npm run devAvailable MCP Tools
The server provides the following tools for working with n8n workflows:
Core Workflow Management
Tool Name | Description | Key Parameters |
create_workflow | Create a new n8n workflow |
|
list_workflows | List workflows in the workspace |
|
get_workflow_details | Get detailed information about a specific workflow |
|
validate_workflow | Validate a workflow file against node schemas and connectivity |
|
Node Management
Tool Name | Description | Key Parameters |
add_node | Add a new node to a workflow |
|
edit_node | Edit an existing node in a workflow |
|
delete_node | Delete a node from a workflow |
|
list_available_nodes | List available node types with optional filtering. Supports tag-style synonyms and multi-token OR/AND logic |
|
Connection Management
Tool Name | Description | Key Parameters |
add_connection | Create a connection between two nodes |
|
add_ai_connections | Wire AI model, tools, and memory to an agent |
|
connect_main_chain | Build a minimal main path through AI workflow nodes (Trigger → Model → Memory → Embeddings → Doc Loader → Vector Store → Vector Tool → Agent) |
|
Workflow Planning & Composition
Tool Name | Description | Key Parameters |
plan_workflow | Create a non-destructive plan (nodes and connections) to update a workflow. Does not write files |
|
review_workflow_plan | Apply a plan in-memory and return validation errors, warnings, and suggested fixes. Does not write files |
|
apply_workflow_plan | Apply a previously reviewed plan to the workflow on disk (atomic write) |
|
compose_ai_workflow | Compose a complex AI workflow (agent + model + memory + embeddings + vector + tools + trigger) in one call, including wiring and basic validation |
|
Parameter Management
Tool Name | Description | Key Parameters |
suggest_node_params | Suggest minimal valid parameters for a node type using defaults and required fields |
|
list_missing_parameters | List required parameters missing for a node considering visibility rules |
|
fix_node_params | Return parameters with defaults applied for required fields that are missing |
|
Templates & Discovery
Tool Name | Description | Key Parameters |
list_template_examples | List node usage examples extracted from free templates. Filter by node_type or template_name |
|
get_n8n_version_info | Get current N8N version and capabilities |
|
Validation behavior
validate_workflow promotes warnings to errors and additionally fails when any enabled node is not connected (directly or via AI ports) to the main chain starting at the inferred startNode. Use connect_from/connect_to or add_ai_connections to fix connectivity.
Troubleshooting
General
Check your MCP config — make sure JSON is valid and the server name matches.
Update Node.js to the latest LTS version.
Clear npm cache if npx fails:
npm cache clean --forceTry global install as a fallback:
npm install -g n8n-workflow-builder-mcp
Claude Code
Run
claude mcp listto verify the server is registered.Check logs with
claude mcp logs n8n-workflow-builder.
VS Code / Cursor
Check the Output panel — select "MCP" from the dropdown to see server logs.
Make sure the server is enabled in Settings > Features > MCP Servers.
Restart the IDE after config changes.
Project Structure
/src: Main source code/src/tools: MCP tools implementation/src/models: Data models/src/utils: Utility functions/src/middleware: Authentication and middleware/config: Configuration files/tests: Test files/workflow_nodes: n8n node definitions/docs: Additional documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT License
Available Tools
10 toolsadd_ai_connectionsD
Inputs: agent_node_id (required), workflow_name (required), memory_node_id, model_node_id, +1 more.
add_connectionD
Inputs: source_node_id (required), source_node_output_name (required), target_node_id (required), target_node_input_name (required), +2 more.
add_nodeD
Inputs: node_type (required), workflow_name (required), node_name, parameters, +4 more.
create_workflowD
Inputs: workflow_name (required), workspace_dir (required).
delete_nodeD
Inputs: node_id (required), workflow_name (required), workflow_path.
edit_nodeD
Inputs: node_id (required), workflow_name (required), node_name, node_type, +5 more.
get_n8n_version_infoD
Inputs: no named parameters.
get_workflow_detailsD
Inputs: workflow_name (required), workflow_path.
list_available_nodesD
Inputs: n8n_version, search_term.
list_workflowsD
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools have distinct purposes targeting different aspects of n8n workflow management (e.g., create_workflow vs. list_workflows, add_node vs. edit_node vs. delete_node). However, add_ai_connections and add_connection could potentially be confused without descriptions, as their relationship is unclear—they might overlap in handling connections.
All tool names follow a consistent verb_noun pattern with snake_case throughout (e.g., add_connection, create_workflow, get_workflow_details). There are no deviations in naming conventions, making the set predictable and readable.
With 10 tools, the count is well-scoped for a workflow builder server, covering core operations like creating, listing, and managing workflows and nodes. Each tool appears to earn its place without being excessive or insufficient for the domain.
The tools cover basic CRUD operations for workflows and nodes (create, list, get, edit, delete), but there are notable gaps. For example, there's no update_workflow or delete_workflow tool, and the absence of descriptions makes it hard to assess if AI connections and general connections are fully covered, potentially leaving dead ends in workflow management.
Maintenance
Related MCP Connectors
Open-source Zapier/n8n alternative as an MCP server: agents build, run and debug your workflows.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
LLM Orchestration Agent (Mcp)
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server enabling secure interaction with n8n workflows, executions, and settings via the Model Context Protocol, designed for integration with Large Language Models (LLMs).3365 npm119MIT
- AlicenseAqualityDmaintenance🪄 MCP server for programmatic creation and management of n8n workflows. Enables AI assistants to build, modify, and manage workflows without direct user intervention through a comprehensive set of tools and resources for interacting with n8n's REST API.1012 npm86MIT
- AlicenseBqualityBmaintenanceMCP server for managing n8n workflows through AI assistants. Supports workflow CRUD operations, synchronization, inspection, and execution support for automation-focused workflows.19381 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for integrating with n8n, enabling workflow automation and management through natural language.501 npm1MIT