# GitLab MCP (MCP server)

> GitLab MCP is an MCP server that adds developer tools to AI assistants such as Claude Desktop, Claude Code and Cursor. GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more. It has 2,027 GitHub stars, is released under the MIT license and runs locally with npx -y @zereight/mcp-gitlab.

📖 Documentation → Setup guides, environment variables, and the full tool reference live on the hosted docs site. Agent-workflow-optimized GitLab MCP — manage projects, merge requests, issues, pipelines, wiki, releases, tags, milestones, and more through stdio, SSE, and Streamable HTTP.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/zereight/gitlab-mcp |
| GitHub stars | 2,027 |
| License | MIT |
| Language | TypeScript |
| Transport | stdio |
| Packages | npm: @zereight/mcp-gitlab |
| Remote URL | none |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Developer tools |
| Latest release | v2.1.69 (Oct 3, 2026) |
| Last commit | Oct 6, 2026 |
| MCP registry name | io.github.zereight/gitlab-mcp |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "your-value",
        "GITLAB_JOB_TOKEN": "your-value",
        "GITLAB_AUTH_COOKIE_PATH": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env GITLAB_PERSONAL_ACCESS_TOKEN=your-value --env GITLAB_JOB_TOKEN=your-value --env GITLAB_AUTH_COOKIE_PATH=your-value --transport stdio gitlab-mcp -- npx -y @zereight/mcp-gitlab
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "your-value",
        "GITLAB_JOB_TOKEN": "your-value",
        "GITLAB_AUTH_COOKIE_PATH": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "gitlab_personal_access_token",
      "description": "GITLAB_PERSONAL_ACCESS_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gitlab_job_token",
      "description": "GITLAB_JOB_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gitlab_auth_cookie_path",
      "description": "GITLAB_AUTH_COOKIE_PATH",
      "password": true
    }
  ],
  "servers": {
    "gitlab-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab_personal_access_token}",
        "GITLAB_JOB_TOKEN": "${input:gitlab_job_token}",
        "GITLAB_AUTH_COOKIE_PATH": "${input:gitlab_auth_cookie_path}"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `GITLAB_PERSONAL_ACCESS_TOKEN` (secret) (required): 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` (secret): Optional GitLab CI job token to use instead of a personal access token when running inside GitLab CI.
- `GITLAB_AUTH_COOKIE_PATH` (secret): 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.

## Similar MCP servers

- [Gemini CLI](https://appsgit.com/mcp-servers/gemini-cli): An open-source AI agent that brings the power of Gemini directly into your terminal. (107,240 stars, Apache-2.0)
- [Front-End Checklist](https://appsgit.com/mcp-servers/front-end-checklist): Review frontend code and live pages against 386 quality-gated web development rules. (74,390 stars, MIT)
- [Claude Flow](https://appsgit.com/mcp-servers/claude-flow): AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev. (74,016 stars, MIT, needs API key)
- [Codebase Memory](https://appsgit.com/mcp-servers/codebase-memory): Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens. (45,917 stars, MIT)
- [Bytedance Filesystem](https://appsgit.com/mcp-servers/bytedance-filesystem): MCP server for filesystem access. (39,206 stars, Apache-2.0)
- [GitHub](https://appsgit.com/mcp-servers/github): Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language. (33,414 stars, MIT, official, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/gitlab-mcp
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
