PlugWiki
GitLab MCP Server logo

GitLab MCP, GitLab's built-in MCP server

Official · by GitLabRemote
Gethttps://gitlab.com/api/v4/mcpDocs

Lets Claude, Cursor or VS Code search your GitLab projects, review merge requests and check pipelines, with no install.

This is GitLab's own connector, built into GitLab itself. Ask your assistant to search code, read and update issues, review merge requests or check a pipeline. It acts as you, so it can change anything you can change in GitLab. MCP access must be switched on for your instance or top-level group, which an admin or group Owner controls.

Good for

  • Developers who want their assistant to review merge requests, read issues or check why a pipeline failed
  • Teams on GitLab.com, Self-Managed or Dedicated, on any plan including Free
  • Engineers who need an agent to read code in other repos than the one they have open
  • Admins and group Owners who decide whether AI tools may reach their GitLab

Works in

6 supported · 2 with issues · 6 should work

Tap an app to see how to set it up and any known problems.

Install GitLab MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the GitLab MCP server to Claude Code. Run this command:
    
    claude mcp add -s user --transport http GitLab https://gitlab.com/api/v4/mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires GitLab MCP access allowed by an admin.

Replace gitlab.com with your own host on GitLab Self-Managed or Dedicated, as in https://your-gitlab.example.com/api/v4/mcp. MCP access must be switched on for your top-level group on GitLab.com (a group Owner setting) or for the instance on Self-Managed (an admin setting). After adding the server, approve the sign-in request in your browser. Legacy personal, project and group access tokens do not work. Use the browser sign-in or a fine-grained personal access token. GitLab warns that tool results can carry prompt injection, so use it on projects you trust. Run /mcp inside Claude Code and pick GitLab to finish the sign-in. The -s user flag makes it available in every project.

From the vendor's docs. Source.

Tools

  • Searches across your GitLab instance

    Runs a GitLab search for a term across the whole instance, a group or a project. The scopes you can use depend on the search type.

    Try: “Search GitLab for "retry backoff" in the payments project.”

    Read · search

  • Searches a project by meaning

    Finds relevant content in a project by meaning instead of exact keywords. Use it when you do not know the right words. Behind a feature flag.

    Try: “Find code in this project that handles failed payments.”

    Read · semantic_search

  • Shows details of one project

    Returns a project's ID, full path, default branch, visibility and web URL, given a URL or an ID.

    Try: “What is the default branch of gitlab-org/gitlab?”

    Read · get_project

  • Lists projects you can access

    Lists projects where you have at least Guest access, or every project in a group and its subgroups when you give a group.

    Try: “List the projects in the platform group.”

    Read · list_projects

  • Lists groups and subgroups

    Browses the group hierarchy so you can find group IDs and paths to use with other tools.

    Try: “Show the subgroups of the platform group.”

    Read · list_groups

  • Reads a merge request and its details

    Fetches a merge request, and on request one extra part such as diffs, commits, notes, pipelines, discussions, approvals or conflicts.

    Try: “Show merge request 42 in gitlab-org/gitlab with its diffs.”

    Read · get_merge_request

  • Lists or searches merge requests

    Returns compact merge request details for a project or group. Group searches include every project beneath it.

    Try: “List open merge requests assigned to me in the web group.”

    Read · list_merge_requests

  • Creates or updates a merge request

    Creates a merge request, or updates one when you give its number. Handles title, branches, labels, assignees, reviewers, milestone and closing or reopening.

    Try: “Open a merge request from fix/specs into master and turn on squash.”

    Write · save_merge_request

  • Writes review comments on a merge request

    Adds review output as you, one action per call, such as a top-level comment or a reply in a discussion.

    Try: “Leave a review comment on merge request 42 about the missing test.”

    Write · save_merge_request_review

  • Merges a merge request

    Merges a merge request now, or schedules it to merge automatically once its checks pass.

    Try: “Merge request 42 once the pipeline passes.”

    Write · accept_merge_request

  • Comments on a merge request or work item

    Adds a comment, replies in a discussion thread, or resolves or reopens a thread, as the signed-in user.

    Try: “Comment on issue 18 that the fix is in review.”

    Write · save_note

  • Reads an issue, epic, task or similar

    Fetches one work item with type, dates, assignees, labels, milestone and parent, optionally with notes, discussions or related merge requests.

    Try: “Show issue 42 in gitlab-org/gitlab with its comments.”

    Read · get_work_item

From the official docs

Pros and cons

Good

  • Built into GitLab, so there is no package to install or host
  • Free on every plan, on GitLab.com, Self-Managed and Dedicated
  • Sign in with your GitLab account through the browser in most apps
  • Choose tool groups with a header to save context space
  • Every call still checks your own GitLab permissions

Watch out

  • MCP access must be switched on by an admin or top-level group Owner
  • No read-only mode for outside clients
  • Legacy access tokens get a 403; only OAuth or fine-grained tokens work
  • Known gaps: replying to a specific MR discussion thread, release and tag writes
  • GitLab.com limits Free users to 60 requests a minute
  • Some tool groups need Ultimate or Duo Agent Platform

Permissions

medium risk · 5 things to watch · 2 advisories

Medium risk

