Back
Marketplace/GitLab

TL;DR

GitLab is a Version Control MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent gitLab API — projects, merge requests, pipelines. Install in 1 minute with mcpizy install gitlab.

🦊

GitLab

7 tools Supports hosted execution →

Version Control

Last updated May 30, 2026 · By MCPizy team

GitLab API — projects, merge requests, pipelines

Official homepage

Run GitLab without any local install

Connect your GitLab account once — MCPizy stores the credentials encrypted and uses them whenever you run a recipe in managed mode.

Checking connection…

Install GitLab

Via MCPizy CLI (recommended):
mcpizy install gitlab
Or run directly:
npx -y @abergs/mcp-server-gitlab
View on GitHub

Tools exposed

7 tools available
list_projects

List accessible GitLab projects

Inputs

  • searchstringoptional
get_project

Get a project's metadata

Inputs

  • project_idstringrequired
list_issues

List issues in a project

Inputs

  • project_idstringrequired
  • statestringoptional
create_issue

Open a new issue

Inputs

  • project_idstringrequired
  • titlestringrequired
list_merge_requests

List MRs with filters

Inputs

  • project_idstringrequired
create_merge_request

Open a new MR

Inputs

  • project_idstringrequired
  • titlestringrequired
  • source_branchstringrequired
  • target_branchstringrequired
get_file_contents

Read a file from a repo

Inputs

  • project_idstringrequired
  • file_pathstringrequired
  • refstringoptional

Configuration

Works identically across clients. Only the config file path differs.

Claude Code~/.claude.json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-...",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-...",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}
Windsurf~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-...",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

Authentication setup

  1. 1

    Create a PAT with api + read_repository scopes

    Get it GITLAB_PERSONAL_ACCESS_TOKEN

What you can do with GitLab MCP

Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.

“List open merge requests assigned to me”

Uses: list_merge_requests

“Create an issue in project 1234 titled 'Flaky CI build'”

Uses: create_issue

“Show me the content of .gitlab-ci.yml from my project”

Uses: get_file_contents

Why GitLab MCP matters

GitLab MCP is the GitHub-equivalent for teams running on GitLab.com or self-hosted GitLab CE/EE. It exposes the GitLab REST API as agent tools: `list_projects`, `list_issues`, `create_merge_request`, `get_file_contents`, `search_repositories`, `add_comment`. The official server speaks against `gitlab.com` and accepts a self-hosted base URL — important, because the majority of GitLab MCP users are on self-hosted instances behind a VPN.

We use GitLab MCP in two flavours of work. First, MR review automation: the agent reads the diff, runs static checks mentally, posts contextual review comments — same flow as GitHub MCP but with GitLab's MR-vs-PR semantics. Second, pipeline triage: GitLab CI failures are dense; the agent fetches the job log, identifies the failing stage, and proposes a fix. Token cost mirrors GitHub MCP — read operations are lean (an issue is ~500-800 tokens), file fetches scale linearly with file size.

The honest trade-off vs GitHub MCP: GitHub MCP has a larger community and more maintained forks; GitLab MCP has fewer tools but covers the surface evenly. Where GitLab actually wins is the integrated CI/CD primitives — `list_pipelines`, `get_job_log`, `retry_job` are first-class, whereas GitHub's MCP often punts on Actions runs to the UI. For teams whose CI lives in `.gitlab-ci.yml`, the MCP closes the loop between code review and pipeline debugging. Authentication is a PAT scoped to `api` (or `read_api` for safer agents).

Common pitfalls

Self-hosted GitLab instances behind a VPN are common — the MCP needs to be able to reach the base URL. Set up the agent to run from a machine inside the VPN, or set up a tunnel. There's no SSO option in most MCP forks; PAT only.

GitLab's project IDs are numeric, not slugs. The agent needs to either accept the numeric ID or call `search_projects` first. Most tool calls fail with a misleading "project not found" when given a path like `group/project` — use `URL-encoded` paths or the numeric ID.

Pipeline log fetches return raw text including ANSI escape codes. The agent will waste tokens parsing colour codes unless you instruct it to strip ANSI first.

Rate limits on gitlab.com are 2,000 req/min/IP for authenticated users — generous, but self-hosted instances are often capped much lower by the admin. Check `/admin/application_settings` if you see 429s.

How GitLab MCP compares

Honest pros/cons against the closest version control MCP servers.

ServerStrengthsTrade-offs
GitHub MCPLarger ecosystem, more maintained tools, stronger PR review primitivesOnly works against GitHub.com or GHE — no GitLab interop
Gitea MCPLightweight, self-hostable, MIT-licensedTools cover only basic repo/issue ops, no CI depth
Bitbucket MCP (community)Right pick if your team is on AtlassianSlower API, thinner MCP community

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Version Control MCPs

🍵

Gitea

Manage Gitea repositories, issues, and pull requests for self-hosted Git from AI agents.

🐙

GitHub

Official GitHub MCP — repos, issues, PRs

Alternatives to GitLab

If GitLab doesn't fit your stack, these Version Control MCP servers solve similar problems.

📦

Git

Local Git repository operations

🔴

Gitee

Gitee API integration for repository, issue, and pull request management. China's GitHub.

🐙

GitKraken

CLI for interacting with GitKraken APIs including Jira, GitHub, GitLab, and Bitbucket.

Key Takeaways

  • GitLab exposes 7 tools for version control workflows in Claude Code, Cursor and Windsurf.
  • Authentication: 1 step (GITLAB_PERSONAL_ACCESS_TOKEN).
  • Install in 1 command: mcpizy install gitlab — config written to your client automatically.
  • Free and open source (GitHub source linked above) — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: "List open merge requests assigned to me".

Frequently asked questions

What is the GitLab MCP server?

The GitLab MCP server is an Version Control Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents gitLab API — projects, merge requests, pipelines. It exposes GitLab's capabilities as tools the AI can call directly from your editor or CLI.

How do I install GitLab MCP with Claude Code?

The fastest way is the MCPizy CLI: run `mcpizy install gitlab` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y @abergs/mcp-server-gitlab` and restarting Claude Code.

Is GitLab MCP free?

Yes. The GitLab MCP server is free and open source (see the GitHub repository linked on this page). You may still need a GitLab account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.

Does GitLab MCP work with Cursor and Windsurf?

Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.

What can I do with GitLab MCP?

Once installed, your AI agent can gitLab API — projects, merge requests, pipelines directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run GitLab operations, inspect results, chain GitLab with other MCP servers (see our Workflow Recipes), and automate repetitive version control tasks without leaving your editor.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free