# Advanced GitLab MCP server

> Advanced GitLab MCP server is an open-source MCP server for developer tools. GitLab MCP server with 66 tools covering projects, merge requests, pipelines and wikis. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, API
- **Website:** https://gitlab-mcp.sw.foundation
- **Repository:** https://github.com/structured-world/gitlab-mcp
- **MCP Registry name:** io.github.structured-world/gitlab-mcp
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

Instead of one tool per API call, this server groups GitLab's API into 60 CQRS-style tools: browse_* tools run queries and manage_* tools run commands, with 242 typed actions between them, plus 6 setup helpers. The README says the tool list and parameters are filtered to the connected instance's GitLab version, tier and token scopes, so an agent only sees what that instance supports.

It can connect to several GitLab instances at once, each with its own OAuth settings, rate limiting and tier detection. Authentication is a personal access token (api and read_user scopes, or read_api for read-only mode) or per-user OAuth 2.1 through a Claude custom connector. Self-hosted GitLab works by setting GITLAB_API_URL.

The repository is a monorepo with the server package and an optional PostgreSQL/Prisma package for sharing OAuth sessions across replicas behind a load balancer. It also covers GitLab Duo sessions, which can consume credits and change GitLab, so those calls deserve a careful read. Node.js 24 or newer is required.

## Features

- **Action-based tools:** Consolidates 242 typed actions into 60 browse and manage tools to keep the context small.
- **Read-only mode:** GITLAB_READ_ONLY_MODE disables every manage_* write operation.
- **Multi-instance support:** Connects to several GitLab instances with per-instance OAuth and rate limits.
- **Version-aware catalog:** Shows only the tools the instance's version, tier and token scopes allow.
- **Several transports:** Runs over stdio, SSE or Streamable HTTP, via npx, Docker or Node.js.
- **Duo session support:** Discovers agents and flows and starts or answers asynchronous CI sessions.

## Good for

- Triage and review merge requests from an AI coding assistant
- Check pipeline status and failures across projects
- Manage work items and wiki pages in natural language
- Give a team read-only GitLab access for agents on a self-hosted instance

## Install

### Claude Code (Terminal)

```sh
claude mcp add gitlab-mcp --env GITLAB_TOKEN='<GITLAB_TOKEN>' -- npx -y @structured-world/gitlab-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@structured-world/gitlab-mcp"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@structured-world/gitlab-mcp"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "gitlab-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@structured-world/gitlab-mcp"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@structured-world/gitlab-mcp"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@structured-world/gitlab-mcp"
      ],
      "env": {
        "GITLAB_TOKEN": "<GITLAB_TOKEN>"
      }
    }
  }
}
```

## FAQ

### What token does it need?

A personal access token with api and read_user scopes, or read_api and read_user for read-only mode.

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

Yes; set GITLAB_API_URL to your instance's API address.

### Which clients are documented?

Codex, Antigravity CLI, Claude Desktop, Claude Code, VS Code, Cursor, Windsurf, Cline and Roo Code.

### What runtime does it need?

Node.js 24 or newer.

### Is Advanced GitLab MCP server free?

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

### How do I add Advanced GitLab MCP server to Claude Code?

Run this command in your terminal: claude mcp add gitlab-mcp --env GITLAB_TOKEN='<GITLAB_TOKEN>' -- npx -y @structured-world/gitlab-mcp

### What are the best alternatives to Advanced GitLab MCP server?

The closest alternatives to Advanced GitLab MCP server 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/advanced-gitlab-mcp-server
