GitLab MCP
GitLab's official MCP server for merge requests, work items, repos and CI/CD
BestMCPTools
GitLab MCP
bestmcptools.org
Last verified: October 20, 2026
How to Install GitLab MCP
$npx -y mcp-remote https://gitlab.com/api/v4/mcpCompatible with: Claude Desktop, Claude Code, Cursor, VS Code, Gemini CLI, Kiro, OpenAI Codex, OpenCode, Zed, Amazon Q Developer.
Setup by client
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"gitlab-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gitlab.com/api/v4/mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"gitlab-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gitlab.com/api/v4/mcp"
]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"gitlab-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gitlab.com/api/v4/mcp"
]
}
}
}Claude Code (terminal)
claude mcp add gitlab-mcp -- npx -y mcp-remote https://gitlab.com/api/v4/mcpAdd any API keys or environment variables the server's README lists.
About GitLab MCP
What it does
The GitLab MCP server is GitLab's own Model Context Protocol endpoint, built into GitLab itself at /api/v4/mcp. It lets AI tools such as Claude Code, Claude Desktop and Cursor read and act on your GitLab projects, issues, merge requests, pipelines and repositories with your own permissions. It is generally available since GitLab 19.5 and works on GitLab.com, GitLab Self-Managed and GitLab Dedicated, on the Free, Premium and Ultimate tiers.
Key features and tools
GitLab groups its tools into toolsets. The core, merge_requests, work_items, repository and ci toolsets are on by default, meta is always on, duo_agent_platform is included when GitLab Duo Agent Platform is available to you, and wikis, code_security and orbit are opt-in.
Tools listed in the official GitLab MCP server tools reference include:
- Projects and search:
get_project,list_projects,list_groups,list_project_members,get_user,search,search_labels,get_mcp_server_version - Repository:
get_repository_file,list_repository_tree,add_commit,add_branch,list_branches,list_commits,get_commit,list_tags,list_releases,fork_repository - Merge requests:
save_merge_request(create or update),get_merge_request(with diffs, commits, notes, pipelines, discussions, approvals or conflicts on request),list_merge_requests,accept_merge_request(merge now or arm auto-merge),save_merge_request_review,save_note - Work items and issues:
save_work_item,get_work_item,list_work_items,link_work_items,get_work_item_types,get_workitem_notes,get_saved_view_work_items(the oldercreate_issueandget_issueare unlisted but still callable while callers migrate) - CI/CD:
list_pipelines,get_pipeline,get_pipeline_jobs,get_job,save_pipeline(run, retry, cancel or rename),get_artifact_file - Wikis (opt-in):
list_wiki_pages - GitLab Duo Agent Platform:
list_duo_agents_and_flows,start_duo_session,get_duo_session,list_duo_sessions,send_duo_session_input - Code security (opt-in, Ultimate features):
list_vulnerabilities,get_vulnerability,save_vulnerability,attach_scan_profile
Two HTTP headers control what the server returns. X-Gitlab-Enabled-Mcp-Server-Toolsets takes a comma separated list of toolsets (or all), and X-Gitlab-Mcp-Server-Tool-Name-Prefix adds a prefix to every tool name, which helps when you connect more than one GitLab instance or another server with similar tool names.
Setup
GitLab recommends the HTTP transport, which needs no extra software. Replace gitlab.com with your own instance URL on Self-Managed:
{
"mcpServers": {
"GitLab": {
"type": "http",
"url": "https://gitlab.com/api/v4/mcp"
}
}
}
For Claude Code, the documented command is:
claude mcp add -s user --transport http GitLab https://gitlab.com/api/v4/mcp
Then type /mcp in Claude Code, pick the GitLab server and approve the OAuth request in your browser. Claude Desktop and Zed connect through the mcp-remote proxy, which needs Node.js 20 or later:
{
"mcpServers": {
"GitLab": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://gitlab.com/api/v4/mcp"]
}
}
}
GitLab's documentation has dedicated setup steps for Cursor, Claude Code, Claude Desktop, GitHub Copilot in VS Code, Gemini Code Assist and Gemini CLI, Kiro, OpenCode, OpenAI Codex, Amazon Q Developer and Zed. Because Cursor is one of the documented clients, it fits our list of the best MCP servers for Cursor for teams that host code on GitLab.
Authentication. The server uses OAuth 2.0 with Dynamic Client Registration: the client registers itself the first time it connects and you approve access in the browser. It accepts an OAuth token with the mcp scope or a fine-grained personal access token with the MCP tool resource and Execute permission. Legacy personal access tokens, project access tokens and group access tokens are rejected with 403 Forbidden. Before any of this works, access to the MCP server must be allowed for the top-level group on GitLab.com, or for the instance on Self-Managed and Dedicated.
Use cases
- Ask an agent to summarize a merge request, read its diff and pipeline status, then leave review notes.
- Create or update work items from a chat, with labels and milestones resolved by name.
- Commit a small fix to a new branch with
add_commitand open a merge request withsave_merge_request. - Check why a pipeline failed by reading jobs and artifact files, then retry it with
save_pipeline. - On Ultimate, list and triage vulnerabilities from the security dashboard.
Limitations and things to watch
- Prompt injection. GitLab warns that you are responsible for guarding against prompt injection and advises using the tools only on GitLab objects you trust.
- Token types. Classic personal, project and group access tokens do not work. Support for them is only proposed.
- Rate limits on GitLab.com. GitLab documents per-user limits on
POST /api/v4/mcpof 60 requests per minute on Free and 600 on Premium and Ultimate, introduced in 19.5 behind feature flags that GitLab lists as disabled by default. Exceeding a limit returns429 Too Many Requests. Self-Managed administrators set their own instance limit. - Client registration limits. Dynamic client registration is limited to 10 registrations per hour per IP address, which can block users behind a shared corporate egress IP. GitLab suggests reusing one pre-registered OAuth application in that case, and it is required if an administrator turns DCR off.
- Tiered toolsets. Duo Agent Platform tools need GitLab Duo Agent Platform access, and code security tools need Ultimate features. Listing a tool never grants access: every call still checks your project and namespace permissions.
- Windows header quirk. With
mcp-remoteon Windows, spaces inside header arguments are not escaped, so GitLab suggests passing header values through an environment variable.
Pros and cons
Pros
- Official, built into GitLab, with nothing to host or install for HTTP clients.
- Works on GitLab.com, Self-Managed and Dedicated, including the Free tier.
- OAuth sign-in in the browser, so no long-lived tokens in config files.
- Toolset and prefix headers keep the tool list short and avoid name clashes.
- Broad coverage of merge requests, work items, repositories and CI/CD.
Cons
- Classic personal access tokens are not accepted.
- Some toolsets depend on Premium, Ultimate or GitLab Duo Agent Platform.
- Write tools (commits, merges, pipeline actions) need care given the prompt injection warning.
- Clients without native HTTP support need Node.js and the
mcp-remoteproxy.
Who it is for
Teams that host code on GitLab and want an AI coding assistant to work with merge requests, issues, pipelines and files without running a community server. It suits Self-Managed customers who want data to stay on their own instance, and platform teams who want to control access per group.
Pricing
As of October 2026, the GitLab MCP server is available on the Free, Premium and Ultimate tiers. GitLab moved it from Premium to Free in GitLab 19.2. There is no separate charge for the MCP server itself. Some toolsets rely on paid features: the code security tools need Ultimate features, and the Duo Agent Platform tools need GitLab Duo Agent Platform access.
Alternatives
- GitHub MCP server if your repositories live on GitHub.
- Azure DevOps MCP server for teams on Azure Repos, Boards and Pipelines.
- Atlassian MCP server if your issue tracking runs on Jira and Confluence.
Sources
- GitLab MCP server documentation: https://docs.gitlab.com/user/model_context_protocol/mcp_server/
- GitLab MCP server tools reference: https://docs.gitlab.com/user/model_context_protocol/mcp_server_tools/
- Official MCP Registry entry
com.gitlab/mcp: https://registry.modelcontextprotocol.io/v0/servers?search=com.gitlab
Pricing
Freemium: from Free on all GitLab tiers (as of October 2026)
Our Take on GitLab MCP
If your code lives on GitLab, this is the server to use: it is official, built into GitLab, signs in with OAuth and covers merge requests, work items, repositories and pipelines on every tier including Free. Keep the default toolsets unless you need wikis or security tools, use the toolset header to trim what the agent sees, and be careful with write tools on untrusted issues or merge requests because GitLab itself warns about prompt injection. Teams on GitHub should look at GitHub MCP server instead.
Alternatives to GitLab MCP
Official remote MCP server for Jira, Confluence, Bitbucket and Compass
View Atlassian MCP →