Gitlab Mcp
zereight/gitlab-mcp · 1.6k stars · TypeScript · MIT
MCP server First gitlab mcp for you, building together
Install
npm install -g @zereight/mcp-gitlabThese repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.
Files
GitLab MCP Server
English | 한국어 | 简体中文 | Português (Brasil)
📖 Documentation → Setup guides, environment variables, and the full tool reference live on the hosted docs site.
@zereight/mcp-gitlab
Agent-workflow-optimized GitLab MCP — manage projects, merge requests, issues, pipelines, wiki, releases, tags, milestones, and more through stdio, SSE, and Streamable HTTP.
Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization for VS Code, Claude, Cursor, Copilot, and other MCP clients.
Why use this GitLab MCP?
- 268 tools: 266 in toolsets +
execute_graphql+discover_tools— start with a small toolset; activate more at runtime without CQRS-style grouping - MR 2-step review —
list_merge_request_changed_files→ batchedget_merge_request_file_diff - Agent Skill built in — workflow guidance in
skills/gitlab-mcp/ - 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
- JMESPath result filtering — optional
jmespathon tool calls (seetools/list) shrinks JSON results without changing GitLab API requests; when response masking is enabled, JMESPath runs on masked data.
How we compare
Quick start: choose either Personal Access Token or OAuth2 setup below, install @zereight/mcp-gitlab, and use zereight-mcp-gitlab in your MCP client configuration.
Client Setup Guides
- Claude Code Setup Guide
- VS Code Setup Guide
- GitHub Copilot Setup Guide
- Codex Setup Guide
- Cursor Setup Guide
- JSON-Based MCP Clients Setup Guide - for Factory AI Droid, OpenClaw, and OpenCode style clients
- OAuth2 Authentication Setup Guide
- Environment Variables Reference
- Stateless Mode — Multi-Pod HPA
- Custom Agents and Multiple PAT Setup
Usage
Setup Overview
#### Authentication Methods
The server supports four authentication methods:
For local/desktop use (most common):
- Personal Access Token (
GITLAB_PERSONAL_ACCESS_TOKEN) — simplest setup - OAuth2 — Local Browser (
GITLAB_USE_OAUTH) — recommended for better security
For server/remote deployments:
- OAuth2 — MCP Proxy (
GITLAB_MCP_OAUTH) — for remote MCP clients such as Claude.ai - Remote Authorization (
REMOTE_AUTHORIZATION) — multi-user deployments where each caller provides their own token
#### Quick setup paths
- Claude Code: see Claude Code Setup Guide
- VS Code: see VS Code Setup Guide
- GitHub Copilot: see GitHub Copilot Setup Guide
- Codex: see Codex Setup Guide
- Cursor: see Cursor Setup Guide
- Factory AI Droid / OpenClaw / OpenCode style clients: see JSON-Based MCP Clients Setup Guide
- OAuth browser flow details: see OAuth2 Authentication Setup Guide
- OAuth without a localhost callback (SSO, remote shell, background clients): run
zereight-mcp-gitlab auth(GitLab 17.9+ device flow; 17.2–17.8 needoauth2_device_grant_flow), then start the server withGITLAB_USE_OAUTH=true. See standalone device-flow command.
For the simplest local setup, start with a Personal Access Token. For browser-based local auth, use OAuth2. For remote or multi-user deployments, continue to the MCP OAuth and Remote Authorization sections later in this README.
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
Or with Nix, by adding this flake to your own:
# flake.nix
inputs.gitlab-mcp.url = "github:zereight/gitlab-mcp";
# wherever you configure your MCP client:
command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
The store path is pinned by your lock file; update it with nix flake update gitlab-mcp.
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.70. If you always want the newest release, use npx -y @zereight/mcp-gitlab@latest instead. The server prints a notice to stderr on startup when a newer version is available (disable with GITLAB_DISABLE_VERSION_CHECK=true).
#### Using CLI Arguments (for clients with env var issues)
Some MCP clients (like GitHub Copilot CLI) have issues with environment variables. Use CLI arguments instead:
{
"mcpServers": {
"gitlab": {
"command": "zereight-mcp-gitlab",
"args": ["--token=YOUR_GITLAB_TOKEN", "--api-url=https://gitlab.com/api/v4"],
"tools": ["*"]
}
}
}
Available CLI arguments:
--token- GitLab Personal Access Token (replacesGITLAB_PERSONAL_ACCESS_TOKEN)--api-url- GitLab API URL (replacesGITLAB_API_URL)--read-only=true- Enable read-only mode (replacesGITLAB_READ_ONLY_MODE, deprecated — prefer--permission-mode=readonly)--permission-mode- Permission level:readonly,modify(no delete or teardown tools), orfull(replacesGITLAB_PERMISSION_MODE, defaultfull)--toolsets=all- Enable named toolsets (replacesGITLAB_TOOLSETS; unset uses the leancoredefault)--tools=list_issues- Add individual tools (replacesGITLAB_TOOLS)--use-wiki=true- Enable wiki API (replacesUSE_GITLAB_WIKI, legacy — preferGITLAB_TOOLSETS=wiki)--use-milestone=true- Enable milestone API (replacesUSE_MILESTONE, legacy — preferGITLAB_TOOLSETS=milestones)--use-pipeline=true- Enable pipeline API (replacesUSE_PIPELINE, legacy — preferGITLAB_TOOLSETS=pipelines)--disable-version-check=true- Disable the startup new-version notice (replacesGITLAB_DISABLE_VERSION_CHECK)--masking-enabled=true- Enable text-response masking (replacesGITLAB_MASKING_ENABLED)--masking-config- Path to a masking configuration file (replacesGITLAB_MASKING_CONFIG)--masking-policy-file- Path to a protected managed-policy file (replacesGITLAB_MASKING_POLICY_FILE)--masking-workspace-dir- Directory used to resolve masking files (replacesGITLAB_MASKING_WORKSPACE_DIR)--compact-results=true- Truncate oversized MCP tool replies and attach a CLI command for the full payload (replacesGITLAB_MCP_COMPACT_RESULTS; default off)
Facts
- Kind
- MCP server
- Repo
- zereight/gitlab-mcp
- Group
- Uncategorized
- Stars
- 1.6k
- License
- MIT
- Language
- TypeScript
- Last push
- 2026-10-09
- Forks
- 356
- Homepage
- zereight.github.io/gitlab-mcp
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k