# Advanced GitLab MCP server

Exposes 234 GitLab actions across 26 resource types using 64 CQRS tools. Lets coding agents manage pipelines, merge requests, and issues directly inside your workspace.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: structured-world
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/structured-world/gitlab-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/advanced-gitlab-mcp-server

## What it does

The server splits GitLab operations into two clean groups. Query tools carry the `browse_` prefix, while mutating actions start with `manage_`. Rather than flooding the context window with hundreds of raw endpoints, related operations like pipeline jobs and logs fold into single action-based tools. Available tools dynamically adapt to the active token scopes, instance tier, and GitLab version.

Network failures trigger a dedicated disconnected state. Instead of hanging your editor on launch, the server falls back to diagnostic actions under `manage_context` until the connection recovers. You can also hook up self-managed setups and gitlab.com accounts in parallel.

Running this server requires Node.js 24.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GITLAB_TOKEN`, `GITLAB_API_URL`, `GITLAB_READ_ONLY_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: GitLab

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GITLAB_TOKEN=<GITLAB_TOKEN> --env GITLAB_API_URL=<GITLAB_API_URL> --env GITLAB_READ_ONLY_MODE=<GITLAB_READ_ONLY_MODE> --transport stdio advanced-gitlab-mcp-server -- npx -y @structured-world/gitlab-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add advanced-gitlab-mcp-server --env GITLAB_TOKEN=<GITLAB_TOKEN> --env GITLAB_API_URL=<GITLAB_API_URL> --env GITLAB_READ_ONLY_MODE=<GITLAB_READ_ONLY_MODE> -- npx -y @structured-world/gitlab-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "advanced-gitlab-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@structured-world/gitlab-mcp"
            ],
            "env": {
                "GITLAB_TOKEN": "<GITLAB_TOKEN>",
                "GITLAB_API_URL": "<GITLAB_API_URL>",
                "GITLAB_READ_ONLY_MODE": "<GITLAB_READ_ONLY_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "advanced-gitlab-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@structured-world/gitlab-mcp"
            ],
            "env": {
                "GITLAB_TOKEN": "<GITLAB_TOKEN>",
                "GITLAB_API_URL": "<GITLAB_API_URL>",
                "GITLAB_READ_ONLY_MODE": "<GITLAB_READ_ONLY_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GITLAB_TOKEN=<GITLAB_TOKEN> -e GITLAB_API_URL=<GITLAB_API_URL> -e GITLAB_READ_ONLY_MODE=<GITLAB_READ_ONLY_MODE> advanced-gitlab-mcp-server npx -y @structured-world/gitlab-mcp
```
Replace <…> with your own values

## When to use it
- inspect failing CI/CD job logs directly from the chat
- create and update merge requests across repositories
- restart or cancel running GitLab pipelines
- list and adjust deployment environments

## Example prompts
- Show the failed jobs and their logs for the latest pipeline on `main`
- Create a new merge request from `feature/login` targeting `main`
- Trigger a pipeline retry for commit `a1b2c3d`

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23654
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17191
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
