
GitLab MCP, GitLab's built-in MCP server
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.
GitLab's guide covers it through mcp-remote, which needs Node.js 20 or later. docs.gitlab.com
GitLab's guide covers it: add an http entry to mcp.json, then approve in the browser. docs.gitlab.com
GitLab's guide covers it: run MCP: Add Server, pick HTTP, then approve in the browser. docs.gitlab.com
GitLab's guide covers it: add the server to settings.json, then run /mcp auth GitLab. docs.gitlab.com
GitLab's guide covers it; toggle the server off and on if the sign-in page does not open. docs.gitlab.com
GitLab's guide covers it: add a remote entry to opencode.json, then sign in. docs.gitlab.com
GitLab's guide covers it: add the server, then run /mcp and approve in the browser. A mid-session drop and a merge request bug are still open.
Known problems
- Open
Connection can drop mid-session and no GitLab calls work until you restart
Since Oct 2026 · gitlab.com
- Open
Creating a merge request fails validation because the tool and server disagree
Since Aug 2026 · gitlab.com
- Open
Sign-in through the GitLab plugin can fail and leave the server with no tools
Since May 2026 · gitlab.com
GitLab's guide covers it, but following every step can leave a config file Codex refuses to load.
Known problems
- Open
GitLab's Codex guide leaves a config file Codex refuses to load
Workaround: Skip the manual config.toml edit, because codex mcp add already writes the entry.
Since Jul 2026 · gitlab.com
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Supports hosted MCP servers.
Install GitLab MCP
Claude Code
- 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
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 ·
searchSearches 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_searchShows 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_projectLists 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_projectsLists 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_groupsReads 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_requestLists 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_requestsCreates 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_requestWrites 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_reviewMerges 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_requestComments 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_noteReads 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_itemLists or searches issues and other work items
Lists work items such as issues, epics, tasks and incidents in a project or group, including descendants of a group.
Try: “List open bugs in the checkout project.”
Read ·
list_work_itemsCreates or updates a work item
Creates an issue, task or epic, or updates one if you give its number. Errors clearly if a label or milestone name is not found.
Try: “Create an issue titled "Fix login bug" in project 123.”
Write ·
save_work_itemLists work item types in a namespace
Shows the types available in a group or project, including custom ones, with their names and supported fields.
Try: “What work item types does this group have?”
Read ·
get_work_item_typesLinks work items together
Connects a work item to others with a relationship type.
Try: “Link issue 42 as blocking issue 57.”
Write ·
link_work_itemsLoads a saved view's work items
Retrieves a saved view and the work items it returns, applying its filters and sort order.
Try: “Show the work items in my "Sprint" saved view.”
Read ·
get_saved_view_work_itemsLists a project's branches
Returns the branches of a project, optionally filtered by name.
Try: “List branches starting with fix/ in this project.”
Read ·
list_branchesCreates a branch from a ref
Creates a new branch in a project from a source branch, tag or commit.
Try: “Create branch docs-update from main.”
Write ·
add_branchForks a project
Forks a project into a namespace. The fork is created in the background, and the response shows its progress.
Try: “Fork gitlab-org/gitlab into my namespace.”
Write ·
fork_repositoryReads a file from a repository
Returns a file's contents as committed at a given ref, not from your local checkout.
Try: “Show README.md on main in gitlab-org/gitlab.”
Read ·
get_repository_fileLists files and folders in a repository
Lists the entries at a path and ref. It returns names and metadata only, not file contents.
Try: “List the files in the docs folder on main.”
Read ·
list_repository_treeCommits file changes to a branch
Creates one commit holding several file actions (create, update, delete, move, chmod) on a branch, creating it from a start branch if needed.
Try: “Create README.md on branch docs-update with commit message "Add README".”
Delete ·
add_commitReads one commit
Returns a commit's metadata, and optionally its diff or notes.
Try: “Show commit abc123 with its diff.”
Read ·
get_commitLists commits in a project
Returns compact commit details, filterable by ref, author, path or date.
Try: “Show commits by jane on main since last Monday.”
Read ·
list_commitsLists tags
Lists tags, most recently updated first, with exact name matches shown first.
Try: “List the latest tags in this project.”
Read ·
list_tagsLists releases
Lists a project's releases, newest first.
Try: “What was the last release of this project?”
Read ·
list_releasesLists CI/CD pipelines
Lists pipelines in a project with optional filters.
Try: “Show failed pipelines on main this week.”
Read ·
list_pipelinesReads a pipeline and its parts
Fetches a pipeline, and optionally its jobs, downstream pipelines, trigger jobs or the artifacts its jobs produced.
Try: “Why did pipeline 9001 fail? Include its jobs.”
Read ·
get_pipelineReads a CI/CD job and its log
Returns a job's metadata, and optionally its trace log or artifacts.
Try: “Show the log of the failing test job.”
Read ·
get_jobReads a job artifact file as text
Reads a file from a job's artifacts, including report files such as junit or SAST.
Try: “Read the junit report from the last test job.”
Read ·
get_artifact_fileRuns, retries, cancels or renames a pipeline
Starts a new pipeline, retries or cancels an existing one, or renames it.
Try: “Retry pipeline 9001.”
Runs code ·
save_pipelineReads a GitLab Pages page as text
Fetches content published on a GitLab Pages URL of your instance. Behind a feature flag.
Try: “Read the text of our docs site on GitLab Pages.”
Read ·
get_pages_contentLists wiki pages
Lists the wiki pages of a project or group.
Try: “What wiki pages does this project have?”
Read ·
list_wiki_pagesLists project members and roles
Returns the members of a project with their role and access level.
Try: “Who are the maintainers of this project?”
Read ·
list_project_membersLooks up a user
Finds a user by username, ID or yourself, mainly to get the numeric ID needed to assign people in other tools.
Try: “What is my GitLab user ID?”
Read ·
get_userLists your to-do items
Shows your pending to-dos such as review requests, assignments and mentions, or done ones if asked.
Try: “What is waiting on me in GitLab?”
Read ·
list_todosSearches labels
Finds labels in a project or group by name.
Try: “Find labels containing "bug".”
Read ·
search_labelsCreates a project
Creates a new project in a group or your personal namespace, with options such as visibility, README and templates.
Try: “Create a private project called my-app in the gitlab-org group.”
Write ·
save_projectLists security vulnerabilities
Lists a project's vulnerabilities with filters and paging. Needs a licensed security feature.
Try: “List critical vulnerabilities in this project.”
Read ·
list_vulnerabilitiesReads one vulnerability
Returns title, state, description, severity and identifiers for a vulnerability. Needs a licensed security feature.
Try: “Show details of vulnerability 301.”
Read ·
get_vulnerabilityUpdates a vulnerability
Performs write actions on a vulnerability in a project. Needs a licensed security feature.
Try: “Dismiss vulnerability 301 as a false positive.”
Write ·
save_vulnerabilityAttaches a security scan profile
Applies a security scan profile to projects, or to every project in groups. Needs a licensed security feature.
Try: “Attach the default scan profile to all projects in the platform group.”
Write ·
attach_scan_profileLists Duo agents and flows in a project
Shows which GitLab Duo agents and flows a project offers, so you do not have to guess names.
Try: “Which Duo flows can I run in this project?”
Read ·
list_duo_agents_and_flowsStarts a GitLab Duo session
Starts a background Duo Agent Platform session toward a goal in a project and returns an ID to follow up with.
Try: “Ask Duo to draft a fix for issue 42.”
Write ·
start_duo_sessionLists your Duo sessions
Lists your Duo Agent Platform sessions with status, goal and start time, excluding Duo Chat.
Try: “Show my recent Duo sessions.”
Read ·
list_duo_sessionsChecks a Duo session
Returns a session's status and, when finished, its result. Running sessions suggest how long to wait before checking again.
Try: “Is my Duo session done yet?”
Read ·
get_duo_sessionAnswers a waiting Duo session
Replies to a session that is waiting, by approving or rejecting a plan or tool call, or answering its question.
Try: “Approve the plan Duo proposed.”
Write ·
send_duo_session_inputUsed by the assistant behind the scenes
Shows the GitLab MCP server version
Returns the version of the GitLab MCP server you are connected to.
Try: “What version of the GitLab MCP server am I using?”
Read ·
get_mcp_server_version
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
2 known advisories, all fixed in a newer version.
Technical details
| Turning on read-only | No 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 |
|
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.
| Server | Official | Runs | Sign-in | Can change things | Tools | GitHub stars |
|---|---|---|---|---|---|---|
| For GitLab | ||||||
| GitLab MCP ServerThis page | Official | Hosted | Account or token | Yes | 49 | – |
| @zereight/mcp-gitlab | Community | Local | Token | Yes | – | 2.1K |
| Other tools for the same job | ||||||
| GitHub MCP ServerFor GitHub | Official | HostedLocal | Account or token | Yes | 92 | 34.1K |
| Atlassian Rovo MCP Server | Official | Hosted | Account | Yes | – | 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
“I use the GitLab CLI (glab) extensively, because it is so much better than the (official) GitLab MCP.”easyascakeHacker NewsSep 2026
“I noticed the Jira and GitLab MCPs were consuming an excessive amount of tokens. To solve this, I decided to install their respective CLIs instead so we could find a balance and get the best of both worlds.”ex1fm3taHacker NewsOct 2026
“for those situations you just need to have a way for the agent to get access to other codebases (gitlab mcp being what I rely on at work).”kaydubHacker NewsNov 2025
“When using the MCP, I have to do a whole OAuth browser-launch process and even then I am only limited to the 9-10 tools that they've shipped it with so far.”easyascake
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 17Hide
- GitLab MCP server · docs.gitlab.com
- GitLab 19.5 released · docs.gitlab.com
- GitLab 19.2 released · docs.gitlab.com
- docs.gitlab.com · docs.gitlab.com
- Tool governance · docs.gitlab.com
- GitLab 19.4.1 patch release · docs.gitlab.com
- GitLab MCP server troubleshooting · docs.gitlab.com
- Allow access to the MCP server (administration) · docs.gitlab.com
- Allow access to the MCP server (groups) · docs.gitlab.com
- Comment on Hacker News · news.ycombinator.com
- Comment on Hacker News · news.ycombinator.com
- Claude plugins: gitlab · github.com
- Comment on Hacker News · news.ycombinator.com
- zereight/gitlab-mcp · github.com
- github/github-mcp-server · github.com
- atlassian/atlassian-mcp-server · github.com
- MCP server GA known gaps · gitlab.com