Advanced GitLab MCP server

Registre officiel Outils de développement

64 CQRS tools exposing 234 GitLab operations across 26 entity types

Que pouvez-vous faire avec Advanced GitLab MCP server ?

  • 64 tools across 26 entity types — projects, merge requests, pipelines, work items, wiki, and more
  • CQRS architecture — browse_* for queries, manage_* for commands
  • Connection resilience — Bounded startup, auto-reconnect with exponential backoff, disconnected mode when GitLab is unreachable
  • Multi-instance support — Connect to GitLab.com, self-managed, and self-hosted instances with per-instance OAuth and rate limiting
  • Multiple transports — stdio, SSE, StreamableHTTP
  • OAuth 2.1 — Per-user authentication via Claude Custom Connector
  • Read-only mode — Safe operation for production environments
  • Auto-discovery — Detects GitLab config from git remotes

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @structured-world/gitlab-mcp
Claude Code
claude mcp add advanced-gitlab-mcp-server -e 'GITLAB_TOKEN=<your gitlab_token>' -e 'GITLAB_API_URL=<GITLAB_API_URL>' -e 'GITLAB_READ_ONLY_MODE=<GITLAB_READ_ONLY_MODE>' -- npx -y @structured-world/gitlab-mcp@12.0.2
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "advanced-gitlab-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@structured-world/gitlab-mcp@12.0.2"
            ],
            "env": {
                "GITLAB_TOKEN": "<your gitlab_token>",
                "GITLAB_API_URL": "<GITLAB_API_URL>",
                "GITLAB_READ_ONLY_MODE": "<GITLAB_READ_ONLY_MODE>"
            }
        }
    }
}

Variables d'environnement

  • GITLAB_TOKEN obligatoire secret GitLab Personal Access Token with 'api' and 'read_user' scopes
  • GITLAB_API_URL GitLab instance API URL for self-hosted instances (defaults to https://gitlab.com)
  • GITLAB_READ_ONLY_MODE Enable read-only mode (disable all manage_* write operations)
MCPB package https://github.com/structured-world/gitlab-mcp/releases/download/gitlab-mcp-v12.0.2/gitlab-mcp-12.0.2.mcpb

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Advanced GitLab MCP server
  2. Packages
  3. Quick Start
  4. Highlights
  5. Tool model
  6. Documentation
  7. Docker
  8. Connection Resilience
  9. Feature Flags
  10. Contributing
  11. Support the Project
  12. License

Advanced GitLab MCP server

Advanced GitLab MCP server — 64 CQRS tools exposing 230 GitLab operations across 26 entity types. The tool catalog and parameters are filtered to each instance's GitLab version, tier, and token scopes, so the agent sees only what the connected instance actually supports.

Packages

This is a monorepo with two npm packages:

Quick Start

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@structured-world/gitlab-mcp"],
      "env": {
        "GITLAB_TOKEN": "your_gitlab_token",
        "GITLAB_API_URL": "https://gitlab.com"
      }
    }
  }
}

Requirements: Node.js >= 24

Highlights

  • 64 tools across 26 entity types — projects, merge requests, pipelines, work items, wiki, and more
  • CQRS architecture — browse_* for queries, manage_* for commands
  • Connection resilience — Bounded startup, auto-reconnect with exponential backoff, disconnected mode when GitLab is unreachable
  • Multi-instance support — Connect to GitLab.com, self-managed, and self-hosted instances with per-instance OAuth and rate limiting
  • Multiple transports — stdio, SSE, StreamableHTTP
  • OAuth 2.1 — Per-user authentication via Claude Custom Connector
  • Read-only mode — Safe operation for production environments
  • Auto-discovery — Detects GitLab config from git remotes
  • Fine-grained control — Enable/disable tool groups, filter actions, customize descriptions
  • Docker support — ghcr.io/structured-world/gitlab-mcp:latest

Tool model

GitLab exposes hundreds of API operations. Giving each its own MCP tool floods an agent's context; a thin API wrapper pushes that complexity back onto the agent. This server takes a third path: 64 CQRS tools, each holding several typed actions, expose 230 operations across 26 entity types.

  • browse_* tools are read-only queries; manage_* tools are writes.
  • Sub-resources fold into actions rather than new tools — browse_pipelines covers pipelines, jobs, and logs in a single tool.
  • The tool list, actions, and parameters are resolved at schema-generation time against GitLab version, tier, token scopes, admin-mode, feature flags, and profiles.

Examples:

  • browse_pipelines — list, get, jobs, job, logs, triggers
  • manage_pipeline — create, retry, cancel
  • browse_environments — list, get, list_deployments
  • manage_environment — create, update, stop, delete, update_deployment_status
  • browse_deploy_keys / manage_deploy_key — list, get / add, enable, update, delete

Documentation

Full documentation is available at gitlab-mcp.sw.foundation

SectionDescription
Installationnpm, Docker, VS Code, Codex
ConfigurationEnvironment variables, feature flags
Multi-InstanceConnect to multiple GitLab instances
Tool ReferenceAll 64 tools with parameters
OAuth SetupTeam authentication with Claude
TLS/HTTPSProduction deployment with SSL
CustomizationTool descriptions, action filtering
CLI ToolsBrowse and export tool documentation
Auto-generated Tool Reference

