/ Directory / Playground / GitLab MCP
● Community zereight 🔑 Needs your key

GitLab MCP

by zereight · zereight/gitlab-mcp

Treat GitLab like the GitHub MCP treats GitHub — issues, MRs, pipelines, comments — with explicit support for self-hosted instances.

Zereight's GitLab MCP is the de-facto community implementation. It covers REST and a curated GraphQL surface, supports self-hosted GitLab via GITLAB_API_URL, and has fine-grained read/write tool gating.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gitlab-mcp-zereight",
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "gitlab-mcp-zereight": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@zereight/mcp-gitlab"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add gitlab-mcp-zereight -- npx -y @zereight/mcp-gitlab

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use GitLab MCP

Review an MR end-to-end from Claude

👤 Developers ⏱ ~15 min intermediate

When to use: You want a quick triage pass on a teammate's MR before opening the GitLab UI.

Flow
  1. Get MR
    Fetch MR by IID; pull title, description, diffs.✓ Copied
    → Diff loaded
  2. Inspect pipeline
    List pipelines for this MR; report failures.✓ Copied
    → Pipeline status known
  3. Comment
    Post inline comments for the issues you found.✓ Copied
    → Comments visible in UI

Outcome: MR review done without leaving Claude; comments posted under your account.

Triage failing pipelines across projects

👤 Developers ⏱ ~15 min intermediate

When to use: CI is red across several projects and you want a unified view.

Flow
  1. List failed
    list_pipelines status=failed across group X.✓ Copied
    → Failed pipelines listed
  2. Pull logs
    For each, fetch the failing job log tail.✓ Copied
    → Top error per pipeline
  3. Cluster
    Group by error signature; identify the shared cause.✓ Copied
    → One root-cause summary

Outcome: You know whether it's one infra issue or N independent failures.

Combinations

Pair with other MCPs for X10 leverage

gitlab-mcp-zereight + linear

Cross-link Linear issues to GitLab MRs in PR descriptions

Combine gitlab-mcp-zereight with linear: Cross-link Linear issues to GitLab MRs in PR descriptions✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
list_issues (see docs) List issues with filters 1 call
get_merge_request (see docs) Fetch MR details + diffs 1 call
create_merge_request (see docs) Open a new MR 1 call
list_pipelines (see docs) List CI pipelines 1 call
retry_pipeline (see docs) Retry a failed pipeline 1 call
add_comment (see docs) Post issue/MR comment 1 call

Cost & Limits

What this costs to run

API quota
GitLab API rate limits (varies by instance)
Tokens per call
MR diffs can be huge — paginate
Monetary
Free; your GitLab plan applies
Tip
Use read-only mode for any agent that doesn't need to write

Security

Permissions, secrets, blast radius

Minimum scopes: api read_repository (scoped PAT)
Credential storage: PAT in env var
Data egress: Your GitLab API URL only
Never grant: use sudo scope unless you know why

Troubleshooting

Common errors and fixes

401 on self-hosted

Set GITLAB_API_URL to the full /api/v4 URL of your instance

Rate limited

Use a project-scoped PAT; lower polling cadence

Alternatives

GitLab MCP vs others

AlternativeWhen to use it insteadTradeoff
Official GitLab MCPOnce GitLab ships first-partyNot yet GA
github-mcp-serverYou're on GitHubDifferent platform

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills