mcpField
G
GitLab MCP Server

GitLab MCP Server

本地服务
github.com/Foxhunt版本控制122 周前更新

关于 GitLab MCP Server

GitLab MCP Server 是面向自托管 GitLab 用户的 TypeScript MCP 服务,可通过工具浏览和搜索项目、议题、待办事项及 Wiki 页面,并读取议题评论。

主要功能

  1. 01列出可访问的项目
  2. 02筛选和获取议题
  3. 03读取议题评论
  4. 04搜索项目和议题
  5. 05获取待办事项及 Wiki 页面

适用场景

  1. 01查看项目议题及其评论
  2. 02从 MCP 客户端搜索项目和议题

MCP 相关

它向 MCP 客户端提供 GitLab 项目、议题、待办事项、搜索和 Wiki 操作工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

GitLab MCP 服务

与 GitLab 服务交互。

这是一个基于 TypeScript 的 MCP 服务,可与自托管的 GitLab 实例交互。该服务提供用于获取和管理 GitLab 数据的工具,具体包括项目、议题和议题备注(评论)。可用工具包括:list_projects、get_issues、get_issue_notes、search、get_issue、get_todos、get_wiki_page 和 list_wiki_pages。

功能

此 GitLab MCP 服务提供以下工具:

  • list_projects:列出用户有权访问的所有项目。
  • get_issues:获取特定项目的议题,并支持基本筛选。
  • get_issue_notes:获取特定议题的备注(评论)。
  • search:根据搜索词搜索项目和议题。
  • get_issue:使用议题 ID 和 IID,从项目中获取特定议题。
  • get_todos:获取待办事项列表,并支持可选筛选条件。
  • get_wiki_page:根据项目 ID 和 slug 获取特定 Wiki 页面。
  • list_wiki_pages:获取指定项目的所有 Wiki 页面。

开发

安装依赖:

npm install

构建服务:

npm run build

开发时自动重新构建:

npm run watch

安装

要在 Claude Desktop 中使用,请添加服务配置:

{
  "mcpServers": {
    "gitlab-server": {
      "command": "/path/to/gitlab-server/build/index.js",
      "env": {
        "GITLAB_API_TOKEN": "<Gitlab API Token >",
        "GITLAB_HOST": "<GitLab Host URL>"
      }
    }
  }
}
调试

由于 MCP 服务通过 stdio 通信,调试可能会比较困难。我们推荐使用 MCP Inspector,它可作为包脚本使用:

npm run inspector

Inspector 会提供一个 URL,供你在浏览器中访问调试工具。

GitLab API 文档

https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/api https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/rest/_index.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/rest/authentication.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/projects.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/issues.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/notes.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/issue_links.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/search.md https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/api/wikis.md

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。