Tonle OpenProject MCP服务器
模型上下文协议(MCP)服务器,将人工智能助手(Claude、Cursor、Windsurf等)连接到OpenProject的API v3。
快速开始
1.安装Bun
curl -fsSL https://bun.sh/install | bash2.克隆和安装
git clone https://github.com/liratanak/tonle.git
cd tonle
bun install3.配置环境
创建一个 .env 文件或设置环境变量:
OPENPROJECT_URL=https://your-instance.openproject.com
OPENPROJECT_API_KEY=your-api-key-here获取API密钥:
- 登录OpenProject→ 我的账户→ 访问令牌→ 生成
4.运行服务器
# Stdio mode (default)
bun run index.ts
# HTTP mode
bun run start:http5.使用MCP检查员进行测试
bunx @modelcontextprotocol/inspector bun run index.ts与MCP客户端一起使用
添加到您的MCP客户端配置中(例如。, claude_desktop_config.json, .cursor/mcp.json):
{
"mcpServers": {
"openproject": {
"command": "bun",
"args": ["run", "/absolute/path/to/tonle/index.ts"],
"env": {
"OPENPROJECT_URL": "https://your-instance.openproject.com",
"OPENPROJECT_API_KEY": "your-api-key-here"
}
}
}
}配置文件位置:
- 克劳德桌面版 (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - 克劳德桌面版 (Windows):
%APPDATA%\Claude\claude_desktop_config.json - 克劳德桌面版 (Linux):
~/.config/Claude/claude_desktop_config.json - 光标:
.cursor/mcp.json在项目根中
你能做什么
连接后,您可以要求您的AI助手:
- “列出我的所有OpenProject项目”
- 在项目X中创建一个名为“设置测试环境”的新任务
- “显示分配给我的所有工作包”
- 将工作包#123更新为“进行中”状态
- 还有更多。..
文档
- 建筑.md -技术架构、实现细节和API参考
- MCP_SERVERS.md -客户端特定配置示例(如果可用)
- LOGGING.md -全面的测井系统文档
特性
- ✅ 完整的OpenProject API v3覆盖范围(40多个端点类别)
- ✅ 工作包、项目、用户、时间条目等
- ✅ 标准运输(本地客户)
- ✅ HTTP传输(远程客户端)
- ✅ 使用TypeScript和Zod验证的类型安全
- ✅ 综合日志记录系统(按呼叫者/发起者记录每日日志)
故障排除
| 问题 | 解决方案 |
|---|---|
| 服务器未出现 | 检查绝对路径 index.ts,重新启动客户端 |
| 身份验证错误 | 验证API密钥是否正确并具有权限 |
| 连接超时 | 检查 OPENPROJECT_URL 可访问 |
| 找不到Bun命令 | 确保Bun已安装并位于PATH中 |
贡献
git clone https://github.com/liratanak/tonle.git
cd tonle
bun install
bun run dev # Development mode
bun test # Run tests看 建筑.md 了解详细的开发信息。
许可证
MIT许可证-有关详细信息,请参阅许可证文件
资源
- 打开项目: https://www.openproject.org/docs/
- OpenProject API: https://www.openproject.org/docs/api/
- MCP规范: https://spec.modelcontextprotocol.io/
- MCP-SDK: https://github.com/modelcontextprotocol/typescript-sdk
