SuperAPIAI Directory

gitlab-mcp

github.com · AI developer platforms

gitlab-mcp is an MCP server for GitLab that lets AI clients manage projects, merge requests, issues, pipelines, wikis, and other resources through the GitLab REST/GraphQL API. By default it loads about 40 tools (38 core tools plus discover_tools and help), and the full toolset contains 291 tools in total, which can be dynamically activated as needed. It supports PAT, local OAuth2, MCP OAuth proxy, and remote authorization, provides three transport modes: stdio, SSE, and Streamable HTTP, and also comes with a Skill + CLI path that requires no MCP registration.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Purpose

gitlab-mcp is a GitLab MCP server that exposes GitLab capabilities such as projects, merge requests (MRs), issues, pipelines, wikis, releases, tags, and milestones to AI clients that support MCP, allowing agents to operate GitLab resources directly in conversations. It is implemented on top of the GitLab REST/GraphQL API and is suitable for clients such as Claude Code, VS Code, GitHub Copilot, Codex, Cursor, Cline, Roo Code, Kilo Code, and Amp Code.

Main capabilities

  • Tool scale and on-demand loading: By default there are 40 tools (38 core tools + discover_tools + help), and the full toolset contains 291 tools in total (288 toolset tools + execute_graphql + discover_tools + help). Calling discover_tools at the start of a session lists categories and activates a category (such as pipelines or wiki); activation applies only to the current session; when OAUTH_STATELESS_MODE=true, it can be persisted through a named GITLAB_TOOLSETS list. The official guidance explicitly does not recommend setting GITLAB_TOOLSETS=all, because it loads about 73k schema tokens.
  • Two-step MR review: first list_merge_request_changed_files, then call get_merge_request_file_diff in batches.
  • Built-in Agent Skill: skills/gitlab-mcp/ provides workflow guidance.
  • Result filtering and compaction: any tool call can pass jmespath to narrow the JSON result; GITLAB_MCP_COMPACT_RESULTS=true can replace oversized responses with a preview plus a CLI command; GITLAB_MCP_LIST_SUMMARY_DEFAULT=true makes most list tools return summaries by default.
  • Permission modes: readonly, modify (excluding deletion and teardown tools), full (default).
  • Security-related: supports text response masking (GITLAB_MASKING_ENABLED), optional NDJSON audit logging (GITLAB_AUDIT_LOG), and tool policy approval. The api toolset (gitlab_api_request) bypasses group/project allowlists and other filters, and must be explicitly listed in GITLAB_TOOLSETS as api to be enabled.

Usage

Installation: npm install -g @zereight/mcp-gitlab; or Homebrew: brew tap zereight/gitlab-mcp https://github.com/zereight/gitlab-mcp Then brew install zereight/gitlab-mcp/zereight-mcp-gitlab; you can also use npx -y @zereight/mcp-gitlab@latest. The official MCP Registry entry is io.github.zereight/gitlab-mcp.

Authentication (four types):

  • Local/desktop: GITLAB_PERSONAL_ACCESS_TOKEN (or GITLAB_PERSONAL_ACCESS_TOKEN_FILE) is the simplest; for local OAuth2 use GITLAB_USE_OAUTH=true.
  • Remote/multi-user: for the MCP OAuth proxy use GITLAB_MCP_OAUTH (for public HTTPS clients such as Claude.ai); REMOTE_AUTHORIZATION lets each caller carry their own PAT or job token.
  • In scenarios without a localhost callback, you can run zereight-mcp-gitlab auth to use the device flow (GitLab 17.9+; 17.2–17.8 requires oauth2_device_grant_flow).

Transport: stdio for local clients; SSE for legacy clients; Streamable HTTP for modern remote deployments.

CLI parameters: --token, --api-url, --permission-mode, --toolsets, --tools, --masking-enabled, --compact-results, --audit-log, --tool-profile, etc. CLI parameters take precedence over environment variables.

Skill + CLI: the same binary is also a gh-style GitLab CLI (tool <name> or mr list, etc.), allowing you to get the full payload in the terminal without MCP registration; setup --cursor / setup --claude can print client configuration, and doctor checks the token, API URL, toolsets, and version.

Claude Desktop bundle: the GitHub Release after v2.3.1 provides gitlab-mcp.mcpb, which can be opened directly in Claude Desktop and configured with a PAT, etc., without separately installing Node.js or npm.

project_id format: a numeric ID or a URL-encoded path, such as group%2Fproject; for nested groups, use %2F between each segment.

Use cases

Suitable for teams that want AI agents to perform tasks in GitLab such as project queries, MR reviews, issue management, pipeline viewing, and Wiki maintenance; also suitable for organizations that need remote or multi-user deployment with per-user token authorization.

Limitations and notes

  • By default only about 40 tools are exposed; more tools need to be activated per session via discover_tools.
  • Do not set GITLAB_TOOLSETS=all, as it incurs about 73k schema token overhead.
  • The api toolset can bypass allowlists and security checks and carries a prompt injection risk; enable it only when explicitly needed.
  • If GITLAB_MASKING_ENABLED is set, version 2.3.29 or later is required; older versions return in plaintext the values of CI/CD variables that GitLab marks as masked or hidden.
  • Remote MCP clients use HTTP https://<gitlab.example.com>/api/v4/mcp with OAuth 2.0 dynamic client registration; stdio via mcp-remote requires Node.js 20 or later.
  • Specific pricing, prices, and performance data are not yet provided.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools