This n8n Workflow Builder MCP server provides an AI-friendly interface for programmatically creating and managing n8n workflows within the Cursor IDE. With it, you can:
Create, list, and manage n8n workflows
Manipulate workflow nodes: Add, edit, delete, and connect nodes
Discover node types: Explore available n8n nodes with optional filtering
Configure node details: Set parameters, type versions, and webhook IDs
Integrate AI components: Connect language models, agents, tools, and memory nodes
Add specialized connections: Support for LangChain nodes and AI-specific components
The server is designed specifically for AI agents to automate workflow creation and modification tasks.
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.
n8n Workflow Builder MCP
This project provides a Model Context Protocol (MCP) server for building and manipulating n8n workflows JSON in Cursor IDE. It's a way to build n8n workflows just by prompting with AI in chat.
DEMO VIDEO:
Current status of implementation
It's in early development stage. Basically, it's working - MCP server creates JSON file with n8n workflow that you can copy and paste to workflow editor in n8n UI. Current problems:
sometimes llm agents put wrong parameters in the request. I plan to find a way to fix this.
sometimes connection between nodes is not setting. I'm working to resolve it.
not all types of node are checked working. I'm working to resolve it.
initial prompt does matter. If it's not clear, the agent will go wrong way. I plan to find a way to fix this.
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
Prerequisites
Node.js (v14 or higher)
Cursor IDE (v0.48 or newer)
npm or yarn
TypeScript compiler (installed as a dev dependency via
npm install
)
Installation
Clone the repository:
git clone https://github.com/ifmelate/n8n-workflow-builder-mcp.git cd n8n-workflow-builder-mcpInstall dependencies:
npm installBuild the TypeScript project:
npm run buildMake the MCP server script executable (if needed):
chmod +x dist/index.js
Running the Server
Start the MCP server:
This will run the compiled code from dist/index.js
.
For development with auto-rebuild and restart on changes:
Cursor IDE Integration
There are two ways to set up the MCP server with Cursor:
Method 1: Using Cursor Settings UI (Recommended)
Start Cursor IDE
Go to Settings > Features > MCP Servers
Click "Add Server" and provide the absolute path to the
dist/index.js
file (e.g.,/Users/yourname/n8n-workflow-builder-mcp/dist/index.js
)Make sure the server is enabled
Restart Cursor IDE for changes to take effect
Method 2: Manual Configuration
Ensure the
.cursor
directory exists:mkdir -p .cursorCreate the MCP configuration file:
cat > .cursor/mcp.json << 'EOF' { "mcpServers": { "n8n-workflow-builder": { "command": "node", "args": ["/absolute/path/to/n8n-workflow-builder-mcp/dist/index.js"] } } } EOFMake sure to replace
/absolute/path/to
with the actual path on your system.Restart Cursor IDE for changes to take effect
Available MCP Tools
The server provides the following tools for working with n8n workflows:
Tool Name | Description | Key Parameters |
create_workflow | Create a new n8n workflow |
,
|
list_workflows | List all existing workflows | (no parameters) |
get_workflow_details | Get detailed information about a specific workflow |
|
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 |
,
|
add_connection | Add a connection between nodes |
,
,
,
,
|
add_ai_connections | Add AI connections for LangChain nodes |
,
,
,
|
list_available_nodes | List available node types with optional filtering |
(optional) |
Troubleshooting Cursor Integration
If you're having trouble getting the MCP server to work with Cursor, try these steps:
Restart Cursor: After setting up the MCP configuration, completely close and restart Cursor.
Check Cursor MCP settings:
Open Cursor Settings
Go to Features > MCP Servers
Make sure your server is listed and enabled
If it's listed but not working, try clicking the refresh button
Check server logs: Look for errors in the terminal where you're running the server or in the Cursor Output panel. Select "Cursor MCP" from the dropdown in the Output panel to see MCP-specific logs.
Verify file permissions: Make sure the
dist/index.js
file has execution permissions.Check for port conflicts: If there are other MCP servers running, they might conflict. Check for other processes using the same ports.
Try global installation: Instead of using a local path, you can try installing the server globally:
npm install -g n8n-workflow-builder-mcpThen update the
.cursor/mcp.json
file to use the global command.
Common Issues and Solutions
"Failed to create client"
This usually happens when:
The MCP server isn't running
There's a connectivity issue between Cursor and the server
The server crashed during initialization
Try:
Running the test script to make sure the server works correctly
Checking for errors in the server logs
Restarting Cursor
MCP Server is not showing up in Cursor
This can happen if:
The
.cursor/mcp.json
file is not properly formattedCursor hasn't detected the configuration change
Try:
Validating the JSON format of your
.cursor/mcp.json
fileRestarting Cursor
Manually selecting the server in Cursor settings (if it appears there)
MCP Server shows up but tools aren't available
This can happen if:
The server isn't properly registering its tools
There's an issue with the ListOfferings request/response
Try:
Running the test script to check if tools are properly registered
Clicking the refresh button in the MCP server settings in Cursor
Checking the server logs for any errors
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
Working on licence - need to have confirmation from n8n team
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
n8n-workflow-builder-mcp
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for programmatically creating and managing n8n workflows.Last updated -120MIT License
- AsecurityAlicenseAquality🪄 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.Last updated -103067MIT License
- MIT License
- RustBSD Zero Clause License