观看演示工作流搜索功能的视频:
<video src="https://github.com/user-attachments/assets/1ec10869-be02-4ac7-a962-a6fdf865fffa" width="352" height="720"></video>
n8n 工作流验证和管理的 MCP (模型上下文协议) 服务器。
在构建时将所有 n8n 节点数据包含到二进制文件中,无需外部文件即可运行:
# 当前平台的独立构建
make build-standalone
# 或者
make build
# Linux 64位独立构建
make build-standalone-linux
# 或者
make build-linux
# Windows 64位独立构建
make build-standalone-windows
# 或者
make build-windows
macOS (Intel):
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o build/n8n-mcp-server-darwin ./cmd/n8n-mcp-server
macOS (Apple Silicon M1/M2):
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o build/n8n-mcp-server-darwin-arm64 ./cmd/n8n-mcp-server
仅通过二进制文件运行,无需外部文件(默认模式):
# macOS/Linux
./build/n8n-mcp-server -standalone
# Windows
build\n8n-mcp-server.exe -standalone
# 使用 Makefile
make run
# 或者
make run-standalone
使用外部数据文件的方式:
# macOS/Linux
./build/n8n-mcp-server -standalone=false
# Windows
build\n8n-mcp-server.exe -standalone=false
# 单独模式(默认)
go run ./cmd/n8n-mcp-server -standalone
# 文件系统模式
go run ./cmd/n8n-mcp-server -standalone=false
服务器支持韩语(ko)、英语(en)、日语(jp)、越南语(vn)、繁体中文(tw)、泰语(th)。可以通过 --lang 标志设置语言:
# 单独模式
./build/n8n-mcp-server -standalone --lang ko # 韩语(默认值)
./build/n8n-mcp-server -standalone --lang en # 英语
./build/n8n-mcp-server -standalone --lang jp # 日语
./build/n8n-mcp-server -standalone --lang vn # 越南语
./build/n8n-mcp-server -standalone --lang tw # 繁体中文
./build/n8n-mcp-server -standalone --lang th # 泰语
# 文件系统模式
./build/n8n-mcp-server -standalone=false --lang ko # 韩语(默认值)
./build/n8n-mcp-server -standalone=false --lang en # 英语
./build/n8n-mcp-server -standalone=false --lang jp # 日语
./build/n8n-mcp-server -standalone=false --lang vn # 越南语
./build/n8n-mcp-server -standalone=false --lang tw # 繁体中文
./build/n8n-mcp-server -standalone=false --lang th # 泰语
在节点搜索时可以调整每个元素的权重:
# 在单独模式下调整搜索权重
./build/n8n-mcp-server -standalone \
--name-weight 3.0 \
--overview-weight 2.0 \
--case-weight 1.5 \
--op-weight 1.0
# 在文件系统模式下调整搜索权重及更改数据路径
./build/n8n-mcp-server -standalone=false \
--name-weight 3.0 \
--overview-weight 2.0 \
--case-weight 1.5 \
--op-weight 1.0 \
--data-path /custom/path/to/nodes
# 查看帮助
./build/n8n-mcp-server --help
# 查看版本
./build/n8n-mcp-server --version
配置文件位置:~/Library/Application Support/Claude/claude_desktop_config.json
单独模式(推荐):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "/Users/{username}/{clone_path}/build/n8n-mcp-server",
"args": ["--standalone", "--lang", "ko"]
}
}
}
文件系统模式(开发用):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "/Users/{username}/{clone_path}/build/n8n-mcp-server",
"args": ["-standalone=false", "--lang", "ko"]
}
}
}
Go 运行模式(开发用):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "go",
"args": ["run", "./cmd/n8n-mcp-server", "--standalone", "--lang", "ko"],
"cwd": "/Users/{username}/{clone_path}"
}
}
}
配置文件位置:%APPDATA%\Claude\claude_desktop_config.json
单独模式(推荐):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "C:\\path\\to\\n8n-workflow-mcp\\build\\n8n-mcp-server.exe",
"args": ["--standalone", "--lang", "ko"]
}
}
}
文件系统模式(开发用):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "C:\\path\\to\\n8n-workflow-mcp\\build\\n8n-mcp-server.exe",
"args": ["-standalone=false", "--lang", "ko"]
}
}
}
Go 运行模式(开发用):
{
"mcpServers": {
"n8n-kor-workflow": {
"command": "go",
"args": ["run", ".\\cmd\\n8n-mcp-server", "--standalone", "--lang", "ko"],
"cwd": "C:\\path\\to\\n8n-workflow-mcp"
}
}
}
n8n-workflow-mcp/
├── cmd/
│ └── n8n-mcp-server/ # 主应用程序入口点
├── internal/
│ ├── config/ # 配置管理
│ ├── handlers/ # MCP 请求处理器
│ ├── i18n/ # 多语言支持
│ ├── search/ # 搜索引擎
│ ├── server/ # MCP 服务器实现
│ ├── services/ # 业务逻辑
│ ├── store/ # 数据存储
│ ├── validator/ # 工作流验证
│ └── workflow/ # 工作流管理
├── pkg/
│ └── types/ # 公共类型定义
├── examples/
│ └── config/ # Claude Code & Cursor 配置示例
├── test/ # 测试文件
└── build/ # 构建结果
# 运行所有测试
make test
# 运行带有覆盖率的测试
make test-coverage
# 代码格式化
make fmt
# 代码检查
make lint
# 模块整理
make mod-tidy
# 清理构建文件
make clean
| 功能 | 单独模式 | 文件系统模式 |
|---|---|---|
| 部署便利性 | ✅ 单一可执行文件 | ❌ 需要额外文件 |
| 运行速度 | ✅ 快速 | ✅ 快速 |
| 内存使用量 | ⚠️ 稍高 | ✅ 较低 |
| 开发便利性 | ⚠️ 需要重新构建 | ✅ 实时反映 |
| 生产环境 | ✅ 推荐 | ❌ 不推荐 |
| 开发环境 | ✅ 可用 | ✅ 推荐 |