Labsco
jmrplens logo

Gitlab MCP Server

โ˜… 28

from jmrplens

Model Context Protocol (MCP) server for GitLab โ€” exposes 1006 GitLab REST & GraphQL API operations as MCP tools (28 meta-tools / 43 enterprise), 24 resources, 38 prompts, and 17 completion types for AI assistants. Written in Go, single static binary, stdio and HTTP transport.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

GitLab MCP Server โ€” let your AI assistant drive GitLab in plain language

GitLab MCP Server

Quality Gate Coverage Glama MCP Score

Connect your AI assistant to GitLab so it can review merge requests, triage pipelines, manage issues, and draft releases โ€” in plain language. One static binary (or a container), 1000+ GitLab tools over the full REST + GraphQL API, working with Claude, Cursor, VS Code, and any MCP client.

You talk to your AI assistant; it does the GitLab work. No project IDs, API endpoints, or JSON to remember.

"Review merge request !15 โ€” is it safe to merge?" ยท "Why did the last pipeline fail?" ยท "List open issues assigned to me" ยท "Generate release notes from v1.0 to v2.0"


๐Ÿค– Using an AI assistant? Give it this repository URL and ask it to install the server for your client. Everything a model needs to do it headlessly โ€” the declarative per-client config, claude mcp add one-liners, and defaults โ€” is in llms.txt (no interactive wizard required).

Why this server

  • ๐Ÿ—ฃ๏ธ Plain-language GitLab. The AI translates "is MR !15 safe to merge?" into the right API calls. You don't touch endpoints, IDs, or JSON.
  • ๐Ÿงฐ The whole platform โ€” 1000+ tools. Broad GitLab REST v4 + GraphQL coverage: projects, branches, tags, releases, merge requests, issues, pipelines, jobs, groups, users, wikis, environments, deployments, packages, container registry, runners, feature flags, CI/CD variables, security, admin, tokens, and more.
  • ๐Ÿชถ Low-token by default. The default dynamic surface exposes just 2 tools (find + execute) while reaching the full catalog โ€” so it fits any client's context window. (Token footprint โ†’)
  • โœ… Proven with real models. An automated evaluator runs Anthropic, Google, OpenAI, and Qwen against live GitLab instances: 99.5% aggregate success across thousands of operations. (Results โ†’)
  • ๐Ÿ”’ Safe by design. Read-only mode, safe mode (dry-run preview of every mutation), TLS options for self-hosted GitLab, and continuous SonarCloud quality/security gates.
  • ๐Ÿ–ฅ๏ธ Runs anywhere. One static binary or container; Windows, Linux & macOS; amd64 & arm64; stdio (desktop) and HTTP (remote).
