Skip to content
MCP server

Advanced GitLab MCP server

GitLab MCP server with 66 tools covering projects, merge requests, pipelines and wikis

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, API
Runs
Locally
Version
13.3.1
Listing updated
3 days ago

About Advanced GitLab MCP server

Advanced GitLab MCP server is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

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

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Configuration

  • GITLAB_TOKENGitLab Personal Access Token with 'api' and 'read_user' scopesRequired
  • GITLAB_API_URLGitLab instance API URL for self-hosted instances (defaults to https://gitlab.com)
  • GITLAB_READ_ONLY_MODEEnable read-only mode (disable all manage_* write operations)

What it does

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

Pricing

Open source

Prices change. Check gitlab-mcp.sw.foundation before you buy.

Advanced GitLab MCP server 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 to Advanced GitLab MCP server

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools