原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

GitLab Ci MCP

作者:mshegolev版本 0.5.1i★ –i在你的电脑上运行
注册名称io.github.mshegolev/gitlab-ci-mcp

安装

概览

作者提供的说明(英文原文)

GitLab CI/CD MCP — pipelines, jobs, schedules, MRs, files. Any GitLab (SaaS or self-hosted).

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 开发者工具
  • 你需要填写:GITLAB_URL, GITLAB_TOKEN

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: GITLAB_URL, GITLAB_TOKEN, GITLAB_PROJECT_PATH, GITLAB_SSL_VERIFY

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "gitlab-ci": {
      "command": "uvx",
      "args": [
        "gitlab-ci-mcp"
      ],
      "env": {
        "GITLAB_URL": "your-value",
        "GITLAB_TOKEN": "your-value",
        "GITLAB_PROJECT_PATH": "your-value",
        "GITLAB_SSL_VERIFY": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add gitlab-ci --env GITLAB_URL=your-value --env GITLAB_TOKEN=your-value --env GITLAB_PROJECT_PATH=your-value --env GITLAB_SSL_VERIFY=your-value -- uvx gitlab-ci-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "gitlab-ci": {
      "command": "uvx",
      "args": [
        "gitlab-ci-mcp"
      ],
      "env": {
        "GITLAB_URL": "your-value",
        "GITLAB_TOKEN": "your-value",
        "GITLAB_PROJECT_PATH": "your-value",
        "GITLAB_SSL_VERIFY": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "gitlab-ci": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "gitlab-ci-mcp"
      ],
      "env": {
        "GITLAB_URL": "your-value",
        "GITLAB_TOKEN": "your-value",
        "GITLAB_PROJECT_PATH": "your-value",
        "GITLAB_SSL_VERIFY": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • GITLAB_URL 必填 env
    GitLab instance URL (e.g. https://gitlab.com or https://gitlab.example.com)
  • GITLAB_TOKEN 机密 必填 env
    GitLab Personal Access Token with 'api' scope
  • GITLAB_PROJECT_PATH env
    Default project path (e.g. my-org/my-repo); can be overridden per call
  • GITLAB_SSL_VERIFY env
    Verify SSL certificates (true/false). Set to 'false' for self-hosted GitLab with self-signed certs.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 mshegolev 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“开发者工具”中的其他服务器比较i

  • 星标数多于此分类中其他 1391 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 1391 个服务器的 14% 更新
  • 基础检查结果等于或优于此分类中其他 1391 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

GitLab Ci MCP 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:GITLAB_URL, GITLAB_TOKEN

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.5.1)于7个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:GitHub, Desktop Commander, Cloudflare MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

电脑或云端★ 34,245MIT3天前更新
安装

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

在你的电脑上运行★ 10,225MIT15天前更新
安装

Cloudflare MCP

作者:cloudflare

Cloudflare MCP servers

在云端运行★ 4,446Apache-2.014个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

gitlab-ci-mcp

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 and FastMCP. Local stdio remains the default; opt-in Streamable HTTP supports shared deployments with one GitLab PAT per caller.

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 / openWorldHint so MCP clients can classify operations (e.g. ask for confirmation only on destructive ones like gitlab_merge_mr, gitlab_delete_schedule).
  • Structured output on every tool — each tool declares a TypedDict return type, so FastMCP auto-generates an 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.
  • Structured errors — authentication, 404, 403, 429 (rate-limit), 5xx, missing-env errors are converted to actionable ToolError messages (e.g. _"GitLab authentication failed… verify GITLAB_TOKEN has api scope"_) and surfaced as isError=True results.
  • Pydantic input validation — every argument has typed constraints (ranges, lengths, literals) auto-exposed as JSON Schema.
  • Explicit project scoping — every GitLab tool requires project_path by default. Set GITLAB_ALLOW_DEFAULT_PROJECT=true to opt into the legacy environment fallback.
  • Pagination — list tools return a pagination block with page, total, has_more, next_page and a next-page hint in the markdown footer.
  • Per-user HTTP credentials — in Streamable HTTP mode every request must carry X-GitLab-Token; GitLab API calls and cached clients are isolated by PAT. Stdio remains single-user with GITLAB_TOKEN.
  • MCP Resources — gitlab://project/info and gitlab://project/ci-config mirror common lookups for clients that prefer the Resource model over tools.
  • Lifespan management — python-gitlab HTTP sessions are closed cleanly on server shutdown via an asynccontextmanager lifespan hook.
  • Log grep — 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.
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

24 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

Package gitlab_ci_mcp_check_updates

Pipeline health report

gitlab_pipeline_health returns a ready-to-read summary over 7/30 days:

Last 7d:  96.4%  up   | 27/28 success

Last 30d: 92.1% | 105/114 success Last 10: success success success failed success ...

Handy for on-call / triage: покажи health master за последние 7 дней.

Installation

Requires Python 3.10+.

# via uvx (recommended)

uvx --from gitlab-ci-mcp gitlab-ci-mcp

or via pip/pipx

pipx install gitlab-ci-mcp

Configuration

All config is via environment variables:

VariableRequiredDescription
GITLAB_URLyesBase URL, e.g. https://gitlab.example.com
GITLAB_TOKENstdio onlyPersonal Access Token with api scope. In HTTP mode, each client sends its own X-GitLab-Token header.
MCP_TRANSPORTnostdio (default) or streamable-http
MCP_HTTP_HOSTnoHTTP bind host; defaults to 127.0.0.1
MCP_HTTP_PORTnoHTTP bind port; defaults to 8000
GITLAB_PROJECT_PATHnoLegacy fallback project; used only with GITLAB_ALLOW_DEFAULT_PROJECT=true
GITLAB_ALLOW_DEFAULT_PROJECTnoSet to true to opt into the legacy GITLAB_PROJECT_PATH fallback
MCP_GITLAB_UPDATE_CHECK_ENABLEDnofalse by default; set to true to allow the explicit update-check tool to query PyPI
GITLAB_SSL_VERIFYnotrue (default) / false
GITLAB_NO_PROXY_DOMAINSnoComma-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 a project_path arg. It is required by default so a call cannot silently target an environment-wide project. For legacy deployments, set GITLAB_ALLOW_DEFAULT_PROJECT=true together with GITLAB_PROJECT_PATH to opt into the old fallback behavior.

Update checking is disabled by default. Set MCP_GITLAB_UPDATE_CHECK_ENABLED=true to enable the explicit gitlab_ci_mcp_check_updates tool. When enabled, it makes one bounded request to fixed PyPI JSON, caches a result for five minutes, reports failures and unsupported versions, and never installs anything. No startup or other tool call performs this request. If called while disabled, the tool reports disabled without making a network request.

Pipeline health success rate uses completed pipelines only: success and failed are in the denominator; running, pending, manual, canceled, skipped, and other non-completed statuses are excluded. A missing comparison period or a sample without completed pipelines is reported as insufficient data, not as a zero rate or a flat trend.

Shared Streamable HTTP deployment

For a shared server, run with MCP_TRANSPORT=streamable-http. Each caller must send their own GitLab PAT in X-GitLab-Token; the server never falls back to the process GITLAB_TOKEN in this mode. GitLab applies that PAT's identity and permissions to each API operation. The header is a custom credential mechanism, not MCP OAuth; clients need support for configured custom headers.

The server binds to loopback (127.0.0.1:8000) by default. Expose it through an HTTPS reverse proxy, restrict network access, and redact the PAT header from proxy, tracing, and error logs. Initialize and tool discovery only check that the header is non-empty; GitLab validates the PAT when an API call is made.

Example for Claude Code (provide GITLAB_PAT through a secret manager; do not put a literal token in shell history):

claude mcp add --transport http \

--header "X-GitLab-Token: ${GITLAB_PAT}" \ gitlab https://mcp.example.com/mcp

The client must attach the header to every request. Each GitLab tool still requires an explicit project_path. Fixed resources gitlab://project/info and gitlab://project/ci-config have no project argument; they require the explicit compatibility setting GITLAB_ALLOW_DEFAULT_PROJECT=true and GITLAB_PROJECT_PATH.

Full credential details and limitations: docs/per-user-auth.md.

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:

claude mcp add --transport stdio \

--env GITLAB_URL=https://gitlab.example.com \ --env GITLAB_TOKEN="$GITLAB_PAT" \ gitlab -- uvx --from gitlab-ci-mcp gitlab-ci-mcp

Each GitLab tool call must include project_path, for example project_path="my-org/my-repo". For legacy default-project behavior, also set GITLAB_PROJECT_PATH and GITLAB_ALLOW_DEFAULT_PROJECT=true.

Or in ~/.claude.json / project .mcp.json:

{

"mcpServers": { "gitlab": { "type": "stdio", "command": "uvx", "args": ["--from", "gitlab-ci-mcp", "gitlab-ci-mcp"], "env": { "GITLAB_URL": "https://gitlab.example.com", "GITLAB_TOKEN": "${GITLAB_PAT}", "GITLAB_PROJECT_PATH": "my-org/my-repo", "GITLAB_ALLOW_DEFAULT_PROJECT": "true", "GITLAB_SSL_VERIFY": "true" } } } }

Check:

claude mcp list

gitlab: uvx --from gitlab-ci-mcp gitlab-ci-mcp - ✓ Connected

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

что сломалось в последнем pipeline master
покажи health master за 7 дней для проекта my-org/other-repo
создай MR из feature/foo в master с title "feat: foo"
покажи содержимое .gitlab-ci.yml из master

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 a bounded python-gitlab HTTP session per GitLab URL, project, and PAT fingerprint. Different users never reuse one another's cached client.
  • List tools default to per_page=20 to 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 larger per_page or 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:

  1. Set 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.
  2. Pass explicitly empty HTTP_PROXY="" etc. in the MCP env section.

Development

git clone https://github.com/mshegolev/gitlab-ci-mcp

cd gitlab-ci-mcp python -m venv .venv && . .venv/bin/activate pip install -e '.[dev]' pytest

Run the server directly (stdio transport is the default and waits on stdin for MCP messages):

GITLAB_URL=... GITLAB_TOKEN=... gitlab-ci-mcp

License

MIT — see LICENSE.

Acknowledgements

Built on python-gitlab and the MCP Python SDK.

问 PopNx