第一个gitlab mcp,一起搭建
概览
📖 安装指南、环境变量和完整的工具参考资料都在线托管文档网站上。 一个面向AI客户端的综合GitLab MCP服务器。通过stdio、SSE和可流式HTTP,管理项目、合并请求、问题、流水线、维基、发布、标签、里程碑等。 支持PAT、OAuth、只读模式、动态API URL以及VS Code、Claude、Cursor、Copilot及其他MCP客户端的远程授权。 - 广泛的 GitLab 覆盖 — 项目、仓库浏览、合并请求、问题、流水线、维基、发布、标签、标签、里程碑等 - 灵活认证 — 个人访问令牌、本地 OAuth2 浏览器流程、MCP OAuth 代理及按请求远程授权 - 多传输 — 本地客户端 stdio,遗留客户端 SSE,现代远程部署 可流式 HTTP - 客户端友好配置 — Claude Code、Codex、Antigravity、OpenCode、Copilot、Cline、Roo Code、Cursor、Kilo Code 和 Amp Code 示例 - 自托管准备 — 支持自定义......
概述(AI 翻译)
英语 |한국어 |简体中文 |葡萄牙(巴西)
📖 文档→ 设置指南、环境变量和完整工具参考资料均可在托管文档网站上实时提供。
使用推荐的本地个人访问令牌设置安装@zereight/mcp-gitlab。这些命令使用与Claude代码和Codex指南相同的参数。
先用 npm install -g @zereight/mcp-gitlab 安装 zereight-mcp-gitlab 二进制文件,或者用自制软件 brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp 和 brew install zereight/gitlab-mcp/zereight-mcp-gitlab。
读取无回声的令牌,然后导出。shell历史会保留变量名。
| 客户端 | 安装 |
|---|---|
| 克劳德代码 | claude mcp add gitlab --transport stdio --scope local --env GITLAB_PERSONAL_ACCESS_TOKEN="$GITLAB_PERSONAL_ACCESS_TOKEN" --env GITLAB_API_URL=https://gitlab.com/api/v4 -- zereight-mcp-gitlab |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
GitLab MCP Server
English | 한국어 | 简体中文 | Português (Brasil)
📖 Documentation → · llms.txt · llms-full.txt
Default: 40 tools (38 core + discover_tools + help). 287 tools exist in total (284 in toolsets + execute_graphql + discover_tools + help). Start lean; call discover_tools to activate more for this session.
Install the zereight-mcp-gitlab binary first with npm install -g @zereight/mcp-gitlab, or Homebrew brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp and brew install zereight/gitlab-mcp/zereight-mcp-gitlab. Official MCP Registry listing: io.github.zereight/gitlab-mcp. One-liner: npx -y @zereight/mcp-gitlab@latest.
Without → With
| Without this MCP | With this MCP |
|---|---|
| Paste MR URLs and diffs into chat | list_merge_request_changed_files → batched get_merge_request_file_diff |
| Hunt job logs in the GitLab UI | get_pipeline_job_output with pagination |
| Re-explain the project path every turn | project_id=group%2Fproject and merge_request_iid=123 |
Three install paths
| Path | When | How |
|---|---|---|
| Local IDE | Cursor, Claude Code, Codex on your machine | stdio + PAT or local OAuth |
| Shared HTTP | Team or hosted MCP | Streamable HTTP URL + remote auth or MCP OAuth |
| Claude.ai | Claude web connectors | Public HTTPS + GITLAB_MCP_OAUTH |
Install
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add zereight/gitlab-mcp