Zum Inhalt springen
Skillpedia
● Kostenlos und Open Source💻 Lokal🔑 Braucht einen API-SchlüsselProgrammierung

GitLab MCP Server

Lässt deinen KI-Agenten mit GitLab-Projekten, Merge Requests, Issues, Pipelines, Wikis und Releases arbeiten.

2.1k Sterne auf GitHubvon zereightLizenz MITAktualisiert vor 18 Tagen

So installierst du ihn

Dieser MCP ist lokal: Er läuft auf deinem Computer.

Er funktioniert in Apps auf deinem PC (Claude Desktop, Claude Code, Cursor, VS Code…). Wähle deine App:

Füge im Terminal ein:

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

Was du ausfüllen musst

NameWofürPflicht
GITLAB_PERSONAL_ACCESS_TOKENGitLab personal access token for local stdio use. A non-empty value overrides GITLAB_PERSONAL_ACCESS_TOKEN_FILE. One of this token, GITLAB_PERSONAL_ACCESS_TOKEN_FILE, GITLAB_JOB_TOKEN, GITLAB_AUTH_COOKIE_PATH, or GITLAB_USE_OAUTH=true must be set. Create a token with the GitLab scopes the tools need, such as api or read_api.Nein
GITLAB_PERSONAL_ACCESS_TOKEN_FILEPath to a file that contains the personal access token. Read once at startup and trimmed. Ignored when GITLAB_PERSONAL_ACCESS_TOKEN or --token is non-empty. A missing, unreadable, or empty file stops startup. Does not replace job token, OAuth, cookie, or remote authorization.Nein
GITLAB_JOB_TOKENOptional GitLab CI job token to use instead of a personal access token when running inside GitLab CI.Nein
GITLAB_AUTH_COOKIE_PATHOptional path to a GitLab authentication cookie file for cookie-based authentication.Nein
GITLAB_USE_OAUTHSet to true to start with GitLab OAuth instead of a personal access token, job token, or cookie file.Nein
GITLAB_OAUTH_CLIENT_IDGitLab OAuth application ID. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_TOKEN_SCRIPT.Nein
GITLAB_OAUTH_TOKEN_SCRIPTCommand that prints an OAuth access token. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_CLIENT_ID.Nein
GITLAB_API_URLGitLab API base URL. Use https://gitlab.com/api/v4 for GitLab.com or your self-managed GitLab API URL.Nein
GITLAB_ALLOWED_PROJECT_IDSOptional comma-separated list of GitLab project IDs that this server is allowed to access.Nein
GITLAB_PERMISSION_MODETool exposure. Allowed values are readonly, modify, and full. Unset uses full. readonly keeps read-only tools. modify blocks delete and teardown tools.Nein
GITLAB_TOOLSETSOptional comma-separated toolset ids (projects, issues, merge_requests, …). Unset keeps the lean core default plus discover_tools. Do not set all unless you accept loading ~all schemas (~73k tokens).Nein
GITLAB_TOOLSOptional comma-separated list of individual tool names to add on top of enabled toolsets.Nein
GITLAB_DENIED_TOOLS_REGEXOptional regular expression used to hide matching tools from the server.Nein
GITLAB_TOOL_POLICY_APPROVEOptional comma-separated list of tool names that require explicit approval before execution.Nein
GITLAB_TOOL_POLICY_HIDDENOptional comma-separated list of tool names to hide from tools/list.Nein
NODE_TLS_REJECT_UNAUTHORIZEDSet to 0 only when you intentionally need to connect to a GitLab instance with invalid or self-signed TLS certificates.Nein
GITLAB_CA_CERT_PATHOptional path to a custom CA certificate file for self-managed GitLab instances.Nein
GITLAB_MASKING_ENABLEDSet to true to mask text tool results and returned errors using built-in or configured rules.Nein
GITLAB_MASKING_CONFIGOptional path to a response-masking JSON configuration file.Nein
GITLAB_MASKING_POLICY_FILEOptional protected server-owned JSON file containing managed masking policies.Nein
GITLAB_MASKING_WORKSPACE_DIRDirectory used to resolve response-masking configuration paths.Nein

Fertig! Jetzt testen

Starte die App neu und füge eine dieser Anfragen im Chat ein:

Liste die geänderten Dateien im Merge Request 123 von group/project auf.
Zeig mir die Ausgabe des fehlgeschlagenen Pipeline-Jobs.

Was es ist

Dieser Server verbindet deinen Agenten über die REST- und GraphQL-API mit GitLab. Er startet mit 40 Tools und kann weitere nach Kategorie aktivieren, insgesamt bis zu 288. Er unterstützt gitlab.com und selbst betriebene Instanzen sowie einen Nur-Lese-Modus.

Was er kann

  • list_merge_request_changed_files und get_merge_request_file_diff: einen Merge Request in zwei Schritten prüfen
  • get_pipeline_job_output: Job-Protokolle seitenweise lesen
  • discover_tools: weitere Tool-Kategorien aktivieren
  • help
  • execute_graphql
  • Projekte, Issues, Wiki, Releases, Tags und Meilensteine
  • jmespath-Option, um große Ergebnisse zu verkleinern

Wann du ihn nutzt

  • ›Wenn dein Agent einen Merge Request Datei für Datei prüfen soll.
  • ›Wenn eine Pipeline fehlschlägt und du das Job-Protokoll ohne GitLab-Oberfläche willst.
  • ›Wenn du Issues und Meilensteine direkt aus dem Chat verwalten willst.

Was du brauchst

Ein persönliches GitLab-Zugriffstoken (oder OAuth) und Node.js 20 oder neuer. Installation mit npm install -g @zereight/mcp-gitlab, dann das Programm zereight-mcp-gitlab verwenden.

Skills, die dazu passen

⭐ Skillpedia-MCP · gratisDein Agent findet den passenden Skill von selbstInstalliere unseren MCP, und dein Agent durchsucht 15.000+ Skills, sobald er einen braucht.Kostenlos installieren →

Häufige Fragen

Wie viele Tools zeigt er?

Standardmäßig 40 (38 Kern-Tools plus discover_tools und help). Insgesamt gibt es 288.

Sollte ich alle Tools laden?

Nein. Die README rät davon ab, GITLAB_TOOLSETS=all zu setzen, das kostet etwa 73k Schema-Token. Nutze stattdessen discover_tools.

Wie melde ich mich an?

Mit GITLAB_PERSONAL_ACCESS_TOKEN, lokalem OAuth, MCP-OAuth für Claude.ai oder einer Autorisierung pro Anfrage.

Funktioniert es mit selbst betriebenem GitLab?

Ja, setze GITLAB_API_URL auf deine Instanz.

Kann ich es auch ohne MCP nutzen?

Ja. Ein Skill- und CLI-Weg erledigt dieselben Abläufe im Terminal mit zereight-mcp-gitlab.

Ist das api-Toolset sicher?

Die README warnt, dass es Allowlists und Sicherheitsprüfungen umgeht und durch Prompt Injection gesteuert werden kann. Aktiviere es nur bewusst.

Wenn es nicht funktioniert

  • ›Prüfe, ob das Token gesetzt ist und GITLAB_API_URL stimmt, zum Beispiel https://gitlab.com/api/v4.
  • ›Prüfe, ob deine Node.js-Version 20 oder neuer ist.
  • ›Verwende für project_id einen URL-kodierten Projektpfad wie group%2Fproject.

5 neue Skills pro Woche. 1 Minute Lesezeit.