Activepieces MCP服务器
模型上下文协议(MCP)服务器,使Claude等AI助手能够与Activepieces工作流交互。基于TypeScript构建,灵感来自n8n-mcp项目。
🚀 特性
- 完整的流程管理:创建、读取、更新、删除、启用/禁用流
- 执行控制:触发流、监视运行、检索执行日志
- 工件管理:列出并探索可用的集成
- 项目管理:访问和管理Activepieces项目
- 健康监测:检查实例运行状况和诊断
- 多个部署选项:NPM、Docker、Docker Compose
📋 先决条件
- Node.js 18+(用于NPM安装)
- Docker(用于容器部署)
- Activepieces实例(自托管或云)
- Activepieces API密钥(从管理控制台>设置>API密钥生成)
🔧 安装
选项1:NPM包(推荐)
# Install globally
npm install -g activepieces-mcp
# Or run directly with npx
npx activepieces-mcp选项2:Docker
# Pull the image
docker pull activepieces-mcp:latest
# Run the container
docker run -i --rm \
-e ACTIVEPIECES_API_URL="https://your-instance.activepieces.com/api/v1" \
-e ACTIVEPIECES_API_KEY="your-api-key" \
-e MCP_MODE=stdio \
-e LOG_LEVEL=error \
-e DISABLE_CONSOLE_OUTPUT=true \
activepieces-mcp:latest选项3:Docker编写
# Clone the repository
git clone https://github.com/yourusername/activepieces-mcp.git
cd activepieces-mcp
# Create .env file
cp .env.example .env
# Edit .env with your credentials
# Start the server
docker-compose up -d方案4:地方发展
# Clone the repository
git clone https://github.com/yourusername/activepieces-mcp.git
cd activepieces-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run the server
npm start⚙️ 配置
环境变量
创建一个 .env 项目根目录中的文件:
# Activepieces Instance Configuration
ACTIVEPIECES_API_URL=https://your-instance.activepieces.com/api/v1
ACTIVEPIECES_API_KEY=your-api-key-here
# MCP Server Configuration
MCP_MODE=stdio
LOG_LEVEL=error
DISABLE_CONSOLE_OUTPUT=true获取API密钥
- 登录到您的Activepieces实例
- 引导到 管理控制台 > 设置 > API密钥
- 点击 创建API密钥
- 复制生成的密钥(以开头
sk-)
🤖 Claude桌面配置
NPM安装
添加到您的Claude Desktop配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"activepieces": {
"command": "npx",
"args": ["activepieces-mcp"],
"env": {
"ACTIVEPIECES_API_URL": "https://your-instance.activepieces.com/api/v1",
"ACTIVEPIECES_API_KEY": "your-api-key",
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true"
}
}
}
}Docker安装
{
"mcpServers": {
"activepieces": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "ACTIVEPIECES_API_URL=https://your-instance.activepieces.com/api/v1",
"-e", "ACTIVEPIECES_API_KEY=your-api-key",
"-e", "MCP_MODE=stdio",
"-e", "LOG_LEVEL=error",
"-e", "DISABLE_CONSOLE_OUTPUT=true",
"activepieces-mcp:latest"
]
}
}
}本地安装
{
"mcpServers": {
"activepieces": {
"command": "node",
"args": ["/absolute/path/to/activepieces-mcp/dist/mcp/index.js"],
"env": {
"ACTIVEPIECES_API_URL": "https://your-instance.activepieces.com/api/v1",
"ACTIVEPIECES_API_KEY": "your-api-key",
"MCP_MODE": "stdio",
"LOG_LEVEL": "error",
"DISABLE_CONSOLE_OUTPUT": "true"
}
}
}
}配置后,重新启动Claude Desktop。
📚 可用工具
流量管理
list_flows-列出所有带有可选过滤器的流get_flow-获取详细的流量信息create_flow-创建新流delete_flow-删除流enable_flow-启用流disable_flow-禁用流
流程运行管理
list_flow_runs-列表流执行运行get_flow_run-获取详细的跑步信息trigger_flow-手动触发流量delete_flow_run-删除流程运行记录
工件管理
list_pieces-列出可用集成get_piece-获取工件详细信息
项目管理
list_projects-列出所有项目get_project-获取项目详细信息
系统工具
health_check-检查实例运行状况list_tools-列出所有可用工具diagnostics-获取连接诊断
💡 使用示例
示例1:列出所有流程
问克劳德:
Can you list all my Activepieces flows?示例2:创建新流
问克劳德:
Create a new flow called "Email Notification" in project proj_abc123示例3:触发流
问克劳德:
Trigger the flow with ID flow_xyz789 with this data: {"email": "user@example.com", "message": "Hello"}示例4:监控流量运行
问克劳德:
Show me all failed flow runs from the last hour示例5:获取流详细信息
问克劳德:
Get the details of flow flow_abc123 and explain what it does🏗️ 项目结构
activepieces-mcp/
├── src/
│ ├── api/
│ │ └── client.ts # Activepieces API client
│ ├── mcp/
│ │ ├── index.ts # Main entry point
│ │ ├── server.ts # MCP server implementation
│ │ └── tools.ts # Tool definitions and handlers
│ ├── types/
│ │ └── activepieces.ts # TypeScript type definitions
│ └── utils/ # Utility functions
├── dist/ # Compiled JavaScript
├── tests/ # Test files
├── Dockerfile # Docker image definition
├── docker-compose.yml # Docker Compose configuration
├── package.json # NPM package configuration
├── tsconfig.json # TypeScript configuration
├── .env.example # Environment variable template
└── README.md # This file🔨 发展
构建项目
npm run build以开发模式运行
npm run dev运行测试
npm testLint代码
npm run lint清洁建筑
npm run clean
npm run rebuild🐛 故障排除
连接问题
- 验证API URL:确保您的
ACTIVEPIECES_API_URL以...结束/api/v1 - 检查API密钥:验证您的API密钥是否有效,并以开头
sk- - 测试连接:使用
diagnostics检查连接的工具
克劳德桌面未检测到服务器
- 重新启动克劳德桌面 配置更改后完全
- 检查配置文件:确保JSON有效(没有尾随逗号)
- 验证路径:对本地安装使用绝对路径
- 检查日志:查找Claude Desktop日志中的错误
Docker问题
- 检查容器日志:
docker logs activepieces-mcp - 验证环境变量:确保设置了所有必需的变量
- 网络接入:确保容器可以到达您的Activepieces实例
🤝 贡献
欢迎投稿!请随时提交拉取请求。
- 克隆该仓库
- 创建功能分支(
git checkout -b feature/AmazingFeature) - 提交您的更改(
git commit -m 'Add some AmazingFeature') - 推到分支(
git push origin feature/AmazingFeature) - 打开拉取请求
📄 许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
🙏 致谢
- 受...启发 n8n mcp 罗穆阿尔德·楚隆科夫斯基
- 与 模型上下文协议SDK
- 由...驱动 活性片
📞 支持
- 问题:
- 讨论:
- Activepieces社区: 社区论坛
🗺️ 路线图
- \[\]支持远程访问的HTTP模式
- \[\]Webhook管理工具
- \[\]连接管理工具
- \[\]流模板管理
- \[\]批量操作支持
- \[\]高级过滤和搜索
- \[\]流程验证和测试工具
- \[\]性能指标和分析
______________________________________________________________________
内置于❤️ Activepieces社区
