Skip to content

GitLab MCP Server

A comprehensive Model Context Protocol server for GitLab. Manage projects, merge requests, issues, pipelines, wikis, releases, tags, milestones, and more from any MCP-compatible AI client.

npm License


Why use this GitLab MCP?

  • Broad GitLab coverage — projects, repository browsing, merge requests, issues, pipelines, wiki, releases, tags, labels, milestones, and more.
  • Flexible auth — Personal Access Token, local OAuth2 browser flow, MCP OAuth proxy, and per-request remote authorization.
  • Multiple transports — stdio for local clients, SSE for legacy clients, and Streamable HTTP for modern remote deployments.
  • Client-friendly setup — examples for Claude Code, Codex, Antigravity, OpenCode, Copilot, Cline, Roo Code, Cursor, Kilo Code, and Amp Code.
  • Self-hosted ready — works with custom GitLab instances, proxy settings, and dynamic API URL routing.

Quick Start

Pick the auth method that fits your environment and drop it into your MCP client config.

Install the server once:

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

Or with npm:

npm install -g @zereight/mcp-gitlab

The examples use zereight-mcp-gitlab, a less collision-prone alias for the legacy mcp-gitlab binary. If your MCP client cannot find it, use the absolute path from which zereight-mcp-gitlab.

No global install? Pin npx to the previous stable release (the version these docs recommend), for example npx -y @zereight/mcp-gitlab@2.1.41. If you always want the newest release, use npx -y @zereight/mcp-gitlab@latest instead.

{
  "mcpServers": {
    "gitlab": {
      "command": "zereight-mcp-gitlab",
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}
{
  "mcpServers": {
    "gitlab": {
      "command": "zereight-mcp-gitlab",
      "env": {
        "GITLAB_USE_OAUTH": "true",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}
{
  "mcpServers": {
    "gitlab": {
      "command": "zereight-mcp-gitlab",
      "args": [
        "--token=glpat-xxxxxxxxxxxxxxxxxxxx",
        "--api-url=https://gitlab.com/api/v4"
      ]
    }
  }
}

See Getting Started for a full comparison of authentication methods.


Choose your client

Anthropic's terminal coding agent.

MCP support via VS Code's built-in client.

GitHub Copilot CLI with MCP integration.

The AI-first code editor.

OpenAI Codex CLI client.

Factory AI Droid, OpenClaw, OpenCode, and other generic clients.


Learn more

  • Tools Reference — complete catalog of every tool the MCP server exposes, grouped by category with read/write markers.
  • Authentication — OAuth2 setup, callback proxy, and multi-PAT configurations for custom agents.
  • Configuration — complete environment variable reference, dynamic API URLs, and stateless mode for multi-pod deployments.
  • Features — feature-specific guides such as resolving issue threads.
  • Reference — repository setup guides and design specs.