
Gitlab Ci Mcp
io.github.mshegolevPublished by GitHub account mshegolevv0.5.1Updated Oct 24, 2026
GitLab CI/CD MCP — pipelines, jobs, schedules, MRs, files. Any GitLab (SaaS or self-hosted).
The publisher's own server: Gitlab
Overview
Local MCP server that lets an assistant inspect and operate GitLab CI/CD: pipelines, jobs and logs, schedules, branches, tags, merge requests and repository.
- What you can do
- List, inspect, trigger, retry and cancel pipelines; read job logs with regex grep and context; get a pipeline health summary over 7 or 30 days. List, create, update and delete pipeline schedules. List branches and tags and compare branches. List and read merge requests, view their changes, create merge requests and merge them. Read repository files, list the repository tree and fetch project info. Expose project info and CI config as MCP resources.
- When to use it
- Useful when an assistant should triage failing pipelines, read large CI logs, check pipeline health, manage schedules, or open and merge merge requests on a GitLab instance, including self-hosted ones behind a corporate proxy.
- Requirements
- Runs locally as a Python package (Python 3.10+) via uvx or pipx, stdio transport. Requires GITLAB_URL, GITLAB_TOKEN (Personal Access Token with api scope) and GITLAB_PROJECT_PATH. Optional GITLAB_SSL_VERIFY and GITLAB_NO_PROXY_DOMAINS. Network access to the GitLab instance; subject to GitLab API rate limits.
Installation
In SourceWeft
- Open Gitlab Ci Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit d97277f
Tools
0Version history
1- v0.5.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Gitlab integrations
Gitlab
com.gitlabOfficial publisher
Gitlab's hosted MCP server, published by gitlab.com; credential required; Streamable HTTP.

GitLab MCP Server
Published by GitHub account sumirati
A local GitLab MCP server that lets an assistant read and manage projects, branches, commits, merge requests, issues and CI/CD pipelines on GitLab.com or self‑h

Gitlab Mcp
Published by GitHub account mmedum
Local stdio MCP server that lets an assistant work inside your gitlab.com projects as you: issues, merge requests, reviews, repository and CI.

Gitlab Ci Break Lint
Published by GitHub account jmshinhwa
A local MCP server that flags lines in a .gitlab-ci.yml file that a GitLab runner will reject after the next major upgrade.

Gitlab Mcp
Published by GitHub account mrfentmen
Lets an assistant look up public GitLab projects and users without any API key.