Skip to main content
Community resource — not affiliated with Anthropic. Learn more


GitLab MCP

Git & GitHub · Community

GitLab API integration. Manage repos, issues, merge requests, pipelines, CI/CD configurations, and project wikis directly from Claude.

4.6 rating 4,200+ connects Free · Open source Protocol v1.0
GitLab CI/CD Merge Requests Community Pipelines

Connect command

GITLAB_TOKEN=glpat-xxx claude mcp add gitlab -- npx -y @modelcontextprotocol/server-gitlab
View on GitHub →

Requires GITLAB_TOKEN env var

4.2kConnects
4.6Rating

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.

terminal
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 namespace
  • get_file — read a file from a project repository
  • create_issue — open a new issue with metadata
  • create_merge_request — create an MR from source to target branch
  • list_pipelines — list recent pipeline runs for a project
  • get_pipeline_status — get the status and duration of a pipeline

Example usage

Ask Claude to summarize failed CI pipelines and suggest likely root causes:

example prompt
# 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.
tool call sequence
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.