
N8n Workflow Builder
STDIOAI-powered n8n workflow builder for creating and manipulating n8n workflows in Cursor IDE.
AI-powered n8n workflow builder for creating and manipulating n8n workflows in Cursor IDE.
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.
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:
The recommended way to install this MCP server is using npx directly in your .cursor/mcp.json
file:
{ "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" } } } }
This approach:
Setup Steps:
Create the .cursor
directory in your project root (if it doesn't exist):
mkdir -p .cursor
Create or update .cursor/mcp.json
with the configuration above, replacing:
N8N_API_URL
: Your n8n instance URL (default: http://localhost:5678
)N8N_API_KEY
: Your n8n API key from the n8n settingsRestart Cursor IDE for changes to take effect
For development or local testing, you can clone and build from source:
Clone the repository:
git clone https://github.com/ifmelate/n8n-workflow-builder-mcp.git cd n8n-workflow-builder-mcp
Install dependencies:
npm install
Build the TypeScript project:
npm run build
Configure in .cursor/mcp.json
:
{ "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" } } } }
For development with auto-rebuild:
npm run dev
Alternatively, you can set up the MCP server through Cursor's interface:
npx
with args ["-y", "n8n-workflow-builder-mcp"]
N8N_API_URL
: http://localhost:5678
N8N_API_KEY
: your-n8n-api-key-here
The server provides the following tools for working with n8n workflows:
Tool Name | Description | Key Parameters |
---|---|---|
create_workflow | Create a new n8n workflow | workflow_name , workspace_dir |
list_workflows | List all existing workflows | (no parameters) |
get_workflow_details | Get detailed information about a specific workflow | workflow_name , workflow_path (optional) |
add_node | Add a new node to a workflow | workflow_name , node_type , position , parameters , node_name , typeVersion , webhookId , workflow_path (optional) |
edit_node | Edit an existing node in a workflow | workflow_name , node_id , node_type , node_name , position , parameters , typeVersion , webhookId , workflow_path (optional) |
delete_node | Delete a node from a workflow | workflow_name , node_id , workflow_path (optional) |
add_connection | Add a connection between nodes | workflow_name , source_node_id , source_node_output_name , target_node_id , target_node_input_name , target_node_input_index |
add_ai_connections | Add AI connections for LangChain nodes | workflow_name , agent_node_id , model_node_id , tool_node_ids , memory_node_id |
list_available_nodes | List available node types with optional filtering | search_term (optional) |
If you're having trouble getting the MCP server to work with Cursor, try these steps:
Make sure your .cursor/mcp.json
file is properly formatted:
{ "mcpServers": { "n8n-workflow-builder": { "command": "npx", "args": ["-y", "n8n-workflow-builder-mcp"] } } }
Check Cursor MCP settings:
Check server logs: Look for errors in the Cursor Output panel. Select "Cursor MCP" from the dropdown in the Output panel to see MCP-specific logs.
Try manual installation: If npx fails, try the global installation method as an alternative:
npm install -g n8n-workflow-builder-mcp
This usually happens when:
Try:
This can happen if:
.cursor/mcp.json
file is not properly formatted.cursor
directoryTry:
.cursor/mcp.json
filechmod 755 .cursor
This can happen if:
Try:
npm cache clean --force
/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 documentationContributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)MIT License