
Gitlab Ci Mcp
io.github.mshegolev由 GitHub 帳號 mshegolev 發布v0.5.1更新於 Oct 24, 2026
GitLab CI/CD MCP — pipelines, jobs, schedules, MRs, files. Any GitLab (SaaS or self-hosted).
發布方自己的服務:Gitlab
概覽
本機 MCP 伺服器,讓助理檢視與操作 GitLab CI/CD:流水線、作業與日誌、排程、分支、標籤、合併請求及儲存庫檔案。
- 可以做什麼
- 列出、檢視、觸發、重試與取消流水線;讀取作業日誌並支援正規表達式過濾與上下文行;產生 7 天或 30 天的流水線健康摘要。列出、建立、更新與刪除流水線排程。列出分支與標籤,並比較分支差異。列出與檢視合併請求、查看其變更、建立合併請求並執行合併。讀取儲存庫檔案、列出儲存庫目錄樹並取得專案資訊。以 MCP 資源形式提供專案資訊與 CI 設定。
- 適用情境
- 適合讓助理排查失敗的流水線、讀取體積很大的 CI 日誌、查看流水線健康度、管理排程,或在 GitLab(包含企業代理後的自架實例)上建立與合併合併請求。
- 執行需求
- 以 Python 套件形式在本機執行(Python 3.10 以上),透過 uvx 或 pipx 啟動,使用 stdio 傳輸。需要 GITLAB_URL、GITLAB_TOKEN(具備 api 權限範圍的個人存取權杖)與 GITLAB_PROJECT_PATH。可選 GITLAB_SSL_VERIFY 與 GITLAB_NO_PROXY_DOMAINS。需要能連線至 GitLab 實例的網路,並受 GitLab API 速率限制約束。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gitlab Ci Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gitlab-ci-mcp
[PyPI] [Python] [License: MIT] [Downloads]
MCP server for GitLab CI/CD. Lets an LLM agent (Claude Code, Cursor, OpenCode, DevX Agent, etc.) work with pipelines, jobs, schedules, branches, tags, merge requests and repository files.
Python, FastMCP, stdio transport.
Works with any GitLab — SaaS gitlab.com or self-hosted / on-prem. Designed with corporate networks in mind: configurable NO_PROXY handling, optional SSL-verify toggle, per-project scoping via env vars.
Design highlights
- Tool annotations — every tool carries
readOnlyHint/destructiveHint/idempotentHint/openWorldHintso MCP clients can classify operations (e.g. ask for confirmation only on destructive ones likegitlab_merge_mr,gitlab_delete_schedule). - Structured output on every tool — each tool declares a TypedDict return type, so FastMCP auto-generates an
outputSchemaand every result carriesstructuredContentalongside a pre-rendered markdown text block. Clients that can render structured data use it; agents that prefer compact text get the markdown. Noresponse_formatparameter needed. - Structured errors — authentication, 404, 403, 429 (rate-limit), 5xx, missing-env errors are converted to actionable
ToolErrormessages (e.g. "GitLab authentication failed… verify GITLAB_TOKEN hasapiscope") and surfaced asisError=Trueresults. - Pydantic input validation — every argument has typed constraints (ranges, lengths, literals) auto-exposed as JSON Schema.
- Project scoping per call — every tool accepts an optional
project_paththat overridesGITLAB_PROJECT_PATHfor cross-project queries. - Pagination — list tools return a
paginationblock withpage,total,has_more,next_pageand a next-page hint in the markdown footer. - MCP Context integration —
gitlab_pipeline_healthandgitlab_get_job_logareasyncand emitinfologs /report_progressevents through the MCP Context so clients can show progress bars. - MCP Resources —
gitlab://project/infoandgitlab://project/ci-configmirror common lookups for clients that prefer the Resource model over tools. - Lifespan management —
python-gitlabHTTP sessions are closed cleanly on server shutdown via anasynccontextmanagerlifespan hook. - Log grep —
gitlab_get_job_logacceptsgrep_pattern+grep_context(surrounding lines) for regex-filtering megabyte-scale CI logs without pulling the whole trace into agent context.
Threading model
FastMCP automatically runs synchronous tools in a worker thread
(anyio.to_thread.run_sync), so they do not block the asyncio event loop —
python-gitlab is a synchronous library and wrapping every call in
asyncio.to_thread ourselves would be ceremony. Tools that benefit from the
MCP Context (progress, info logs) are written as async def and explicitly
wrap python-gitlab calls with asyncio.to_thread.
Features
23 tools covering the everyday CI/CD surface:
Pipelines
gitlab_list_pipelines · gitlab_get_pipeline · gitlab_get_pipeline_jobs · gitlab_get_job_log · gitlab_trigger_pipeline · gitlab_retry_pipeline · gitlab_cancel_pipeline · gitlab_pipeline_health
Schedules
gitlab_list_schedules · gitlab_create_schedule · gitlab_update_schedule · gitlab_delete_schedule
Branches & tags
gitlab_list_branches · gitlab_list_tags · gitlab_compare_branches
Merge requests
gitlab_list_merge_requests · gitlab_get_merge_request · gitlab_get_merge_request_changes · gitlab_create_merge_request · gitlab_merge_mr
Repository & project
gitlab_get_file · gitlab_list_repository_tree · gitlab_project_info
Pipeline health report
gitlab_pipeline_health returns a ready-to-read summary over 7/30 days:
Handy for on-call / triage: покажи health master за последние 7 дней.
Installation
Requires Python 3.10+.
Configuration
All config is via environment variables:
Every tool accepts an optional project_path arg that overrides GITLAB_PROJECT_PATH per call — useful for cross-project queries.
Claude Code
Full walkthrough: docs/claude-code.md — prerequisites, two install paths, multi-project setup, self-hosted GitLab behind a corp proxy, troubleshooting, uninstall.
Short version:
Or in ~/.claude.json / project .mcp.json:
Check:
Cursor / OpenCode / DevX Agent
Same idea — point the MCP config to uvx --from gitlab-ci-mcp gitlab-ci-mcp with the env vars above. See each tool's own MCP config syntax.
Example prompts
Rate limits & connection reuse
GitLab enforces a per-user rate limit (typically 2000 req/h for the REST API,
configurable by the admin — see your instance's /admin/application_settings/network).
- The server caches one
python-gitlabHTTP session perproject_path, so repeated tool calls against the same project reuse the connection and do not re-authenticate each time. - List tools default to
per_page=20to keep a single call within a small number of API requests. - If you hit a
429 Too Many Requests, the error handler returns an actionable message — wait and try again with largerper_pageor fewer calls.
Self-hosted GitLab behind a corporate proxy
When your laptop has a local HTTP proxy (e.g. http://127.0.0.1:3128 for corp web access) but GitLab is on the intranet, the proxy intercepts and kills internal requests. Two options:
- Set
GITLAB_NO_PROXY_DOMAINS— the server will add them toNO_PROXYat startup and clearHTTP_PROXY/HTTPS_PROXYfrom its own process so they don't affect GitLab traffic. - Pass explicitly empty
HTTP_PROXY=""etc. in the MCPenvsection.
Development
Run the server directly (stdio transport, waits on stdin for MCP messages):
License
MIT — see LICENSE.
Acknowledgements
Built on python-gitlab and the MCP Python SDK.
來源:README.md,提交 d97277f
工具
0版本歷史
1- v0.5.1最新Sep 16, 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 Server
由 GitHub 帳號 sumirati 發布
在本機執行的 GitLab MCP 伺服器,讓助理在 GitLab.com 或自架執行個體上讀取與管理專案、分支、提交、合併請求、議題與 CI/CD 流水線。

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 上的公開專案與使用者資訊。