返回市场
n8n工作流mcp

n8n工作流mcp

作者:n8nKOR19 星标更新:2025-07-02

项目介绍

n8n 工作流 MCP 服务器

한국어 | English | 日本語 | Tiếng Việt | 繁體中文 | ไทย

🎬 演示视频

观看演示工作流搜索功能的视频:

<video src="https://github.com/user-attachments/assets/1ec10869-be02-4ac7-a962-a6fdf865fffa" width="352" height="720"></video>

n8n 工作流验证和管理的 MCP (模型上下文协议) 服务器。

🚀 主要功能

🌍 多语言支持

  • 韩语 (ko) - 默认语言
  • 英语 (en) - 英语支持
  • 日语 (jp) - 日本語サポート
  • 越南语 (vn) - Hỗ trợ tiếng Việt
  • 繁体中文 (tw) - 繁體中文支援
  • 泰语 (th) - การสนับสนุนภาษาไทย
  • 所有工具说明和参数说明都以所选语言显示

📝 工作流管理工具

  • ping - 检查服务器连接状态
  • validate_workflow - 验证 JSON 文件中的 n8n 工作流语法

🔍 搜索工具

  • search_n8n_nodes - 使用关键词搜索 n8n 节点
  • search_workflow - 搜索社区 n8n 工作流模板

🛠 安装与构建

必需条件

  • Go 1.23 或更高版本

构建方法

🚀 单独模式(推荐)

在构建时将所有 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 命令运行

# 单独模式(默认)
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

🔧 Claude Code & Cursor 设置

macOS 设置

配置文件位置:~/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}"
    }
  }
}

Windows 设置

配置文件位置:%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

📊 模式比较

功能单独模式文件系统模式
部署便利性✅ 单一可执行文件❌ 需要额外文件
运行速度✅ 快速✅ 快速
内存使用量⚠️ 稍高✅ 较低
开发便利性⚠️ 需要重新构建✅ 实时反映
生产环境✅ 推荐❌ 不推荐
开发环境✅ 可用✅ 推荐

🔗 相关链接