n8n workflow builder
A server for programmatically creating and managing n8n workflows with a REST API interface, supporting workflow creation, validation, and export.
A server for programmatically creating and managing n8n workflows with a REST API interface, supporting workflow creation, validation, and export.
This project provides an MCP server for managing n8n workflows. It offers functionality to list, create, update, delete, activate, and deactivate workflows through a set of defined tools.
Important:
This version exclusively supports npm for package management and running the server. (npx support will be reintroduced in a future update.)
Clone the repository from your preferred source. For example:
git clone https://github.com/makafeli/n8n-workflow-builder.git
Then, navigate to the project directory:
cd /root/n8n-workflow-builder
Install the necessary dependencies using npm:
npm install
This command will download and install all required packages as defined in the package.json
file.
For testing and getting the server online, use the following commands:
build
directory.npm run build
npm start
The server will start and connect via stdio. You can check the console to see messages confirming that the server has started correctly.
For testing purposes and to get the server online, use the build and start commands mentioned above. This basic workflow (install, build, start) is currently the recommended method.
Server configuration is managed via the cline_mcp_settings.json
file. Ensure that the following environment variables are correctly set:
N8N_HOST
: Your n8n API host URL.N8N_API_KEY
: Your n8n API key.Example configuration in cline_mcp_settings.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"
},
"disabled": false,
"alwaysAllow": [
"create_workflow",
"create_workflow_and_activate",
"update_workflow",
"activate_workflow",
"deactivate_workflow",
"get_workflow",
"delete_workflow"
],
"autoApprove": []
}
}
The following tools are defined in the server and can be accessed through your MCP client:
The server also provides the following resources for more efficient context access:
npm run clean && npm run build
cline_mcp_settings.json
are correct.This project is licensed under the MIT License.
[
{
"description": "List all workflows from n8n",
"enabled": true,
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "list_workflows"
},
{
"description": "Create a new workflow in n8n",
"enabled": true,
"inputSchema": {
"properties": {
"connections": {
"items": {
"properties": {
"source": {
"type": "string"
},
"sourceOutput": {
"default": 0,
"type": "number"
},
"target": {
"type": "string"
},
"targetInput": {
"default": 0,
"type": "number"
}
},
"required": [
"source",
"target"
],
"type": "object"
},
"type": "array"
},
"name": {
"type": "string"
},
"nodes": {
"items": {
"properties": {
"name": {
"type": "string"
},
"parameters": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"name"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"nodes"
],
"type": "object"
},
"name": "create_workflow"
},
{
"description": "Get a workflow by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "get_workflow"
},
{
"description": "Update an existing workflow",
"enabled": true,
"inputSchema": {
"properties": {
"connections": {
"type": "array"
},
"id": {
"type": "string"
},
"nodes": {
"type": "array"
}
},
"required": [
"id",
"nodes"
],
"type": "object"
},
"name": "update_workflow"
},
{
"description": "Delete a workflow by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "delete_workflow"
},
{
"description": "Activate a workflow by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "activate_workflow"
},
{
"description": "Deactivate a workflow by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "deactivate_workflow"
},
{
"description": "List all executions from n8n with optional filters",
"enabled": true,
"inputSchema": {
"properties": {
"cursor": {
"type": "string"
},
"includeData": {
"type": "boolean"
},
"limit": {
"type": "number"
},
"projectId": {
"type": "string"
},
"status": {
"enum": [
"error",
"success",
"waiting"
],
"type": "string"
},
"workflowId": {
"type": "string"
}
},
"type": "object"
},
"name": "list_executions"
},
{
"description": "Get details of a specific execution by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "number"
},
"includeData": {
"type": "boolean"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "get_execution"
},
{
"description": "Delete an execution by ID",
"enabled": true,
"inputSchema": {
"properties": {
"id": {
"type": "number"
}
},
"required": [
"id"
],
"type": "object"
},
"name": "delete_execution"
}
]