๐ Documentation โ Setup guides, environment variables, and the full tool reference live on the hosted docs site.
$ npx -y skills add zereight/gitlab-mcp --agent claude-code
Repo: zereight/gitlab-mcp
What's inside
English | ํ๊ตญ์ด | ็ฎไฝไธญๆ | Portuguรชs (Brasil)
๐ Documentation โ Setup guides, environment variables, and the full tool reference live on the hosted docs site.
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.
discover_tools โ start with a small toolset; activate more at runtime without CQRS-style groupinglist_merge_request_changed_files โ batched get_merge_request_file_diffskills/gitlab-mcp/jmespath on tool calls (see tools/list) shrinks JSON results without changing GitLab API requests; when response masking is enabled, JMESPath runs on masked data.| @zereight/mcp-gitlab | GitLab MCP A (community CQRS-style) | |
|---|---|---|
| Best for | AI agent workflows | Enterprise multi-instance / grouped tools |
| Tool model | ~267 granular tools + discover_tools | ~50โ60 grouped browse_* / manage_* tools |
| MR review | 2-step batched diff | Varies |
| Node.js | >=18.17 | Often >=24 |
| License | MIT | Varies |
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.
The server supports four authentication methods:
For local/desktop use (most common):
GITLAB_PERSONAL_ACCESS_TOKEN) โ simplest setupGITLAB_USE_OAUTH) โ recommended for better securityFor server/remote deployments:
GITLAB_MCP_OAUTH) โ for remote MCP clients such as Claude.aiREMOTE_AUTHORIZATION) โ multi-user deployments where each caller provides their own tokenzereight-mcp-gitlab auth (GitLab 17.9+ device flow; 17.2โ17.8 need oauth2_device_grant_flow), then start the server with GITLAB_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.68. 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).
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 (replaces GITLAB_PERSONAL_ACCESS_TOKEN)--api-url - GitLab API URL (replaces GITLAB_API_URL)--read-only=true - Enable read-only mode (replaces GITLAB_READ_ONLY_MODE, deprecated โ prefer --permission-mode=readonly)--permission-mode - Permission level: readonly, modify (no delete or teardown tools), or full (replaces GITLAB_PERMISSION_MODE, default full)--use-wiki=true - Enable wiki API (replaces USE_GITLAB_WIKI, legacy โ prefer GITLAB_TOOLSETS=wiki)--use-milestone=true - Enable milestone API (replaces USE_MILESTONE, legacy โ prefer GITLAB_TOOLSETS=milestones)--use-pipeline=true - Enable pipeline API (replaces USE_PIPELINE, legacy โ prefer GITLAB_TOOLSETS=pipelines)--disable-version-check=true - Disable the startup new-version notice (replaces GITLAB_DISABLE_VERSION_CHECK)--masking-enabled=true - Enable text-response masking (replaces GITLAB_MASKING_ENABLED)--masking-config - Path to a masking configuration file (replaces GITLAB_MASKING_CONFIG)--masking-policy-file - Path to a protected managed-policy file (replaces GITLAB_MASKING_POLICY_FILE)--masking-workspace-dir - Directory used to resolve masking files (replaces GITLAB_MASKING_WORKSPACE_DIR)--compact-results=true - Truncate oversized MCP tool replies and attach a CLI command for the full payload (replaces GITLAB_MCP_COMPACT_RESULTS; default off)--compact-result-chars - Character threshold for compacting (replaces GITLAB_MCP_COMPACT_RESULT_CHARS; default 4000)CLI arguments take precedence over environment variables.
zereight-mcp-gitlab auth is a subcommand (not an MCP server flag). It runs GitLab device flow and exits. See CLI Arguments.
The same binary is also a gh-style GitLab CLI (tool <name> or curated forms such as mr list). No MCP registration is needed โ set a PAT, or run auth and set GITLAB_USE_OAUTH=true: see CLI without MCP. Use it for the full payload in a terminal. MCP replies stay in the chat unless you set GITLAB_MCP_COMPACT_RESULTS=true (or --compact-results), which replaces oversized tool replies with a preview and a CLI command. Human CLI is never compacted. Same permission mode, toolsets, denied-tools regex, and tool-policy filters. Destructive tools and GITLAB_TOOL_POLICY_APPROVE tools need --yes. See Human CLI.
Fine-grained tool filtering: use
GITLAB_PERMISSION_MODE=modifyto allow create/update while blocking every delete tool and the destructive teardown tools (cancel_pipeline,cancel_pipeline_job,stop_environment,stop_stale_environments,unprotect_branch) โ including destructive mutations (deletion and teardown verbs) throughexecute_graphqlandpush_filesdelete/moveactions โ orGITLAB_PERMISSION_MODE=readonlyfor read-only access. You can also enable toolset groups withGITLAB_TOOLSETS=<group,โฆ>, allow-list individual tools withGITLAB_TOOLS=<tool,โฆ>(e.g. read-only groups plus a few specific write tools), and deny-list by pattern withGITLAB_DENIED_TOOLS_REGEX. The legacyUSE_GITLAB_WIKI/USE_MILESTONE/USE_PIPELINEflags are kept for backward compatibility only. See Tools Reference and Environment Variables.
docker run -i --rm \
-e HOST=0.0.0.0 \
-e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
-e GITLAB_PERMISSION_MODE=readonly \
-e GITLAB_TOOLSETS=wiki,milestones,pipelines \
-e SSE=true \
-e SSE_AUTH_TOKEN=your_mcp_sse_token \
-p 3333:3002 \
zereight050/gitlab-mcp
FAQ
gitlab-mcp is a Claude Code plugin with 2 hand-picked skills for mcp servers work, indexed on Flowy. Install it with the command on its page. It includes gitlab-mcp, gl-cli. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it