The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Gitlab Ci MCP listing page.
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.
readOnlyHint / destructiveHint / idempotentHint / openWorldHint so MCP clients can classify operations (e.g. ask for confirmation only on destructive ones like gitlab_merge_mr, gitlab_delete_schedule).outputSchema and every result carries structuredContent alongside a pre-rendered markdown text block. Clients that can render structured data use it; agents that prefer compact text get the markdown. No response_format parameter needed.ToolError messages (e.g. "GitLab authentication failed… verify GITLAB_TOKEN has api scope") and surfaced as isError=True results.project_path that overrides GITLAB_PROJECT_PATH for cross-project queries.pagination block with page, total, has_more, next_page and a next-page hint in the markdown footer.gitlab_pipeline_health and gitlab_get_job_log are async and emit info logs / report_progress events through the MCP Context so clients can show progress bars.gitlab://project/info and gitlab://project/ci-config mirror common lookups for clients that prefer the Resource model over tools.python-gitlab HTTP sessions are closed cleanly on server shutdown via an asynccontextmanager lifespan hook.gitlab_get_job_log accepts grep_pattern + grep_context (surrounding lines) for regex-filtering megabyte-scale CI logs without pulling the whole trace into agent context.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.
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
gitlab_pipeline_health returns a ready-to-read summary over 7/30 days:
Handy for on-call / triage: покажи health master за последние 7 дней.
Requires Python 3.10+.
All config is via environment variables:
| Variable | Required | Description |
|---|---|---|
GITLAB_URL | yes | Base URL, e.g. https://gitlab.example.com |
GITLAB_TOKEN | yes | Personal Access Token with api scope |
GITLAB_PROJECT_PATH | yes | Default project, e.g. my-org/my-repo |
GITLAB_SSL_VERIFY | no | true (default) / false |
GITLAB_NO_PROXY_DOMAINS | no | Comma-separated domains to add to NO_PROXY (useful in corp networks behind a local HTTP proxy — e.g. .corp.example.com,gitlab.internal) |
Every tool accepts an optional project_path arg that overrides GITLAB_PROJECT_PATH per call — useful for cross-project queries.
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:
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.
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).
python-gitlab HTTP session per project_path, so
repeated tool calls against the same project reuse the connection and do not
re-authenticate each time.per_page=20 to keep a single call within a small
number of API requests.429 Too Many Requests, the error handler returns an actionable
message — wait and try again with larger per_page or fewer calls.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:
GITLAB_NO_PROXY_DOMAINS — the server will add them to NO_PROXY at startup and clear HTTP_PROXY/HTTPS_PROXY from its own process so they don't affect GitLab traffic.HTTP_PROXY="" etc. in the MCP env section.Run the server directly (stdio transport, waits on stdin for MCP messages):
MIT — see LICENSE.
Built on python-gitlab and the MCP Python SDK.