基于 Model Context Protocol (MCP) 框架构建的 GitLab 集成服务器,提供多种 GitLab RESTful API 工具,支持 Claude、Smithery 等平台集成。
# 安装依赖
bun install
# 构建项目
bun run build
# 启动服务
bun run start
GITLAB_API_URL=https://your-gitlab-instance.com
GITLAB_TOKEN=your_access_token
详见 USAGE.md,包括每个工具的参数示例。
src/
├── server/
│ └── GitlabMCPServer.ts # MCP 服务器入口
├── tools/
│ ├── GitlabAcceptMRTool.ts
│ ├── GitlabCreateMRCommentTool.ts
│ ├── GitlabGetUserTasksTool.ts
│ ├── GitlabRawApiTool.ts
│ ├── GitlabSearchProjectDetailsTool.ts
│ ├── GitlabSearchUserProjectsTool.ts
│ └── gitlab/
│ ├── FieldFilterUtils.ts
│ ├── GitlabApiClient.ts
│ └── GitlabApiTypes.ts
├── utils/
│ ├── is.ts
│ └── sensitive.ts
smithery.json # Smithery 配置
USAGE.md # 使用示例
package.json
tsconfig.json
在配置文件中添加:
{
"mcpServers": {
"@zephyr-mcp/gitlab": {
"command": "npx",
"args": ["-y", "@zephyr-mcp/gitlab@0.1.0"]
}
}
}
配置参数:
GITLAB_API_URL
: GitLab API 的基础 URLGITLAB_TOKEN
: 用于验证 GitLab API 请求的访问令牌
{
"mcpServers": {
"@zephyr-mcp/gitlab": {
"env": {},
"args": [
"-y",
"@zephyr-mcp/gitlab@0.1.0"
],
"command": "npx"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.