ZephyrDeng

mcp-gitlab MCP Server

Community ZephyrDeng
Updated

基于 Model Context Protocol (MCP) 框架构建的 GitLab 集成服务器,提供与 GitLab 实例的强大集成能力

English Version

Build Status License Node Version npm version Downloads GitHub stars smithery badge

基于 Model Context Protocol (MCP) 框架构建的 GitLab 集成服务器,提供多种 GitLab RESTful API 工具,支持 Claude、Smithery 等平台集成。

功能概览

  • GitlabSearchUserProjectsTool:根据用户名搜索用户及其活跃项目
  • GitlabGetUserTasksTool:获取当前用户的待办任务
  • GitlabSearchProjectDetailsTool:搜索项目及详细信息
  • GitlabCreateMRCommentTool:为合并请求添加评论
  • GitlabAcceptMRTool:接受并合并合并请求
  • GitlabUpdateMRTool:更新 Merge Request 的指派人、评审人、标题、描述、标签
  • GitlabCreateMRTool:创建新的 Merge Request,支持指派 assignee 和 reviewers
  • GitlabRawApiTool:自定义调用任意 GitLab API

快速开始

# 安装依赖
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

集成方式

Claude 桌面客户端

在配置文件中添加:

{
  "mcpServers": {
    "@zephyr-mcp/gitlab": {
      "command": "npx",
      "args": ["-y", "@zephyr-mcp/[email protected]"]
    }
  }
}

配置参数:

  • GITLAB_API_URL: GitLab API 的基础 URL
  • GITLAB_TOKEN: 用于验证 GitLab API 请求的访问令牌

相关链接

MCP Server · Populars

MCP Server · New

    chatmcp

    mcpso

    directory for Awesome MCP Servers

    Community chatmcp
    TBXark

    MCP Proxy Server

    An MCP proxy server that aggregates and serves multiple MCP resource servers through a single HTTP server.

    Community TBXark
    ttommyth

    interactive-mcp

    Ask users questions from your LLM! interactive-mcp: Local, cross-platform MCP server for interactive prompts, chat & notifications.

    Community ttommyth
    lpigeon

    ros-mcp-server

    The ROS MCP Server is designed to support robots in performing complex tasks and adapting effectively to various environments by providing a set of functions that transform natural language commands, entered by a user through an LLM, into ROS commands for robot control.

    Community lpigeon
    emicklei

    melrose-mcp

    interactive programming of melodies, producing MIDI

    Community emicklei