# GitLab

> GitLab is an open-source MCP server for developer tools. GitLab projects, merge requests, pipelines and CI/CD variables, with a read-only lock. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://vish288.github.io/mcp-install?server=mcp-gitlab
- **Repository:** https://github.com/vish288/mcp-gitlab
- **MCP Registry name:** io.github.vish288/mcp-gitlab
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

The README counts 91 tools, 7 resources and 6 prompts against the GitLab REST API, which is a wide surface for an assistant to work with. Areas include merge requests and code reviews, pipelines, CI/CD variables, approvals, issues and projects.

A read-only lock lets you offer a safer subset: with MCP_READ_ONLY=true the 57 write tools are not listed at all. MCP_TOOLSETS can also limit exposure to groups such as code, review, ci, issues, release or admin, which helps clients that cap how many tools they accept.

It works with GitLab.com and self-hosted CE or EE instances and needs neither GitLab Duo nor Premium. Authentication is a personal access token by default, or an OAuth 2.1 proxy mode over streamable-http. A Claude Code plugin stores the token in the credential store instead of a config file.

## Features

- **Merge request work:** Manages merge requests, approvals and code reviews through the API.
- **Pipelines and CI/CD:** Covers pipelines and CI/CD variables.
- **Read-only mode:** Hides the 57 write tools when MCP_READ_ONLY is set.
- **Toolset groups:** Limits exposure to code, review, ci, issues, release or admin tools.
- **OAuth mode:** Optional OAuth 2.1 proxy over streamable-http instead of a token.
- **Claude Code plugin:** Installs from a marketplace and prompts for URL and token.

## Good for

- Summarize and review open merge requests
- Check why a pipeline failed and inspect CI variables
- Triage issues across a self-hosted GitLab
- Run a locked-down read-only assistant on production projects

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-gitlab --env GITLAB_TOKEN='<GITLAB_TOKEN>' --env GITLAB_URL='<GITLAB_URL>' --env GITLAB_OAUTH_CLIENT_SECRET='<GITLAB_OAUTH_CLIENT_SECRET>' --env GITLAB_OAUTH_JWT_KEY='<GITLAB_OAUTH_JWT_KEY>' --env GITLAB_HTTP_BEARER_TOKEN='<GITLAB_HTTP_BEARER_TOKEN>' -- uvx mcp-gitlab
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>",
        "GITLAB_URL": "<GITLAB_URL>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<GITLAB_OAUTH_CLIENT_SECRET>",
        "GITLAB_OAUTH_JWT_KEY": "<GITLAB_OAUTH_JWT_KEY>",
        "GITLAB_HTTP_BEARER_TOKEN": "<GITLAB_HTTP_BEARER_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>",
        "GITLAB_URL": "<GITLAB_URL>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<GITLAB_OAUTH_CLIENT_SECRET>",
        "GITLAB_OAUTH_JWT_KEY": "<GITLAB_OAUTH_JWT_KEY>",
        "GITLAB_HTTP_BEARER_TOKEN": "<GITLAB_HTTP_BEARER_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "mcp-gitlab": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>",
        "GITLAB_URL": "<GITLAB_URL>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<GITLAB_OAUTH_CLIENT_SECRET>",
        "GITLAB_OAUTH_JWT_KEY": "<GITLAB_OAUTH_JWT_KEY>",
        "GITLAB_HTTP_BEARER_TOKEN": "<GITLAB_HTTP_BEARER_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>",
        "GITLAB_URL": "<GITLAB_URL>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<GITLAB_OAUTH_CLIENT_SECRET>",
        "GITLAB_OAUTH_JWT_KEY": "<GITLAB_OAUTH_JWT_KEY>",
        "GITLAB_HTTP_BEARER_TOKEN": "<GITLAB_HTTP_BEARER_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>",
        "GITLAB_URL": "<GITLAB_URL>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<GITLAB_OAUTH_CLIENT_SECRET>",
        "GITLAB_OAUTH_JWT_KEY": "<GITLAB_OAUTH_JWT_KEY>",
        "GITLAB_HTTP_BEARER_TOKEN": "<GITLAB_HTTP_BEARER_TOKEN>"
      }
    }
  }
}
```

## FAQ

### Does it work with self-hosted GitLab?

Yes, GitLab.com and self-hosted CE or EE instances; set GITLAB_URL.

### Do I need GitLab Premium or Duo?

No, the README says neither is required.

### How many tools does it have?

91 tools, 7 resources and 6 prompts, of which 57 are write tools.

### How does it authenticate?

With a personal access token by default, or an OAuth app in oauth mode, which needs streamable-http.

### Is GitLab free?

Yes. GitLab is open source, so you can use and self-host it for free.

### How do I add GitLab to Claude Code?

Run this command in your terminal: claude mcp add mcp-gitlab --env GITLAB_TOKEN='<GITLAB_TOKEN>' --env GITLAB_URL='<GITLAB_URL>' --env GITLAB_OAUTH_CLIENT_SECRET='<GITLAB_OAUTH_CLIENT_SECRET>' --env GITLAB_OAUTH_JWT_KEY='<GITLAB_OAUTH_JWT_KEY>' --env GITLAB_HTTP_BEARER_TOKEN='<GITLAB_HTTP_BEARER_TOKEN>' -- uvx mcp-gitlab

### What are the best alternatives to GitLab?

The closest alternatives to GitLab are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/gitlab-2
