n8n-workflow-builder
by: makafeli
MCP server for programmatically creating and managing n8n workflows
📌Overview
Purpose: The n8n Workflow Builder MCP Server aims to manage n8n workflows by providing comprehensive functionality for workflow-related operations.
Overview: This server enables users to efficiently list, create, update, delete, activate, and deactivate workflows within the n8n environment. It utilizes npm for package management and focuses on a streamlined installation and deployment process.
Key Features:
-
Workflow Management Tools: Offers commands to list all workflows, create new ones, retrieve specific workflows by ID, update them, delete them, and control their activation status.
-
Execution Management Tools: Facilitates oversight of workflow executions, providing options to list, retrieve, and delete execution details by ID.
n8n Workflow Builder MCP Server
This project provides an MCP server for managing n8n workflows, including functionalities to list, create, update, delete, activate, and deactivate workflows.
Important: This version exclusively supports npm for package management and running the server. (npx support will be reintroduced in a future update.)
Requirements
- Node.js (v14+ recommended)
- npm
Installation Guide
Clone the Repository
Clone the repository:
git clone https://github.com/makafeli/n8n-workflow-builder.git
Navigate to the project directory:
cd /root/n8n-workflow-builder
Install Dependencies
Install the necessary dependencies:
npm install
Build and Start the Server
-
Build the project:
npm run build
-
Start the MCP Server:
npm start
The server will start and connect via stdio, allowing you to verify its successful launch.
Additional Configuration
Configuration is managed via the cline_mcp_settings.json
file. Ensure the following environment variables are set:
N8N_HOST
: Your n8n API host URL.N8N_API_KEY
: Your n8n API key.
Example configuration:
{
"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"
},
"disabled": false,
"alwaysAllow": [
"create_workflow",
"create_workflow_and_activate",
"update_workflow",
"activate_workflow",
"deactivate_workflow",
"get_workflow",
"delete_workflow"
],
"autoApprove": []
}
}
Available Features
MCP Tools
Workflow Management
- list_workflows: Lists all workflows.
- create_workflow: Creates a new workflow.
- get_workflow: Retrieves a workflow by its ID.
- update_workflow: Updates an existing workflow.
- delete_workflow: Deletes a workflow by its ID.
- activate_workflow: Activates a workflow by its ID.
- deactivate_workflow: Deactivates a workflow by its ID.
Execution Management
- list_executions: Lists all workflow executions.
- get_execution: Retrieves details of a specific execution by its ID.
- delete_execution: Deletes an execution by its ID.
Troubleshooting
-
Ensure you are using npm.
-
If issues arise, clean the build and rebuild:
npm run clean && npm run build
-
Verify environment variables in
cline_mcp_settings.json
.
Future Enhancements
- Reintroducing npx support.
- Additional tools and workflow features.
- Enhancements to deployment and scaling.
License
This project is licensed under the MIT License.