Skip to main content
MCP server CX Codex

mcp-gitlab — Claude Code MCP server: features and setup

Connect an AI agent to GitLab projects, merge requests, pipelines, and issues. A read-only setting removes write tools from the server.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-gitlab -e GITLAB_TOKEN=<GITLAB_TOKEN> -e GITLAB_URL=<GITLAB_URL> -e GITLAB_OAUTH_CLIENT_SECRET=<GITLAB_OAUTH_CLIENT_SECRET> -e GITLAB_OAUTH_JWT_KEY=<GITLAB_OAUTH_JWT_KEY> -e GITLAB_HTTP_BEARER_TOKEN=<GITLAB_HTTP_BEARER_TOKEN> -- uvx mcp-gitlab
Open on GitHub

What mcp-gitlab does

mcp-gitlab connects an agent to the GitLab REST API. It can work with projects, merge requests, pipelines, CI/CD variables, approvals, and issues, and assist with code reviews. The server supports GitLab.com and self-hosted GitLab CE/EE instances.

Run it with uvx mcp-gitlab. You need uv, a GitLab instance address in GITLAB_URL, and a token in GITLAB_TOKEN; other token environment variables and sign-in through mcp-gitlab auth login are supported too. Set MCP_READ_ONLY=true to keep write tools and write-workflow prompts out of the agent’s available options. That setting prevents the agent from making changes through this server.

What it helps with

  • browse GitLab projects
  • inspect merge requests and approvals
  • investigate a failed CI/CD pipeline
  • manage issues and CI/CD variables
  • review code with an AI agent

Example prompts for the agent

  • Find the GitLab project for this repository and show its open merge requests.
  • Inspect the latest pipeline failure and summarize the related issues.
  • Review this merge request and identify unresolved feedback.

How to install mcp-gitlab

Platform CLI

claude mcp add mcp-gitlab -e GITLAB_TOKEN=<GITLAB_TOKEN> -e GITLAB_URL=<GITLAB_URL> -e GITLAB_OAUTH_CLIENT_SECRET=<GITLAB_OAUTH_CLIENT_SECRET> -e GITLAB_OAUTH_JWT_KEY=<GITLAB_OAUTH_JWT_KEY> -e GITLAB_HTTP_BEARER_TOKEN=<GITLAB_HTTP_BEARER_TOKEN> -- uvx mcp-gitlab

Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-gitlab <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-gitlab

How do I install mcp-gitlab in Claude Code?

Install uv first, then run `claude mcp add mcp-gitlab -e GITLAB_TOKEN=<GITLAB_TOKEN> -e GITLAB_URL=<GITLAB_URL> -e GITLAB_OAUTH_CLIENT_SECRET=<GITLAB_OAUTH_CLIENT_SECRET> -e GITLAB_OAUTH_JWT_KEY=<GITLAB_OAUTH_JWT_KEY> -e GITLAB_HTTP_BEARER_TOKEN=<GITLAB_HTTP_BEARER_TOKEN> -- uvx mcp-gitlab`. Replace the placeholders with your GitLab values.

What does mcp-gitlab do?

It gives an AI agent access to GitLab REST API tasks involving projects, merge requests, pipelines, CI/CD, and issues. It also supports approvals and code review work.

Can I prevent the agent from changing GitLab data?

Yes. Set MCP_READ_ONLY=true to hide write tools and write-workflow prompts from the agent.

Similar MCP servers

All MCP servers for DevOps and infrastructure →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor