---
title: "GitLab MCP server: merge requests, issues and pipelines for AI agents"
canonical_url: https://cookiesforai.app/mcp/gitlab
last_updated: 2026-10-03T10:04:47+02:00
type: mcp
summary: "The GitLab MCP server gives AI agents access to a GitLab instance through your account: read and create issues and merge requests, commit files, review diffs, and check CI pipelines and jobs."
install: "claude mcp add -s user --transport http GitLab https://<gitlab.example.com>/api/v4/mcp"
related:
  - "https://cookiesforai.app/mcp/github"
---

# GitLab MCP server

The GitLab MCP server gives AI agents access to a GitLab instance through your account: read and create issues and merge requests, commit files, review diffs, and check CI pipelines and jobs.

| Fact | Value |
|---|---|
| Publisher | GitLab (official) |
| Page updated | 2026-10-03 |
| Hosted endpoint | https://gitlab.com/api/v4/mcp |
| Official MCP Registry | com.gitlab/mcp |
| Documented clients | Claude Code, Claude Desktop, Cursor, Codex, GitHub Copilot in VS Code, Gemini CLI, Gemini Code Assist, Amazon Q Developer, Kiro, OpenCode, Zed |
| Category | GitHub, Git and code hosting |
| Free tier | Free plan |
| Cost | Included with no separate charge in every GitLab tier, Free, Premium and Ultimate; the Duo agent tools need GitLab Duo. |
| Current prices | https://docs.gitlab.com/user/model_context_protocol/mcp_server/ |
| Facts checked | 2026-10-02 |

## Connect

Claude Code (replace the host with yours, e.g. gitlab.com):

```
claude mcp add -s user --transport http GitLab https://<gitlab.example.com>/api/v4/mcp
```

Codex (then run codex mcp login GitLab):

```
codex mcp add GitLab --url "https://<gitlab.example.com>/api/v4/mcp"
```

Cursor and other clients with HTTP support:

```
{"mcpServers": {"GitLab": {"type": "http", "url": "https://<gitlab.example.com>/api/v4/mcp"}}}
```

Claude Desktop and other stdio-only clients, through mcp-remote:

```
{"mcpServers": {"GitLab": {"command": "npx", "args": ["-y", "mcp-remote", "https://<gitlab.example.com>/api/v4/mcp"]}}}
```

The first connection opens an OAuth sign-in to your GitLab instance. To choose toolsets, send the X-Gitlab-Enabled-Mcp-Server-Toolsets header (behind the mcp_toolsets feature flag since GitLab 19.5).

## Ask your coding agent

```text
Connect the GitLab MCP server to my coding agent using its documented setup: https://gitlab.com/api/v4/mcp.
```

## What it does

The GitLab MCP server is built into GitLab itself and connects AI agents to your GitLab projects. Through it an agent can read projects, files, branches and commits, create and update issues and work items, open, review and accept merge requests, read merge request diffs, notes and conflicts, and commit file changes. On the CI side it lists pipelines, reads jobs and artifacts, and can start or manage a pipeline.

GitLab's server groups its tools into toolsets. The defaults cover core project data, merge requests, work items, the repository and CI; wikis, code security (vulnerabilities) and GitLab Duo agent sessions are opt-in. It also offers search, including semantic code search. Each AI tool registers itself with your GitLab instance through OAuth on first connect, so users sign in with their own GitLab account and see only what they already can.

There is nothing to install: the server lives at /api/v4/mcp on GitLab.com or your own instance. GitLab marks it as beta. An administrator or top-level group owner must first allow access to the MCP server in settings.

Tools it gives your agent: `get_project`, `get_issue`, `create_issue`, `list_merge_requests`, `get_merge_request_diffs`, `save_merge_request`, `save_merge_request_review`, `add_commit`, `get_repository_file`, `get_pipeline_jobs`, `list_work_items`, `semantic_search`

## When to use it

- Your code is on GitLab and you want the agent to open a merge request for its change.
- A pipeline failed and you want the agent to read the job log and suggest a fix.
- You want to review merge request diffs and leave notes from your editor.
- You run self-managed GitLab and need an MCP server that stays inside your instance.

## When to pick something else

- Production-critical automation today: GitLab still labels the server beta, and it can commit, merge and run pipelines with your permissions, so watch what the agent does.

## What it needs

- A GitLab account on GitLab.com, Self-Managed or Dedicated
- MCP server access allowed for the top-level group (GitLab.com) or the instance
- Node.js 20 or later only for clients that connect through mcp-remote

## Questions people ask

### Is the GitLab MCP server free?

Yes. Since GitLab 19.2 it is part of the Free tier as well as Premium and Ultimate, with no separate charge (GitLab docs, read 2026-10-01).

### Is there an official GitLab MCP server?

Yes. GitLab ships its own MCP server inside the product at /api/v4/mcp, in beta since GitLab 18.6. Several community servers exist too, but this one is GitLab's.

### Does it work with self-managed GitLab?

Yes. It runs on GitLab.com, GitLab Self-Managed and GitLab Dedicated; an administrator must allow access to the MCP server for the instance.

## Related

### Other MCP servers for github, git and code hosting

- [GitHub](https://cookiesforai.app/mcp/github): The GitHub MCP server gives AI agents access to GitHub through your account: read code and commits, create and review issues and pull requests, check Actions runs and read security alerts.

