GitLab MCP server with 44 tools for projects, MRs, pipelines, and more
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Advanced GitLab MCP server β 58 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.
This is a monorepo with two npm packages:
@structured-world/gitlab-mcp β the MCP server. In-memory and file OAuth-session storage, no database dependency. This is all most users need.@structured-world/gitlab-mcp-db β optional PostgreSQL/Prisma OAuth-session backend for running multiple replicas behind a load balancer. Enable it with OAUTH_STORAGE_TYPE=postgresql; see the PostgreSQL deployment guide for the full setup.Requirements: Node.js >= 24
browse_* for queries, manage_* for commandsghcr.io/structured-world/gitlab-mcp:latestGitLab 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: 58 CQRS tools, each holding several typed actions, expose 230 operations across 26 entity types.
browse_* tools are read-only queries; manage_* tools are writes.browse_pipelines covers
pipelines, jobs, and logs in a single tool.Examples:
browse_pipelines β list, get, jobs, job, logs, triggersmanage_pipeline β create, retry, cancelbrowse_environments β list, get, list_deploymentsmanage_environment β create, update, stop, delete, update_deployment_statusbrowse_deploy_keys / manage_deploy_key β list, get / add, enable, update, deleteFull documentation is available at gitlab-mcp.sw.foundation
| Section | Description |
|---|---|
| Installation | npm, Docker, VS Code, Codex |
| Configuration | Environment variables, feature flags |
| Multi-Instance | Connect to multiple GitLab instances |
| Tool Reference | All 58 tools with parameters |
| OAuth Setup | Team authentication with Claude |
| TLS/HTTPS | Production deployment with SSL |
| Customization | Tool descriptions, action filtering |
| CLI Tools | Browse and export tool documentation |
For the complete tool reference with parameters:
See the Full API Reference for the auto-generated tool documentation.
The server handles GitLab connectivity issues gracefully:
GITLAB_INIT_TIMEOUT_MS (default 5s) regardless of GitLab availabilitydisconnected/failed state), only the manage_context tool is exposed, with local actions such as whoami, switch_profile, 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_changedfailed 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.| Variable | Default | Description |
|---|---|---|
GITLAB_INIT_TIMEOUT_MS | 5000 | Max time to wait for GitLab during startup |
GITLAB_RECONNECT_BASE_DELAY_MS | 5000 | Initial reconnect delay (doubles each attempt) |
GITLAB_RECONNECT_MAX_DELAY_MS | 60000 | Maximum reconnect delay |
GITLAB_HEALTH_CHECK_INTERVAL_MS | 60000 | Health check interval when connected |
GITLAB_FAILURE_THRESHOLD | 3 | Consecutive transient failures before disconnecting |
GITLAB_TOOL_TIMEOUT_MS | 120000 | Max time for tool/bootstrap execution before timeout |
GITLAB_RESPONSE_WRITE_TIMEOUT_MS | 10000 | Max time to flush a non-SSE response before destroying zombie connection (0 to disable; SSE uses heartbeat) |
GITLAB_INSTANCE_CACHE_MAX | 100 | Max number of per-URL instance states kept in memory (OAuth multi-tenant; LRU eviction when exceeded) |
GITLAB_INSTANCE_TTL_MS | 3600000 | TTL for idle per-URL instance states in ms; evicted on next insert (OAuth multi-tenant) |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gitlab-mcp-server-2)<a href="https://allmcps.com/mcp/gitlab-mcp-server-2"><img src="https://allmcps.com/api/badge/gitlab-mcp-server-2?style=directory" alt="GitLab MCP Server on AllMCPs" /></a>