
GitLab MCP Server
io.github.sumirati由 GitHub 帳號 sumirati 發布v3.2.0更新於 Oct 24, 2026
Developer-ready GitLab MCP server for CE and EE instances.
發布方自己的服務:Gitlab
概覽
在本機執行的 GitLab MCP 伺服器,讓助理在 GitLab.com 或自架執行個體上讀取與管理專案、分支、提交、合併請求、議題與 CI/CD 流水線。
- 可以做什麼
- 透過精簡的混合工具入口探索並執行 14 個領域的 GitLab 操作,也可選擇直接暴露全部 90 個動作。讀取儲存庫:檔案內容、目錄樹、專案中繼資料、分支、提交與差異。管理儲存庫與分支:建立、更新、分支複製和刪除專案,建立和刪除分支,設定分支保護。處理合併請求、議題、里程碑、標籤、Wiki 和程式碼片段,包括差異討論與議題備註。檢視和控制 CI/CD:列出、觸發、取消和重試流水線,讀取作業日誌、建置產物和 JUnit 測試報告,管理專案 CI/CD 變數。檢查執行個體健康、Runner、推送鏡像和 Webhook。
- 適用情境
- 適合讓助理在不複製儲存庫的情況下操作 GitLab:審查合併請求與差異、排查流水線失敗和作業日誌、讀取原始碼,或透過 API 提交程式碼和變更分支。僅需檢視的情境可使用唯讀模式。
- 執行需求
- 透過 npx 或全域 npm 安裝在本機執行,需要 Node.js。需要在 GITLAB_PERSONAL_ACCESS_TOKEN 中提供具 api 權限的 GitLab 個人存取權杖,並能連線至 GitLab 執行個體。GITLAB_API_URL 用於指向自架 CE/EE 執行個體,預設為 GitLab.com。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 GitLab MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
GitLab MCP Server (@sumirati/mcp-gitlab)
A modern, 2026 AI-native Model Context Protocol (MCP) server for GitLab API v4, engineered for self-hosted GitLab Community Edition (CE), Enterprise Edition (EE), and GitLab.com.
[npm version] [License: MIT] [GitHub] [GitLab]
What makes v3.0.0 Unique: The 2026 5-Tool Hybrid Standard
In early MCP servers, dumping 50–100 tools into the client's tool list consumed 10,000+ prompt context tokens on every turn ("System Prompt Tax") and resulted in poor Coherence ratings on the Glama TDQS rubric.
@sumirati/mcp-gitlab v3 solves this with a 5-Tool Hybrid Surface:
- Glama TDQS Coherence Tier A (5/5): By exposing exactly 5 tools to the client, the server sits in the ideal 3–15 tool coherence sweet spot.
- Ultra-Lean System Prompt Tax: Drops schema overhead from 27,681 tokens to 1,292 tokens (95.3% reduction), preserving context windows and maximizing LLM prompt-cache hits.
- Zero-Hop Hourly Drivers: The 3 operations developers and agents actually use constantly during pair-programming (
get_file_contents,get_project,get_commit) remain eager tools for instant zero-hop execution. - 100% Platform Access on Demand: The entire platform surface of 90 actions across 14 domains is accessible on-demand via dynamic action discovery (
gitlab_find_actions$\rightarrow$gitlab_execute_action), delivering 75%–96% token savings with default high-density Markdown tables and summaries (format: "markdown" | "json"). - Resilient Fallback: If an agent directly invokes any catalog action name (e.g.
list_pipelines), the server dynamically executes it with full input validation and projection.
Core Capabilities Across 14 Domains
- Enterprise Observability & Self-Hosted Operations:
- System Health Diagnostics: End-to-end connectivity, token identity verification, and API latency testing (
system_health_check). - Push Mirrors: Verify upstream replication to remote Git hosts (
list_push_mirrors) and force immediate sync (trigger_push_mirror_sync). - CI Runners: Audit runner health, online/paused status, and tags (
list_runners,get_runner_status). - Webhooks: Inspect registered automation hooks (
list_project_hooks).
- System Health Diagnostics: End-to-end connectivity, token identity verification, and API latency testing (
- Repository & Branch Governance: Project CRUD, group hierarchy resolution (
buggycode/project-name), branch lifecycle, branch protection management (list_protected_branches,protect_branch,unprotect_branch), file/directory reading (get_file_contents), and atomic multi-file commits (push_files,create_commit). - CI/CD Observability: Query pipelines by status, trigger/cancel/retry pipelines (
create_pipeline,cancel_pipeline,retry_pipeline), tail failed job logs (get_job_trace) without token blowout, read build artifacts (get_job_artifact_file), and inspect JUnit test reports (get_pipeline_test_report). - Merge Request Reviews & Diff Discussions: Two-stage diff inspection (
get_merge_request_changes), automated lockfile pruning (package-lock.json), and inline diff discussions with SHA coordinate resolution (create_diff_discussion). - Issues & Task Planning: CRUD issues, track blockers/dependencies (
list_issue_links,create_issue_link), and add progress notes (list_issue_notes,create_issue_note). - Milestones & Labels: Human-readable milestone resolution, label creation, and scoped milestone inspection.
- Wikis & Snippets: Documentation outline slicing (
toc_only: true), chapter extraction, and snippet management. - User & Identity Context: Authenticated identity lookup, group enumeration and creation (
create_group), and owned project discovery.
Quickstart & Installation
Option 1: Run with npx (No installation needed)
Option 2: Install Globally
Option 3: Local Clone
Environment Configuration
Client Configuration
Google Antigravity / Claude Desktop / Cursor
Add to your MCP configuration file (mcp_config.json or claude_desktop_config.json):
Complete Action Catalog Reference (90 Actions across 14 Domains)
All 90 actions feature strict input validation and field-mask projections:
1. The 5 Client-Exposed Tools (Hybrid Mode)
2. Enterprise & Self-Hosted Operations (enterprise — 6 actions)
3. Repository & Project Management (repositories — 10 actions)
4. Branch Governance (branches — 7 actions)
5. Git Commits & History (commits — 2 actions)
6. Pipelines & CI/CD Observability (pipelines — 10 actions)
7. Merge Requests & Code Reviews (merge-requests — 12 actions)
8. Issues & Roadmaps (issues — 8 actions)
9. Milestones & Labels (milestones — 6 actions)
10. Releases & Tags (releases — 5 actions)
11. Project Collaborators & Roles (members — 5 actions)
12. CI/CD Environment Variables (variables — 5 actions)
13. Wikis & Documentation (wikis — 4 actions)
14. Snippets & Code Pastes (snippets — 4 actions)
15. User & Group Context (user — 6 actions)
Benchmarks: Token Economy in Action
Reproducible deterministic benchmark (node test/benchmark-test.js & node test/catalog-execution-test.js) measured against canonical GitLab REST API v4 payloads (test/fixtures/gitlab-api-v4-fixtures.js, token count = Math.ceil(utf8Bytes / 4)):
Complete 90-Action Catalog Benchmark (Across All 14 Domains)
Measured across all 90 handlers via node test/catalog-execution-test.js:
Key Token Optimization Pillars:
- Smart Diff & Lockfile Truncation: Commit diffs (
get_commit) and MR changes (get_merge_request_changes) automatically collapse dependency lockfiles (package-lock.json,pnpm-lock.yaml,yarn.lock,go.sum,Cargo.lock,*.min.js) viaignore_lockfiles: trueby default, saving 1,000–3,000 tokens per review. Passignore_lockfiles: falseif full lockfile diffs are required. - Conservative Default Pagination: All list actions default to
per_page: 10(max: 100), eliminating token waste from loading 20–50 items when only recent entries are needed. - Default High-Density Markdown Format: Discovery (
gitlab_find_actions), execution (gitlab_execute_action), project info (get_project), file inspection (get_file_contents), and commit inspection (get_commit) default toformat: "markdown", yielding 75%–96% token reductions for structured metadata. - Recursive Output Projection Filter (
projectOutput): Strips GitLab REST API v4 noise metadata keys (_links,avatar_url,references,time_stats,task_completion_status,commands_changes,user_notes_count,merge_requests_count,upvotes,downvotes,subscribed,has_tasks,service_desk_reply_to,moved_to_id,container_expiration_policy,permissions, and null/empty fields) before payloads reach LLM context.
Roadmap
Upcoming (v3.2)
- Upstream indexed filtering & strict pagination caps (
state,labels,milestone,author_id,assignee_id) - Client error resilience (401 probe disambiguation, 403 insufficient scope, 429 rate limit backoff, 201 ghost write guard)
- Hardened output projection with recursion depth guard (
maxDepth = 32) and empty collection preservation - Nested subgroup hierarchy management (
create_groupwithparent_id) - Smart CI/CD failure log extraction & ANSI sequence stripping in
get_job_trace(strip_ansi,smart_failure) - Outline-first code symbol extraction & line range slicing in
get_file_contents(outline_only,start_line,end_line) - Pre-flight mergeability & conflict verification (
get_mergeability) - Token scope self-auditing & permission pre-flight
Future Horizons (v3.x)
- Standardized collection
_summaryheaders to facilitate multi-turn history pruning in LiteLLM / Eigent agent orchestration - Remote Transports: Streamable SSE and HTTP remote server modes
- Scoped GraphQL query engine for relational deep inspections
- DevSecOps vulnerability & secret scanning alert queries
- Scoped & rate-guarded code search within project repositories
Acknowledgements & Lineage
This project incorporates architectural concepts, schemas, and patterns from:
@modelcontextprotocol/server-gitlab(MIT License) — Copyright (c) 2024 Anthropic, PBC / GitLab, PBC. Baseline repository and file schema patterns.@modelcontextprotocol/sdk(MIT License) — Copyright (c) Anthropic, PBC.zod(MIT License) — Colin McDonnell.- GitLab REST API v4 — GitLab, PBC.
jmrplens/gitlab-mcp-server— Dynamic action discovery and meta-dispatcher pattern concepts.- Architectural patterns evaluated from
Vijay-Duke/mcp-gitlabandzereight/gitlab-mcp.
See NOTICE for complete third-party attribution details.
License
This project is licensed under the MIT License — Copyright (c) 2026 [email protected].
來源:README.md,提交 7fcec0c
工具
0版本歷史
5- v3.2.0最新Oct 17, 2026
- v3.1.0Oct 16, 2026
- v2.1.0Oct 15, 2026
- v2.0.0Oct 15, 2026
- v1.0.1Oct 14, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Gitlab 整合
Gitlab
com.gitlab官方發布者
Gitlab 的託管 MCP 服務,由 gitlab.com 發布;需要憑證;Streamable HTTP。

Gitlab Mcp
由 GitHub 帳號 mmedum 發布
本機 stdio MCP 伺服器,讓助理以你的身分在 gitlab.com 專案中工作:議題、合併請求、審查、儲存庫與 CI。

Gitlab Ci Break Lint
由 GitHub 帳號 jmshinhwa 發布
一個本機 MCP 伺服器,用來標出 .gitlab-ci.yml 中在下一次 GitLab 主要版本升級後會被 runner 拒絕的行。

Gitlab Mcp
由 GitHub 帳號 mrfentmen 發布
讓助理不需 API 金鑰就能查詢 GitLab 上的公開專案與使用者資訊。
GitLab MCP Server
由 GitHub 帳號 zereight 發布
在本機執行的 GitLab MCP 伺服器,讓助理透過 GitLab API 處理專案、合併請求、議題、流水線、Wiki 與發行。