article
README
🚀 GitLab 看板 MCP 服务器
GitLab 看板 MCP 服务器是一个用于管理 GitLab 看板操作的模型上下文协议(Model Context Protocol)服务器,它能帮助用户高效地对 GitLab 看板上的任务进行各类操作。
🚀 快速开始
📦 安装
npm install
🔧 配置
创建一个 .env 文件,并添加以下环境变量:
GITLAB_TOKEN=your_gitlab_token
GITLAB_URL=your_gitlab_url # 默认: https://gitlab.com
🛠️ 构建
npm run build
开发时使用自动重建:
npm run watch
✨ 主要特性
🛠️ 可用工具
list_tasks- 获取项目看板的任务列表create_task- 在看板上创建新任务update_task- 更新现有任务delete_task- 从看板删除任务add_comment- 向任务添加评论
🏗️ 项目结构
src/
├── api/
│ └── gitlab.ts # GitLab API 客户端和方法
├── config/
│ └── gitlab.ts # GitLab 配置
├── tools/
│ ├── handlers.ts # 工具处理程序实现
│ └── schemas.ts # 工具模式定义
└── index.ts # MCP 服务器主入口点
🔍 调试
由于 MCP 服务器通过标准输入输出进行通信,我们建议使用 MCP 检查器:
npm run inspector
📝 使用说明
控制台配置
将以下内容添加到你的 cline_mcp_settings.json 文件中:
{
"mcpServers": {
"gitlab-kanban-mcp-server": {
"command": "node",
"args": ["path/to/gitlab-kanban-mcp-server/build/index.js"],
"env": {
"GITLAB_TOKEN": "your_gitlab_token",
"GITLAB_URL": "your_gitlab_url"
}
}
}
}
🤝 贡献
- 叉击此仓库
- 创建你的功能分支(
git checkout -b feature/amazing-feature) - 提交你的更改(
git commit -m '✨ feat: Add amazing feature') - 推送到分支(
git push origin feature/amazing-feature) - 创建 Pull Request
📄 许可证
此项目采用 MIT License 许可证。
微信扫一扫