/ Каталог / Песочница / GitLab MCP
● Сообщество zereight 🔑 Нужен свой ключ

GitLab MCP

автор zereight · zereight/gitlab-mcp

Treat GitLab like the GitHub MCP treats GitHub — issues, MRs, pipelines, comments — with explicit support for self-hosted instances.

Zereight's GitLab MCP is the de-facto community implementation. It covers REST and a curated GraphQL surface, supports self-hosted GitLab via GITLAB_API_URL, and has fine-grained read/write tool gating.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

готово

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gitlab-mcp-zereight",
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "gitlab-mcp-zereight": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@zereight/mcp-gitlab"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add gitlab-mcp-zereight -- npx -y @zereight/mcp-gitlab

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: GitLab MCP

Review an MR end-to-end from Claude

👤 Developers ⏱ ~15 min intermediate

Когда использовать: You want a quick triage pass on a teammate's MR before opening the GitLab UI.

Поток
  1. Get MR
    Fetch MR by IID; pull title, description, diffs.✓ Скопировано
    → Diff loaded
  2. Inspect pipeline
    List pipelines for this MR; report failures.✓ Скопировано
    → Pipeline status known
  3. Comment
    Post inline comments for the issues you found.✓ Скопировано
    → Comments visible in UI

Итог: MR review done without leaving Claude; comments posted under your account.

Triage failing pipelines across projects

👤 Developers ⏱ ~15 min intermediate

Когда использовать: CI is red across several projects and you want a unified view.

Поток
  1. List failed
    list_pipelines status=failed across group X.✓ Скопировано
    → Failed pipelines listed
  2. Pull logs
    For each, fetch the failing job log tail.✓ Скопировано
    → Top error per pipeline
  3. Cluster
    Group by error signature; identify the shared cause.✓ Скопировано
    → One root-cause summary

Итог: You know whether it's one infra issue or N independent failures.

Комбинации

Сочетайте с другими MCP — эффект x10

gitlab-mcp-zereight + linear

Cross-link Linear issues to GitLab MRs in PR descriptions

Combine gitlab-mcp-zereight with linear: Cross-link Linear issues to GitLab MRs in PR descriptions✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
list_issues (see docs) List issues with filters 1 call
get_merge_request (see docs) Fetch MR details + diffs 1 call
create_merge_request (see docs) Open a new MR 1 call
list_pipelines (see docs) List CI pipelines 1 call
retry_pipeline (see docs) Retry a failed pipeline 1 call
add_comment (see docs) Post issue/MR comment 1 call

Стоимость и лимиты

Во что обходится

Квота API
GitLab API rate limits (varies by instance)
Токенов на вызов
MR diffs can be huge — paginate
Деньги
Free; your GitLab plan applies
Совет
Use read-only mode for any agent that doesn't need to write

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: api read_repository (scoped PAT)
Хранение учётных данных: PAT in env var
Исходящий трафик: Your GitLab API URL only
Никогда не давайте: use sudo scope unless you know why

Устранение неполадок

Частые ошибки и исправления

401 on self-hosted

Set GITLAB_API_URL to the full /api/v4 URL of your instance

Rate limited

Use a project-scoped PAT; lower polling cadence

Альтернативы

GitLab MCP в сравнении

АльтернативаКогда использоватьКомпромисс
Official GitLab MCPOnce GitLab ships first-partyNot yet GA
github-mcp-serverYou're on GitHubDifferent platform

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills