What it does
GitLab MCP brings the full GitLab API into Claude's toolset. Teams using GitLab for source control, CI/CD, and project management can have Claude participate directly in their workflow — triaging issues, reviewing merge requests, checking pipeline status, or reading configuration files — without leaving the Claude interface.
It supports both gitlab.com and self-hosted GitLab Enterprise instances by configuring the GITLAB_URL environment variable.
- List and search projects within a namespace or group
- Read file contents from any accessible repository
- Create and manage issues with labels, milestones, and assignees
- Create merge requests from feature branches
- List active pipelines and inspect their status
- Retrieve pipeline job logs for debugging CI failures
How to connect
Generate a GitLab personal access token with api scope at gitlab.com → User Settings → Access Tokens.
export GITLAB_TOKEN="glpat-your-token-here" # For self-hosted instances: export GITLAB_URL="https://gitlab.yourcompany.com" claude mcp add gitlab -- npx -y @modelcontextprotocol/server-gitlab
Available tools
list_projects— list projects in a user or group namespaceget_file— read a file from a project repositorycreate_issue— open a new issue with metadatacreate_merge_request— create an MR from source to target branchlist_pipelines— list recent pipeline runs for a projectget_pipeline_status— get the status and duration of a pipeline
Example usage
Ask Claude to summarize failed CI pipelines and suggest likely root causes:
# User prompt
List the last 5 failed pipelines in my-group/backend.
For each failure, get the job logs and tell me
what went wrong.
list_pipelines({ project: "my-group/backend", status: "failed", limit: 5 }) get_pipeline_status({ pipeline_id: "4821" }) → identifies failing job: "test:unit" → returns log tail with assertion error → Claude summarises root cause
Self-hosted GitLab: Set the GITLAB_URL environment variable to your instance URL before connecting. The server works with GitLab Community Edition (CE) and Enterprise Edition (EE) from version 13.0 onwards.