Gitlab MCP logo

Gitlab MCP

Connect AI agents to GitLab for projects, merge requests, issues, pipelines, wiki pages, releases, and more.

Install Gitlab MCP

Run the project’s own setup commands, in order.

Setup steps from the project

gitlab-mcp installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    npm install -g @zereight/mcp-gitlab
    
  2. 2. Install
    brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp
    
  3. 3. Install
    brew install zereight/gitlab-mcp/zereight-mcp-gitlab
    
  4. 4. Start the server
    npx -y @zereight/mcp-gitlab@latest
    
  5. 5. Sign in
    read -rs GITLAB_PERSONAL_ACCESS_TOKEN && export GITLAB_PERSONAL_ACCESS_TOKEN
    
  6. 6. Add to Claude Code
    claude mcp add gitlab --transport stdio --scope local --env GITLAB_PERSONAL_ACCESS_TOKEN="$GITLAB_PERSONAL_ACCESS_TOKEN" --env GITLAB_API_URL=https://gitlab.com/api/v4 -- zereight-mcp-gitlab
    

Overview

gitlab-mcp connects MCP-compatible agents to GitLab through project, merge request, issue, pipeline, wiki, release, tag, and milestone tools. It runs locally over stdio or remotely over Streamable HTTP, with PAT, OAuth, and remote authorization options. The server starts with a focused core toolset and can activate additional tools on demand through discovery. Reach for it when an agent needs structured GitLab workflows, repository context, or controlled project automation.

Use cases

  • Review merge-request file changes and diffs
  • Inspect pipeline jobs and paginated logs
  • Manage GitLab issues, releases, and milestones
  • Query wiki pages and project metadata
  • Connect agents to self-hosted GitLab instances

Key features

  • 40 core tools with on-demand tool discovery
  • Project, merge request, issue, pipeline, wiki, release, tag, and milestone operations
  • stdio and Streamable HTTP transports
  • PAT, OAuth, and remote authorization support
  • JMESPath filtering and compact-result mode
  • Optional GraphQL execution

Tools3

What Gitlab MCP lets your agent do. Expand a tool for its parameters.

Self-reported~21 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

47/47 checks healthy over the last 67d

Supply-chain signal

4 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 3High 1Medium 0Low 0

Scanned 29d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2.1kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.

How Gitlab MCP works

What gitlab-mcp does

gitlab-mcp exposes GitLab operations to MCP-compatible clients. Its coverage includes projects, merge requests, issues, pipelines, wiki content, releases, tags, milestones, and related workflows. Agents can use it to inspect and modify GitLab resources without copying URLs, diffs, or job output into a conversation.

The server includes 288 tools in total: 285 tools grouped into toolsets, an execute_graphql tool, discover_tools, and help. A default configuration exposes 40 tools: 38 core tools plus discovery and help. Additional toolsets can be enabled for a session when an agent needs functionality outside the core set.

How it works

For local use, the server communicates with an MCP client over stdio. It can also run as a hosted or self-hosted service over Streamable HTTP, making it suitable for shared environments. The package provides the zereight-mcp-gitlab executable through npm or Homebrew, and can also be launched with npx.

GitLab projects can be addressed by numeric ID or by URL-encoded path. For example, a project path such as group/project becomes group%2Fproject; nested groups require encoding each path separator. Merge requests use their project-relative IID.

Authentication supports a personal access token, a token file, local OAuth, MCP OAuth for public HTTPS deployments, and forwarded authorization for multi-user HTTP setups. The GitLab API endpoint can be configured for GitLab.com or another GitLab installation.

Setup and configuration

Install the package globally with npm:

Terminal
npm install -g @zereight/mcp-gitlab

Homebrew installation is also supported:

bash
brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp
brew install zereight/gitlab-mcp/zereight-mcp-gitlab

For a one-off launch, use npx -y @zereight/mcp-gitlab@latest. A local setup commonly supplies GITLAB_PERSONAL_ACCESS_TOKEN and GITLAB_API_URL=https://gitlab.com/api/v4. GITLAB_USE_OAUTH=true selects local OAuth instead. Remote deployments can use GITLAB_MCP_OAUTH=true for Claude.ai-compatible MCP OAuth or REMOTE_AUTHORIZATION=true to forward per-request credentials.

The server can be registered with clients such as Claude Code, Codex, Cursor, and VS Code. Remote clients connect to the server's Streamable HTTP /mcp endpoint.

Tools and capabilities

  • Browse and manage GitLab projects.
  • List merge-request changed files and retrieve individual file diffs.
  • Work with issues, pipelines, jobs, and paginated job output.
  • Manage wiki pages, releases, tags, and milestones.
  • Use discover_tools to list tool categories and activate additional toolsets for a session.
  • Query GitLab through execute_graphql.
  • Apply JMESPath expressions to reduce returned data.
  • Run in read-only mode and configure toolsets, API URLs, and authorization behavior.

Limitations and notes

The default tool list is intentionally smaller than the complete catalog. Calling discover_tools is required to activate categories such as pipelines or wiki when they are outside the initial core set. Setting GITLAB_TOOLSETS=all does not enable the api toolset.

The gitlab_api_request tool in the api toolset bypasses group and project allowlists, other tool filters, and per-tool safety checks. It should only be enabled deliberately, especially because prompt injection could cause an agent to invoke it.

Large diffs, logs, and other payloads may be inconvenient in MCP responses. JMESPath filtering can reduce results, while GITLAB_MCP_COMPACT_RESULTS=true can replace oversized replies with a preview and a CLI command. The accompanying CLI returns full payloads and requires confirmation for destructive operations or tools governed by GITLAB_TOOL_POLICY_APPROVE.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gitlab MCP

gitlab-mcp is an MCP server that connects AI agents to GitLab through tools for projects, merge requests, issues, pipelines, wiki content, releases, tags, milestones, GraphQL queries, and tool discovery. It supports local stdio operation and remote Streamable HTTP deployments with token or OAuth authentication.

Install it with `npm install -g @zereight/mcp-gitlab`, Homebrew, or run `npx -y @zereight/mcp-gitlab@latest`. The installed executable is `zereight-mcp-gitlab`, which can then be registered with an MCP client.

Set `GITLAB_PERSONAL_ACCESS_TOKEN` and `GITLAB_API_URL` for a local PAT-based setup. Local OAuth uses `GITLAB_USE_OAUTH=true`; public remote deployments can use `GITLAB_MCP_OAUTH=true`, while multi-user HTTP deployments can forward credentials with `REMOTE_AUTHORIZATION=true`.

The default configuration enables 38 core tools plus `discover_tools` and `help`. Call `discover_tools` to list available categories and activate additional toolsets for the session; the complete catalog contains 288 tools.

Yes, gitlab-mcp supports Cursor through a local stdio configuration or its installation link. Configure the GitLab token and API URL, then register the `zereight-mcp-gitlab` executable with Cursor.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGitlab MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gitlab-mcp?style=directory)](https://allmcps.com/mcp/gitlab-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/gitlab-mcp"><img src="https://allmcps.com/api/badge/gitlab-mcp?style=directory" alt="Gitlab MCP on AllMCPs" /></a>