
GitLab MCP Server
by zereightio.github.zereight/gitlab-mcpv2.2.0
GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more.
context tax
queued
security
queued
cold start
queued
freshness
Active1d ago
Install GitLab MCP server
Install in Claude Code
claude mcp add gitlab-zereight -e GITLAB_PERSONAL_ACCESS_TOKEN='<gitlab-personal-access-token>' -e GITLAB_JOB_TOKEN='<gitlab-job-token>' -- npx -y @zereight/mcp-gitlabInstall in Cursor
{
"mcpServers": {
"gitlab-zereight": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<gitlab-personal-access-token>",
"GITLAB_JOB_TOKEN": "<gitlab-job-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"gitlab-zereight": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<gitlab-personal-access-token>",
"GITLAB_JOB_TOKEN": "<gitlab-job-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"gitlab-zereight": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<gitlab-personal-access-token>",
"GITLAB_JOB_TOKEN": "<gitlab-job-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"gitlab-zereight": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<gitlab-personal-access-token>",
"GITLAB_JOB_TOKEN": "<gitlab-job-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GITLAB_PERSONAL_ACCESS_TOKEN | yes | yes | GitLab personal access token for local stdio use. Create a token with the GitLab scopes needed by the tools you plan to use, such as api or read_api. |
| GITLAB_JOB_TOKEN | — | yes | Optional GitLab CI job token to use instead of a personal access token when running inside GitLab CI. |
| GITLAB_AUTH_COOKIE_PATH | — | — | Optional path to a GitLab authentication cookie file for cookie-based authentication. |
| GITLAB_API_URL | — | — | GitLab API base URL. Use https://gitlab.com/api/v4 for GitLab.com or your self-managed GitLab API URL. |
| GITLAB_ALLOWED_PROJECT_IDS | — | — | Optional comma-separated list of GitLab project IDs that this server is allowed to access. |
| GITLAB_READ_ONLY_MODE | — | — | Set to true to expose only read-only tools and block write operations. |
| USE_GITLAB_WIKI | — | — | Set to true to enable GitLab wiki tools. |
| GITLAB_TOOLSETS | — | — | Optional comma-separated list of toolsets to enable, such as projects, issues, merge_requests, pipelines, releases, users, groups, wiki, or search. |
| GITLAB_TOOLS | — | — | Optional comma-separated list of individual tool names to add on top of enabled toolsets. |
| GITLAB_DENIED_TOOLS_REGEX | — | — | Optional regular expression used to hide matching tools from the server. |
| GITLAB_TOOL_POLICY_APPROVE | — | — | Optional comma-separated list of tool names that require explicit approval before execution. |
| GITLAB_TOOL_POLICY_HIDDEN | — | — | Optional comma-separated list of tool names to hide from tools/list. |
| NODE_TLS_REJECT_UNAUTHORIZED | — | — | Set to 0 only when you intentionally need to connect to a GitLab instance with invalid or self-signed TLS certificates. |
| GITLAB_CA_CERT_PATH | — | — | Optional path to a custom CA certificate file for self-managed GitLab instances. |
| GITLAB_MASKING_ENABLED | — | — | Set to true to mask text tool results and returned errors using built-in or configured rules. |
| GITLAB_MASKING_CONFIG | — | — | Optional path to a response-masking JSON configuration file. |
| GITLAB_MASKING_POLICY_FILE | — | — | Optional protected server-owned JSON file containing managed masking policies. |
| GITLAB_MASKING_WORKSPACE_DIR | — | — | Directory used to resolve response-masking configuration paths. |
Freshness
Active — last maintenance signal 1d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-08 · 1d ago · GitHub
Latest release
2026-10-08 · 1d ago · GitHub · v2.2.0
Package published
no data · npm/PyPI
Registry entry updated
2026-10-08 · 1d ago · official registry · v2.2.0
FAQ
›How do I install the GitLab MCP server in Claude Code?
Run: claude mcp add gitlab-zereight -e GITLAB_PERSONAL_ACCESS_TOKEN='<gitlab-personal-access-token>' -e GITLAB_JOB_TOKEN='<gitlab-job-token>' -- npx -y @zereight/mcp-gitlab. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does GitLab require an API key?
Yes. It expects GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_JOB_TOKEN, of which 2 are secrets.
›Can I use GitLab as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is GitLab in the official MCP registry?
Yes, as io.github.zereight/gitlab-mcp.
Alternatives to GitLab
Other version control MCP servers.