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.

Connect GitLab

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

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

Codex (then run codex mcp login GitLab)

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

Cursor and other clients with HTTP support

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

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

Config
{"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).

Or paste this into your coding agent: Connect the GitLab MCP server to my coding agent using its documented setup: https://gitlab.com/api/v4/mcp.

What the GitLab MCP server 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 GitLab

  • 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 GitLab 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

What the GitLab MCP server costs

Included with no separate charge in every GitLab tier, Free, Premium and Ultimate; the Duo agent tools need GitLab Duo.

Current prices: docs.gitlab.com . We do not list prices: vendors change them often, so check the publisher's own page.

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.

  • 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.