More: resources, prompts, and capabilities
  • 45 MCP resources (read-only data: projects, issues, pipelines, MRs, branches, members, the surface-aware gitlab://tools manifest, and workflow best-practice guides).
  • 37 MCP prompts (code review, pipeline status, risk assessment, release notes, standup, analytics, audit, and more).
  • 4 elicitation wizards (interactive issue/MR/release/project creation).
  • 3 MCP capabilities (completions, progress, elicitation) and 50 SVG tool icons for visual identification in MCP clients.
  • Pagination on every list endpoint with full metadata.

Tool surfaces

The server can present GitLab in three shapes, controlled by TOOL_SURFACE. The default needs no configuration.

SurfaceVisible toolsBest for
Dynamic (default)2 (gitlab_find_action, gitlab_execute_action)Lowest token cost; reaches the full catalog via find/execute.
Meta-tools (meta)32 base / 49 Ultimate / 50 GitLab.com UltimateDomain-grouped dispatchers with an action parameter.
Individual (individual)~862 Free/CE ยท ~999 Premium ยท 1065โ€“1071 UltimateOne MCP tool per GitLab operation; needs a large context window.

Tool counts scale with your GitLab edition (GITLAB_TIER); higher tiers expose more actions. See Dynamic Toolset and Meta-Tools Reference for the ranking model, safety guards, and full catalogs. For dynamic runs where resources dominate context, set CAPABILITY_SURFACE=minimal.

Token Footprint

Measured with go run ./cmd/audit_tokens/ -footprint against the current catalog. Totals estimate startup context visible to an MCP client: visible tool schemas plus shared resources and prompts, using the cl100k_base tokenizer (GPT-4/GPT-3.5 encoding). For the full matrix (meta and individual surfaces, all META_PARAM_SCHEMA modes), see Token Footprint Reference.

Default configuration: with TOOL_SURFACE unset or TOOL_SURFACE=dynamic, CAPABILITY_SURFACE=full, META_TOOLS unset, META_PARAM_SCHEMA=opaque, and GITLAB_TIER unset (detected, fallback free), the server uses the dynamic find/execute surface. Use TOOL_SURFACE=meta only when you explicitly want domain meta-tools; use TOOL_SURFACE=individual only when your client can handle the full tool catalog.

Configuration (TOOL_SURFACE / CAPABILITY_SURFACE)TierVisible toolsReachable actionsMETA_PARAM_SCHEMATool schema tokensShared tokensTotal tokens
dynamic / full (default)Free/CE2865n/a2,18031,75833,938
dynamic / minimalFree/CE2865n/a2,1801,0883,268
dynamic / full (default)Premium21,003n/a2,18031,75833,938
dynamic / minimalPremium21,003n/a2,1801,0883,268
dynamic / full (default)Ultimate21,069n/a2,18031,75833,938
dynamic / minimalUltimate21,069n/a2,1801,0883,268

Rows use the base Community Edition catalog unless the Tier column says otherwise. GITLAB_TIER controls which actions are available; higher tiers expose more tools and thus more reachable actions.

Compatibility

MCP CapabilitySupport
ToolsUp to 1071 individual / 32โ€“50 meta
Resources45 (static + templates)
Prompts37 templates
CompletionsProject, user, group, branch, tag
LoggingStructured (text/JSON) to stderr
ProgressTool execution progress reporting
Elicitation4 interactive creation wizards

Tested with: VS Code + GitHub Copilot, Claude Desktop, Claude Code, Cursor, Windsurf, JetBrains IDEs, Zed, Kiro, Cline. See the full Compatibility Matrix.

AI Model Tool-Use Evaluation

The project includes an automated evaluator for model-facing MCP quality. It runs schema-only checks against the tool catalog or executes validated model tool calls through MCP against Docker GitLab CE or licensed Enterprise instances populated with fixtures. It measures whether each model chooses the correct action, sends valid parameters, recovers from actionable GitLab errors, and respects destructive-action safeguards โ€” across Anthropic, Google, OpenAI, and Qwen.

Current published result: Docker CE dynamic 20260627-232303.

ProviderModelCompatibilityTool accuracyRecoveryDocker live status
Anthropicclaude-haiku-4-5-20251001OK100.0%100.0% (2/2)100.0% final across 555 ops
Googlegemini-flash-latestOK100.0%100.0% (4/4)100.0% final across 555 ops
OpenAIgpt-5.4-nanoReview99.3%84.6% (11/13)98.0% final across 555 ops
Qwenqwen3.6-flashOK100.0%100.0% (5/5)100.0% final across 555 ops

The published model-evaluation set covers 596 task attempts and 2220 expected MCP operations. Across the selected reports, models emitted 2265 tool calls over 2265 model requests, with 99.5% aggregate final success. See AI Model Evaluation Results for the detailed current matrix.

Enterprise meta & dynamic evaluation results

Current published result: Docker Enterprise meta 20260527.

ProviderModelCompatibilityTool accuracyRecoveryDocker live status
Anthropicclaude-haiku-4-5-20251001OK100.0%100.0% (1/1)100.0% final across 84 ops
Googlegemini-flash-latestReview78.2%100.0% (7/7)100.0% final across 84 ops
OpenAIgpt-5.4-nanoReview100.0%100.0% (4/4)100.0% final across 84 ops
Qwenqwen3.6-flashOK100.0%100.0% (1/1)100.0% final across 84 ops

The published model-evaluation set covers 92 task attempts and 336 expected MCP operations. Across the selected reports, models emitted 345 tool calls over 350 model requests, with 100.0% aggregate final success. See AI Model Evaluation Results for the detailed current matrix.

Current published result: Docker Enterprise dynamic 20260628-015421.

ProviderModelCompatibilityTool accuracyRecoveryDocker live status
Anthropicclaude-haiku-4-5-20251001OK100.0%100.0% (1/1)100.0% final across 202 ops
Googlegemini-flash-latestOK100.0%100.0% (2/2)100.0% final across 202 ops
OpenAIgpt-5.4-nanoOK100.0%No repairs100.0% final across 202 ops
Qwenqwen3.6-flashOK100.0%100.0% (1/1)100.0% final across 202 ops

The published model-evaluation set covers 124 task attempts and 808 expected MCP operations. Across the selected reports, models emitted 817 tool calls over 817 model requests, with 100.0% aggregate final success. See AI Model Evaluation Results for the detailed current matrix.

Documentation

Full documentation is at jmrplens.github.io/gitlab-mcp-server. Use this map for the source-of-truth reference on a specific area:

DocumentDescription
Getting StartedDownload, setup wizard, per-client configuration
IDE ConfigurationPer-client stdio, HTTP legacy, and HTTP OAuth examples
ConfigurationEnvironment variables, transport modes, TLS
Environment VariablesExhaustive environment variable table with defaults and examples
CLI ReferenceAll command-line flags, exit codes, and runtime examples
HTTP Server ModeShared HTTP deployments, authentication, server pool isolation
Tools ReferenceAll individual tools with input/output schemas, including GitLab.com-only Orbit
Meta-Tools32/48/49 domain meta-tools with action dispatching
Dynamic Toolset2-tool low-token mode with canonical action catalog, safety model, and examples
ResourcesAll 45 resources with URI templates
PromptsAll 37 prompts with arguments and output format
Auto-UpdateSelf-update mechanism, modes, and release format
TestingUnit, E2E, schema model evaluation, Docker model evaluation, and curated model results
SecuritySecurity model, token scopes, input validation
ArchitectureSystem architecture, component design, data flow
Development GuideBuilding, testing, CI/CD, contributing
TroubleshootingCommon startup, token, TLS, transport, and tool-discovery issues

Building from Source

git clone https://github.com/jmrplens/gitlab-mcp-server.git
cd gitlab-mcp-server
make build

The published container image is ghcr.io/jmrplens/gitlab-mcp-server:latest. See the Development Guide for cross-compilation, Docker Compose, and contributing guidelines.

ComponentTechnology
LanguageGo 1.26+
MCP SDKgithub.com/modelcontextprotocol/go-sdk v1.6.1
GitLab Clientgitlab.com/gitlab-org/api/client-go/v2 v2.43.0
Transportstdio (default), HTTP (Streamable HTTP)