General Introduction
n8n-mcp-server is an open source project hosted on GitHub and developed by Leonard Sellem. It is an MCP (Model Context Protocol) service tool specialized for interacting with n8n workflows. n8n is an automated workflow platform, and this tool is used to automate workflows through the MCP A protocol that lets AI assistants operate directly with n8n. You can use it to create, run, and manage n8n workflows. It's for people who want to simplify automation tasks with AI, such as developers or teams. The project has an update in March 2025, which means it's well-maintained.
Function List
- Connect n8n via the MCP protocol to give AI assistants direct control over the workflow.
- Support for creating and modifying n8n workflows.
- You can run the n8n workflow and view the results.
- Configure n8n connection information with environment variables.
- Open source design, code can be freely adjusted.
Using Help
Installation steps
To use n8n-mcp-server, you have to install it first. Here are the exact steps:
- Preparation tools
Make sure you have Node.js on your computer (version 18 or higher recommended). You also need a running instance of n8n with API functionality turned on. Go to the n8n settings and look for the API key. - Download Project
Enter it in the terminal:
git clone https://github.com/leonardsellem/n8n-mcp-server.git
Then go to the catalog:
cd n8n-mcp-server
- Installation of dependencies
Run this command:
npm install
It will load the files needed for the project.
- Setting environment variables
Copy the example file:
cp .env.example .env
show (a ticket) .env
file, fill in the information for n8n, for example:
N8N_API_URL=http://localhost:5678/api/v1
N8N_API_KEY=你的n8n密钥
DEBUG=false
N8N_API_URL
is the address of n8n.N8N_API_KEY
It's the key.DEBUG
set up astrue
You can see more logs.
- Compile Code
Input:
npm run build
This will turn the code into a runnable file.
- Starting services
Running:
npm start
The service is started and the AI assistant can communicate with it through standard inputs and outputs.
How to use the core features
Once installed, n8n-mcp-server becomes an MCP service. Its main role is to allow the AI to interact with the n8n workflow. Here is how to do it:
- Connecting to AI
You have to add this service to the AI platform. For example, in a tool that supports MCP, edit the config file to add it:
{
"mcpServers": {
"n8n": {
"command": "n8n-mcp-server",
"env": {
"N8N_API_URL": "你的n8n地址",
"N8N_API_KEY": "你的密钥"
}
}
}
}
Once saved, the AI will be able to find this service.
- Creating Workflows
You can say to the AI, "Create a workflow in n8n for me and email it to me every day." The AI will send the request to n8n, via the MCP service, to create it automatically. - Running a workflow
Say, "Run my email workflow." The service tells n8n to perform the task, and then returns a result, such as "task completed" or "something went wrong". - status
Ask, "How's my workflow running?" The service will check the status of n8n and tell you the specifics. - Debugging Issues
If it doesn't work right, put.env
innerDEBUG
adapt (a story to another medium)true
, restart the service and you can see the detailed logs. Developers can also change the code to add features.
tip
- n8n If running locally, the address is usually
http://localhost:5678/api/v1
The - Keep the key secret, don't show it to just anyone.
- You can run n8n with Docker in the same way as you would with the
.env
Pretty much.
application scenario
- timed task
You can use it as a workflow to check the weather every day and then send a text reminder. ai takes care of that directly through the service. - data processing
In the company, you can use it to automatically organize sales data and generate forms to send to the group. AI operation, saving time and effort. - test development
Developers can use it to test how AI and n8n work together and change code to try out new ideas.
QA
- Do I have to know how to program?
It's okay if you don't know how, just knowing how to load things from the command line is enough. But you have to know JavaScript to change functions. - What's so special about this service?
It allows AI to directly manage n8n workflows without you having to manually point and click around. - How many n8n can you connect?
Any number of them. Just assign an n8n address to each service and run multiple instances.