For the complete tool reference with parameters:

# View locally
yarn list-tools --detail

# Generate documentation
yarn list-tools --export --toc > docs/tools/api-reference.md

See the Full API Reference for the auto-generated tool documentation.

Docker

# HTTP mode
docker run -e PORT=3002 -e GITLAB_TOKEN=your_token -p 3333:3002 \
  ghcr.io/structured-world/gitlab-mcp:latest

# stdio mode
docker run -i --rm -e GITLAB_TOKEN=your_token \
  ghcr.io/structured-world/gitlab-mcp:latest

Connection Resilience

The server handles GitLab connectivity issues gracefully:

  • Bounded startup — Server starts within GITLAB_INIT_TIMEOUT_MS (default 5s) regardless of GitLab availability
  • Disconnected mode — When GitLab is unreachable (disconnected/failed state), only the manage_context tool is exposed, with local actions such as whoami, switch_preset, and set_scope for diagnostics. During active reconnect (connecting state), the full tool list remains available so MCP clients don't lose their tool catalog during brief outages. MCP clients are notified of tool availability changes via tools/list_changed
  • Auto-reconnect — Exponential backoff reconnection (5s → 60s) with ±10% jitter
  • Error classification — Transient errors (network, 5xx, timeouts) trigger auto-reconnect. Auth/config errors at startup transition to failed state (no auto-reconnect). Mid-session token revocation is detected via an authenticated HEAD /api/v4/user check that runs alongside each periodic health check (static token mode only; skipped in OAuth mode). A 401 or 403 on this check transitions the instance to failed state immediately.
  • Instance health monitor — Each monitored instance URL has its own XState state machine. Untracked OAuth URLs currently pass through as reachable.
VariableDefaultDescription
GITLAB_INIT_TIMEOUT_MS5000Max time to wait for GitLab during startup
GITLAB_RECONNECT_BASE_DELAY_MS5000Initial reconnect delay (doubles each attempt)
GITLAB_RECONNECT_MAX_DELAY_MS60000Maximum reconnect delay
GITLAB_HEALTH_CHECK_INTERVAL_MS60000Health check interval when connected
GITLAB_FAILURE_THRESHOLD3Consecutive transient failures before disconnecting
GITLAB_TOOL_TIMEOUT_MS120000Max time for tool/bootstrap execution before timeout
GITLAB_RESPONSE_WRITE_TIMEOUT_MS10000Max time to flush a non-SSE response before destroying zombie connection (0 to disable; SSE uses heartbeat)
GITLAB_INSTANCE_CACHE_MAX100Max number of per-URL instance states kept in memory (OAuth multi-tenant; LRU eviction when exceeded)
GITLAB_INSTANCE_TTL_MS3600000TTL for idle per-URL instance states in ms; evicted on next insert (OAuth multi-tenant)

Feature Flags

FlagDefaultTools Enabled
USE_LABELStrueLabel management
USE_MRStrueMerge requests
USE_FILEStrueFile operations
USE_VARIABLEStrueCI/CD variables
USE_WORKITEMStrueIssues, epics, tasks
USE_WEBHOOKStrueWebhook management
USE_SNIPPETStrueCode snippets
USE_INTEGRATIONStrue50+ integrations
USE_GITLAB_WIKItrueWiki pages
USE_MILESTONEtrueMilestones
USE_PIPELINEtruePipelines & CI/CD
USE_RELEASEStrueRelease management
USE_REFStrueBranch & tag management
USE_MEMBERStrueTeam members
USE_SEARCHtrueCross-project search
USE_ITERATIONStrueIteration planning (sprints)
USE_CI_TOKENStrueCI access credentials: job token scope and deploy keys
USE_ENVIRONMENTStrueEnvironments and deployments
USE_RUNNERStrueCI runner management
USE_REGISTRYtrueContainer registry repositories and tags
USE_ACCESS_TOKENStrueProject/group/personal access token management
USE_AUDIT_EVENTStrueAudit events (Premium+)
USE_VULNERABILITIEStrueVulnerability management (Ultimate)

Contributing

See CONTRIBUTING.md for development setup, testing, and PR guidelines.

Support the Project

USDT (TRC-20): TFDsezHa1cBkoeZT5q2T49Wp66K8t2DmdA

License

Apache License 2.0 — see LICENSE for details.

Based on zereight/gitlab-mcp (MIT). See LICENSE.MIT.

Questions fréquentes

Qu'est-ce que Advanced GitLab MCP server ?

64 CQRS tools exposing 234 GitLab operations across 26 entity types

Comment installer Advanced GitLab MCP server ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add advanced-gitlab-mcp-server -e 'GITLAB_TOKEN=<your gitlab_token>' -e 'GITLAB_API_URL=<GITLAB_API_URL>' -e 'GITLAB_READ_ONLY_MODE=<GITLAB_READ_ONLY_MODE>' -- npx -y @structured-world/gitlab-mcp@12.0.2. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour Advanced GitLab MCP server ?

Oui. Il attend GITLAB_TOKEN, à renseigner dans sa configuration.

Advanced GitLab MCP server est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient Advanced GitLab MCP server ?

Il est publié par structured-world. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.