/ Verzeichnis / Playground / GitLab MCP
● Community zereight 🔑 Eigener Schlüssel nötig

GitLab MCP

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

bereit

Installieren

Wählen Sie Ihren Client

~/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"
      }
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.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 nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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"
      }
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "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"
      }
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: GitLab MCP

Review an MR end-to-end from Claude

👤 Developers ⏱ ~15 min intermediate

Wann einsetzen: You want a quick triage pass on a teammate's MR before opening the GitLab UI.

Ablauf
  1. Get MR
    Fetch MR by IID; pull title, description, diffs.✓ Kopiert
    → Diff loaded
  2. Inspect pipeline
    List pipelines for this MR; report failures.✓ Kopiert
    → Pipeline status known
  3. Comment
    Post inline comments for the issues you found.✓ Kopiert
    → Comments visible in UI

Ergebnis: MR review done without leaving Claude; comments posted under your account.

Triage failing pipelines across projects

👤 Developers ⏱ ~15 min intermediate

Wann einsetzen: CI is red across several projects and you want a unified view.

Ablauf
  1. List failed
    list_pipelines status=failed across group X.✓ Kopiert
    → Failed pipelines listed
  2. Pull logs
    For each, fetch the failing job log tail.✓ Kopiert
    → Top error per pipeline
  3. Cluster
    Group by error signature; identify the shared cause.✓ Kopiert
    → One root-cause summary

Ergebnis: You know whether it's one infra issue or N independent failures.

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
GitLab API rate limits (varies by instance)
Tokens pro Aufruf
MR diffs can be huge — paginate
Kosten in €
Free; your GitLab plan applies
Tipp
Use read-only mode for any agent that doesn't need to write

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: api read_repository (scoped PAT)
Credential-Speicherung: PAT in env var
Datenabfluss: Your GitLab API URL only
Niemals gewähren: use sudo scope unless you know why

Fehlerbehebung

Häufige Fehler und Lösungen

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

Alternativen

GitLab MCP vs. andere

AlternativeWann stattdessenKompromiss
Official GitLab MCPOnce GitLab ships first-partyNot yet GA
github-mcp-serverYou're on GitHubDifferent platform

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen