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.
Version Control
GitLab API — projects, merge requests, pipelines
Official homepageConnect your GitLab account once — MCPizy stores the credentials encrypted and uses them whenever you run a recipe in managed mode.
mcpizy install gitlabnpx -y @abergs/mcp-server-gitlablist_projectsList accessible GitLab projects
Inputs
searchstringoptionalget_projectGet a project's metadata
Inputs
project_idstringrequiredlist_issuesList issues in a project
Inputs
project_idstringrequiredstatestringoptionalcreate_issueOpen a new issue
Inputs
project_idstringrequiredtitlestringrequiredlist_merge_requestsList MRs with filters
Inputs
project_idstringrequiredcreate_merge_requestOpen a new MR
Inputs
project_idstringrequiredtitlestringrequiredsource_branchstringrequiredtarget_branchstringrequiredget_file_contentsRead a file from a repo
Inputs
project_idstringrequiredfile_pathstringrequiredrefstringoptionalWorks identically across clients. Only the config file path differs.
~/.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/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"
}
}
}
}~/.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"
}
}
}
}Create a PAT with api + read_repository scopes
GITLAB_PERSONAL_ACCESS_TOKENPaste 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
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).
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.
Honest pros/cons against the closest version control MCP servers.
| Server | Strengths | Trade-offs |
|---|---|---|
| GitHub MCP | Larger ecosystem, more maintained tools, stronger PR review primitives | Only works against GitHub.com or GHE — no GitLab interop |
| Gitea MCP | Lightweight, self-hostable, MIT-licensed | Tools cover only basic repo/issue ops, no CI depth |
| Bitbucket MCP (community) | Right pick if your team is on Atlassian | Slower API, thinner MCP community |
If GitLab doesn't fit your stack, these Version Control MCP servers solve similar problems.
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.
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.
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.
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.
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.