A comprehensive GitLab MCP server for AI clients, supporting stdio/SSE/Streamable HTTP transports and multiple authentication methods, covering Projects, MRs, Issues, Pipelines, Wiki, and more.
GitLab MCP Server is a TypeScript/Node.js MCP (Model Context Protocol) server that standardizes GitLab platform capabilities for AI coding assistants. It supports three transport protocols (stdio, SSE, Streamable HTTP) and four authentication methods (PAT, local OAuth2, MCP OAuth Proxy, Remote Authorization), adapting to scenarios from personal local development to enterprise multi-tenant remote deployment.
For GitLab API coverage, it supports project management, repository browsing, Merge Requests, Issues, Pipelines (opt-in), Wiki (opt-in), Releases, Labels, and Milestones (opt-in). The discover_tools mechanism enables dynamic tool discovery for on-demand capability activation.
Runtime safety features include read-only mode (GITLAB_READ_ONLY_MODE), session isolation, timeout control (default 1 hour), rate limiting (default 60 req/min/session), and max concurrent sessions (default 1000). Stateless mode (OAUTH_STATELESS_MODE) with shared secrets supports multi-Pod HPA horizontal scaling.
Flexible deployment: zero-config local startup via npx @zereight/mcp-gitlab, remote shared service via Docker image zereight050/gitlab-mcp, or direct usage in GitLab CI via JOB-TOKEN. Compatible with Claude Code, Cursor, Cline, GitHub Copilot, and other mainstream MCP clients, with Smithery platform integration via smithery.yaml.
Quick Start (npx local stdio):
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab",
"--token=YOUR_GITLAB_TOKEN",
"--api-url=https://gitlab.com/api/v4"
],
"tools": ["*"]
}
}
}
Docker Remote Deployment (Streamable HTTP):
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 STREAMABLE_HTTP=true \
-p 3333:3002 \
zereight050/gitlab-mcp
Core CLI Parameters:
| Parameter | Description |
|---|---|
--token | GitLab PAT |
--api-url | GitLab API base URL |
--read-only=true | Enable read-only mode |
--use-wiki=true | Enable Wiki API |
--use-milestone=true | Enable Milestone API |
--use-pipeline=true | Enable Pipeline API |
Authentication Methods:
| Method | Use Case |
|---|---|
| PAT | Local personal use, CI environments |
| Local OAuth2 | Local scenarios requiring user interaction |
| MCP OAuth Proxy | Remote clients like Claude.ai |
| Remote Authorization | Multi-user/multi-tenant, per-request token |
| JOB-TOKEN | Inside GitLab CI/CD pipelines |