It acts as you, so it can change merge requests, commits and pipelines in every project you can reach, and GitLab has no read-only mode for outside clients. Sign in with a fine-grained token that has only the scopes you need.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It acts with your full GitLab permissions

    Each call runs as you, so it can do anything you can in the projects you reach. The default tool groups include merge requests, commits and pipelines. Use a fine-grained token with only the scopes you need. docs.gitlab.com

  • Text in issues and merge requests can trick it

    GitLab says you are responsible for guarding against prompt injection. Use it only on GitLab items you trust. docs.gitlab.com

  • Admin tool rules do not cover Claude or Cursor

    Tool governance applies to GitLab Duo agents only. Narrow outside clients with the toolset headers instead. docs.gitlab.com

  • Shared sign-in apps may skip a security check

    OAuth apps pre-registered through the API accept but do not require PKCE. Check that your client sends a code challenge. docs.gitlab.com

  • Self-Managed: update to 19.4.1 or later

    Two MCP flaws were fixed in 19.4.1, 19.3.3 and 19.2.7. Older patch levels of 18.3 to 19.4 are affected. docs.gitlab.com

Security advisories

Technical details
Turning on read-onlyNo read-only switch for third-party clients. Limit the tool list with the X-Gitlab-Enabled-Mcp-Server-Toolsets or X-Gitlab-Enabled-Mcp-Server-Tools header. GitLab's tool approval rules apply only to Duo agents.
Scopes
  • mcp

Alternatives

Use GitLab's built-in server unless your GitLab is too old to have it. The community @zereight/mcp-gitlab is the fallback for older versions, and GitHub and Atlassian cover the same job for GitHub repos and Jira issues.

ServerOfficialRunsSign-inCan change thingsToolsGitHub stars
For GitLab
GitLab MCP ServerThis pageOfficialHostedAccount or tokenYes49–
@zereight/mcp-gitlabCommunityLocalTokenYes–2.1K
Other tools for the same job
GitHub MCP ServerFor GitHubOfficialHostedLocalAccount or tokenYes9234.1K
Atlassian Rovo MCP ServerOfficialHostedAccountYes–1.1K

What people say

People like that it is built in and free, and dislike the browser sign-in, the token cost and the early tool gaps.

What people like

  • Built into GitLab and now generally available, so there is nothing to host or update
  • Free on every plan since GitLab 19.2
  • Toolset selection lets you load only the tool groups you need and save context space
  • Developers use it to give agents read access to code outside the current repo

Common complaints

  • Needs a browser sign-in, which some people find slower than the glab command line tool
  • Users report it uses a lot of tokens, so some switch to the CLI for routine work
  • No read-only switch for outside clients
  • Several open client bugs, including dropped connections in Claude Code

In their words

Questions

Is the GitLab MCP server free?

Yes. Since GitLab 19.2 it is available on Free, Premium and Ultimate. Some tool groups need more: code security tools need Ultimate, and Duo Agent Platform tools need Duo Agent Platform access.

What is the GitLab MCP server URL?

On GitLab.com it is https://gitlab.com/api/v4/mcp. On Self-Managed or Dedicated, use https://<your-gitlab-host>/api/v4/mcp.

Why can't I connect to the GitLab MCP server?

MCP access is switched off for your GitLab. On Self-Managed, an admin turns it on under MCP client access in the visibility and access settings. On GitLab.com, an Owner of your top-level group turns it on in the group's permissions settings. GitLab 19.4 and earlier answer with a 404 instead of a 403 for the same cause.

Can I sign in with a personal access token?

Only a fine-grained token that has the MCP permission. Legacy personal, project and group access tokens get a 403. Most apps use the browser sign-in instead.

Is it safe to give my AI assistant access to GitLab?

Only with limits. It acts as you, so it can change merge requests and run pipelines in every project you reach, and text in issues can try to steer it. Use a fine-grained token with only the scopes you need.

Does it work on a self-managed GitLab?

Yes. Use your own host in the address, and ask an admin to allow it. Update to 19.4.1, 19.3.3 or 19.2.7 or later to get two MCP security fixes.

Do I need GitLab Duo turned on?

No. Since 19.2 the MCP server has its own setting, separate from Duo Agent Platform. Duo is only needed for the Duo Agent Platform tools.

Can I load fewer tools to save context?

Yes, from GitLab 19.5. Send the toolsets header with a list such as core,work_items. GitLab's docs show how to pass it for each app.

Are there rate limits?

On GitLab.com, 60 requests a minute per user on Free and 600 on Premium and Ultimate, shared across all your apps. Self-Managed admins set their own limit.

GitLab MCP server or the glab CLI?

Some developers prefer glab with Claude Code because it skips the browser sign-in and uses fewer tokens. The MCP server suits apps with no terminal and gives you tool groups you can switch on and off.

Information

updated Nov 2, 2026

Publisher
GitLab (official)
Endpoint
https://gitlab.com/api/v4/mcp
Transport
Streamable HTTP
Auth
OAuth
Listed in
Official MCP registry

GitLab MCP server docsOfficial MCP RegistryFeedback issueTroubleshooting

Other GitLab MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 17
  1. GitLab MCP server · docs.gitlab.com
  2. GitLab 19.5 released · docs.gitlab.com
  3. GitLab 19.2 released · docs.gitlab.com
  4. docs.gitlab.com · docs.gitlab.com
  5. Tool governance · docs.gitlab.com
  6. GitLab 19.4.1 patch release · docs.gitlab.com
  7. GitLab MCP server troubleshooting · docs.gitlab.com
  8. Allow access to the MCP server (administration) · docs.gitlab.com
  9. Allow access to the MCP server (groups) · docs.gitlab.com
  10. Comment on Hacker News · news.ycombinator.com
  11. Comment on Hacker News · news.ycombinator.com
  12. Claude plugins: gitlab · github.com
  13. Comment on Hacker News · news.ycombinator.com
  14. zereight/gitlab-mcp · github.com
  15. github/github-mcp-server · github.com
  16. atlassian/atlassian-mcp-server · github.com
  17. MCP server GA known gaps · gitlab.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.