gitlab-mcp-server
The GitLab MCP Server enables AI assistants to interact with GitLab resources via the Model Context Protocol (MCP). Key capabilities include:
Repository Management: Search, create, fork repositories and list group projects
File Operations: Read, create, update, and push multiple files in a single commit
Branch Operations: Create and manage branches
Issue Tracking: Create, list, and filter issues; access comments, notes, and discussions
Merge Request Handling: Create, list, and filter merge requests
Wiki Management: Manage project and group wikis including creating, editing, deleting pages and uploading attachments
Member Management: List and manage project and group members
Project Activity Tracking: Retrieve project events and commit history
Provides tools for interacting with GitLab repositories, including searching, creating, and forking repositories; reading, creating, and updating files; managing branches; handling issues and merge requests; accessing project events and commit history.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gitlab-mcp-server list projects in my team's group"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitLab MCP Server
What it is
GitLab MCP Server lets an AI agent (Claude Desktop, Claude Code, Cursor, Zed, VS Code, or any Model Context Protocol client) talk directly to GitLab. It is a typed, paginated, schema-validated bridge to the GitLab REST API, exposed as 86 MCP tools. It is not a wrapper around glab and it does not screen-scrape.
It runs against gitlab.com or any self-hosted GitLab instance, and authenticates with a personal access token, an OAuth Bearer token forwarded by an upstream gateway, or a read-only token for safe demos.
Related MCP server: Kepler MCP GitLab Server
Why it exists
Anthropic released MCP on November 25, 2024. The reference servers covered Google Drive, Slack, GitHub, Git, Postgres, and Puppeteer. There was no GitLab server. The Yoda Digital engineering team runs on self-hosted GitLab, so the official examples did not help us, and the early community ports were not yet trying to cover the GitLab surface area properly.
We wrote one for ourselves. Group projects, activity tracking, the operations our DevOps actually needed. We open-sourced it on March 18, 2025, expecting maybe five people to find it useful.
A year on the project has 86 tools, working stdio / SSE / Streamable HTTP transports, PAT and OAuth modes, a Docker image on ghcr.io, and a Helm chart written almost entirely by an external contributor we had never met. Releases 0.4.0 and 0.5.0 are mostly someone else's code now, which is the best problem an open-source maintainer can have.
Quick start
Local clients (stdio)
For Claude Desktop, Cursor, Zed, and any client that runs MCP servers as a local subprocess. Add this to your client's MCP config (for Claude Desktop, that's claude_desktop_config.json):
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@yoda.digital/gitlab-mcp-server"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-…",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}Self-hosted? Replace GITLAB_API_URL with your instance, e.g. https://gitlab.example.com/api/v4. Want a safe demo with no write access? Add "GITLAB_READ_ONLY_MODE": "true". Per-IDE notes are in docs/CURSOR_INTEGRATION.md.
Remote (Streamable HTTP, OAuth-gated)
For shared deployments and modern remote MCP clients, run the server as an HTTP service. Network-exposed deployments require AUTH_MODE=oauth — the server refuses to start with AUTH_MODE=pat on a non-loopback bind. See SECURITY.md for the threat model.
docker run --rm -p 3000:3000 \
-e HOST=0.0.0.0 \
-e AUTH_MODE=oauth \
-e USE_STREAMABLE_HTTP=true \
ghcr.io/yoda-digital/mcp-gitlab-server:latestThen front the container with a gateway that injects Authorization: Bearer <token> per connection — the server forwards that Bearer to GitLab as the per-connection PAT. Point clients at http://your-gateway/mcp.
Operational details, probe configuration, and troubleshooting are in docs/OPERATIONS.md.
What's in the box
86 tools, grouped by surface:
Repositories: search, create, fork, get and update project metadata.
Files and branches: read, create, update, and delete files; multi-file commits; branches (list, create, delete); repository tree.
Tags and releases: list and create tags; list and create releases.
Issues: create, list, update, notes, threaded discussions.
Merge requests: create, update, merge, rebase; approvals; auto-merge; notes, discussions, changes, commits.
CI/CD: pipelines (list, get, trigger, retry, cancel), jobs (list, get, log, retry, cancel), environments.
Wikis: project and group wikis, including attachments.
Groups and members: groups CRUD, subgroups, project and group members.
Labels and milestones: list, create, update; protected branches: list, protect, unprotect.
Users and meta: current user, list/get user, project events, commit history.
Full tool list in CLAUDE.md. Per-tool docs for selected tools in docs/api/.
Read-only mode (GITLAB_READ_ONLY_MODE=true) filters every mutating tool out at registration time. A misbehaving agent cannot see them, let alone call them.
Transports
Transport | When to use | Flag |
stdio | Local clients (Claude Desktop, Cursor, Zed). The default. | (default) |
SSE | Remote clients still on the legacy SSE spec. |
|
Streamable HTTP | Remote clients on the current MCP Streamable HTTP spec. |
|
Streamable HTTP runs POST /mcp, GET /mcp, and DELETE /mcp, with session management via the MCP-Session-Id header. The /healthz endpoint returns 503 when active sessions exceed HEALTHZ_MAX_SESSIONS, intended for Kubernetes liveness and readiness probes.
Authentication
Two modes. The right one depends on whether the HTTP transport is reachable from the network.
OAuth per connection (AUTH_MODE=oauth, the default for network-exposed deployments). The server holds no static token. Every MCP connection brings its own Authorization: Bearer <token>, which the server forwards to GitLab as the effective PAT for that connection. Run it behind a gateway that handles your IdP. This is how you operate one shared deployment for an entire team. Required whenever bind is non-loopback.
PAT mode (AUTH_MODE=pat, loopback only). The server holds one personal access token in GITLAB_PERSONAL_ACCESS_TOKEN. The HTTP transport runs without authentication in this mode, so the server enforces a loopback-only bind (HOST=127.0.0.1) and refuses to start otherwise. Right choice for stdio clients and single-tenant local dev. Not supported in Helm — see the chart's auth-validation guard.
Configuration
Variable | Default | Purpose |
| — | Required in PAT mode. |
|
| GitLab API base URL. Point at your self-hosted instance if needed. |
|
| Hide all write tools. |
|
|
|
|
| Bind address for HTTP transports. Set to |
|
| Enable legacy SSE transport. |
|
| Enable MCP Streamable HTTP transport. |
|
| HTTP listen port for SSE and Streamable HTTP. |
| (empty) | Comma-separated allowlist. Empty means |
|
|
|
.env.example ships in the repo for local development.
Deployment
Docker
ghcr.io/yoda-digital/mcp-gitlab-server:latestMulti-stage build on node:24-alpine. Runs as non-root (uid 1000) with all capabilities dropped. Compatible with read-only root filesystems and the seccompProfile: RuntimeDefault Kubernetes pod-security setting. Image tags follow semver on releases; latest tracks the most recent tagged release.
Kubernetes (Helm)
helm install gitlab-mcp oci://ghcr.io/yoda-digital/charts/gitlab-mcpThe chart defaults to AUTH_MODE=oauth so a vanilla install is auth-gated. Front the Service with an Ingress or gateway that injects Authorization: Bearer <token> per connection.
The chart ships liveness and readiness probes against /healthz, an optional PodDisruptionBudget, ConfigMap and Secret with rolling-restart annotations, and five fail-loud guards that refuse to render bad configurations:
AUTH_MODE=patwith non-loopbackHOST(CWE-306 — seechart/templates/auth-validation.yaml)empty PAT in PAT mode without
existingSecretboth
existingSecretand inlinesecret.GITLAB_PERSONAL_ACCESS_TOKENset (a silent precedence trap, otherwise)PDB minAvailable >= replicaCount(drain deadlock)both
minAvailableandmaxUnavailableset on the PDB (Kubernetes rejects this combination at admission)
values.yaml is annotated for helm-docs, and chart/README.md is regenerated and drift-checked in CI.
Security
Vulnerabilities go through GitHub's Private Vulnerability Reporting, not public issues. Threat model and scope are in SECURITY.md.
A few things that are true about the supply chain. Every npm publish is signed with Sigstore provenance via OIDC Trusted Publishing. CodeQL runs on every push and PR with the security-extended and security-and-quality query packs. Dependabot is on, grouped, and weekly. npm audit reports zero vulnerabilities at the current release. main requires PRs, status checks, squash or rebase merges, and linear history.
Read-only mode is enforced at tool registration, not at the request boundary. If a regression lets a write tool execute under GITLAB_READ_ONLY_MODE=true, that is a security bug. Please report it.
Where this fits in the ecosystem
There are several ways to combine GitLab and MCP. Pick the one that matches your situation:
GitLab's own built-in MCP server at
https://<your-instance>/api/v4/mcp. 15 tools, requires GitLab Premium or Ultimate, OAuth integrated with your GitLab IdP. The right choice if you have the subscription and 15 tools is enough surface area for your agents.zereight/gitlab-mcp, the largest community implementation. Broader auth surface (PAT, OAuth2 browser flow, OAuth proxy, remote authorization), more tools. A good fit if you want maximum coverage and do not mind a larger project to reason about.mcpland/gitlab-mcp, with a policy-engine focus. OAuth2 PKCE, multi-instance routing, cookie-based auth. Good for tightly controlled enterprise deployments.This server (
@yoda.digital/gitlab-mcp-server). 86 tools, three transports, PAT and OAuth, Sigstore-provenanced npm releases, a non-root multi-stage Docker image, and a Helm chart with fail-loud guards. Good if you want a smaller, security-mature project that lands cleanly into a Kubernetes deployment.
None of these is universally best, and we will not pretend otherwise.
Contributing
PRs welcome. The shape we ask for:
Fork, branch (
feature/*,fix/*,docs/*,refactor/*).Conventional Commits (
feat:,fix:,docs:,chore:, …). They drive the changelog.Add or update vitest tests for behavior changes.
npm testis the gate.Open a PR. CI runs
build-and-test, CodeQL, Dockerfile lint, Helm lint and template smoke test, and a Helm chart README drift check.
Local setup:
git clone https://github.com/yoda-digital/mcp-gitlab-server.git
cd mcp-gitlab-server
npm install
npm test
npm run devFull guidelines are in CONTRIBUTING.md. AI-assisted contribution rules are in ai_code_of_conduct.md. Code of Conduct: CODE_OF_CONDUCT.md. A few good first issue tickets live in the issue tracker.
Contributors
This project has more authors than its origin suggests.
Ion (Nalyk) Calmîș is the original author and maintainer. CTO at Yoda Digital.
Olivier Gintrand (@ecthelion77) wrote the OAuth per-connection authentication path, the MCP Streamable HTTP transport, the multi-stage Dockerfile, and the Helm chart, including the fail-loud guards. Releases 0.4.0 and 0.5.0 are mostly his work, merged via PR #42 and PR #44.
Thomas Léveil (@thomasleveil) and BenSchoweCONPORT sent early PRs.
Dependabot is responsible for most of the chore commits in the changelog and never sleeps.
If you have sent a PR or a security report and you are not on this list, that is a bug. Please open an issue.
License
MIT.
Links
Built with ❤️ by Yoda.Digital
Available Tools
86 toolsapprove_merge_requestC
Approve a merge request
Inputs: sha, project_id, merge_request_iid.
cancel_auto_mergeC
Cancel auto-merge for a merge request
Inputs: project_id, merge_request_iid.
cancel_jobC
Cancel a running job
Inputs: job_id, project_id.
cancel_pipelineB
Cancel a running pipeline
Inputs: project_id, pipeline_id.
compare_branchesC
Compare two branches, tags, or commits
Inputs: to, from, straight, project_id.
create_branchC
Create a new branch in a GitLab project
Inputs: ref, branch, project_id.
create_groupC
Create a new GitLab group
Inputs: name, path, parent_id, visibility, +3 more.
create_group_wiki_pageC
Create a new wiki page for a GitLab group
Inputs: title, format, content, group_id.
create_issueC
Create a new issue in a GitLab project
Inputs: title, labels, project_id, description, +2 more.
create_issue_noteB
Add a comment to an issue
Inputs: body, internal, issue_iid, project_id.
create_labelB
Create a new label in a GitLab project
Inputs: name, color, priority, project_id, +1 more.
create_merge_requestC
Create a new merge request in a GitLab project
Inputs: draft, title, project_id, description, +3 more.
create_merge_request_discussionC
Create a new discussion on a merge request
Inputs: body, position, project_id, merge_request_iid.
create_merge_request_noteC
Add a comment to a merge request
Inputs: body, internal, project_id, merge_request_iid.
create_milestoneC
Create a new milestone in a GitLab project
Inputs: title, due_date, project_id, start_date, +1 more.
create_or_update_fileC
Create or update a single file in a GitLab project
Inputs: branch, content, file_path, project_id, +2 more.
create_project_wiki_pageC
Create a new wiki page for a GitLab project
Inputs: title, format, content, project_id.
create_releaseB
Create a new release for a GitLab project
Inputs: ref, name, tag_name, milestones, +3 more.
create_repositoryC
Create a new GitLab project
Inputs: name, visibility, description, initialize_with_readme.
create_tagC
Create a new tag in a GitLab project
Inputs: ref, message, tag_name, project_id, +1 more.
delete_branchB
Delete a branch from a GitLab project
Inputs: branch, project_id.
delete_groupB
Delete a GitLab group
Inputs: group_id.
delete_group_wiki_pageC
Delete a wiki page from a GitLab group
Inputs: slug, group_id.
delete_project_wiki_pageC
Delete a wiki page from a GitLab project
Inputs: slug, project_id.
edit_group_wiki_pageC
Edit an existing wiki page for a GitLab group
Inputs: slug, title, format, content, +1 more.
edit_project_wiki_pageC
Edit an existing wiki page for a GitLab project
Inputs: slug, title, format, content, +1 more.
fork_repositoryB
Fork a GitLab project to your account or specified namespace
Inputs: namespace, project_id.
get_current_userA
Get details of the currently authenticated user
Inputs: no named parameters.
get_environmentB
Get details of a specific environment
Inputs: project_id, environment_id.
get_file_contentsC
Get the contents of a file or directory from a GitLab project
Inputs: ref, file_path, project_id.
get_groupC
Get details of a specific group
Inputs: group_id, with_projects, with_custom_attributes.
get_group_wiki_pageC
Get a specific wiki page for a GitLab group
Inputs: slug, version, group_id, render_html.
get_jobC
Get details of a specific job
Inputs: job_id, project_id.
get_job_logB
Get the log/trace output of a job
Inputs: job_id, project_id.
get_merge_request_changesB
Get the changes/diffs for a merge request
Inputs: project_id, access_raw_diffs, merge_request_iid.
get_merge_request_commitsB
Get the commits for a merge request
Inputs: page, per_page, project_id, merge_request_iid.
get_pipelineB
Get details of a specific pipeline
Inputs: project_id, pipeline_id.
get_projectC
Get details of a GitLab project
Inputs: license, project_id, statistics, with_custom_attributes.
get_project_eventsC
Get recent events/activities for a GitLab project
Inputs: page, sort, after, action, +4 more.
get_project_wiki_pageC
Get a specific wiki page for a GitLab project
Inputs: slug, version, project_id, render_html.
get_repository_treeC
Get the repository file tree
Inputs: ref, page, path, per_page, +2 more.
get_userB
Get details of a specific user
Inputs: user_id.
list_branchesB
List branches for a GitLab project
Inputs: page, regex, search, per_page, +1 more.
list_commitsC
Get commit history for a GitLab project
Inputs: all, sha, page, path, +6 more.
list_environmentsC
List environments for a GitLab project
Inputs: name, page, search, states, +2 more.
list_group_membersB
List all members of a GitLab group (including inherited members)
Inputs: page, query, group_id, per_page.
list_group_projectsC
List all projects (repositories) within a specific GitLab group
Inputs: page, sort, search, simple, +6 more.
list_groupsC
List GitLab groups
Inputs: page, sort, owned, search, +4 more.
list_group_subgroupsB
List subgroups of a group
Inputs: page, sort, owned, search, +4 more.
list_group_wiki_pagesC
List all wiki pages for a GitLab group
Inputs: group_id, with_content.
list_issue_discussionsC
Fetch all discussions (threaded comments) for a GitLab issue
Inputs: page, per_page, issue_iid, project_id.
list_issue_notesC
Fetch all comments and system notes for a GitLab issue
Inputs: page, sort, order_by, per_page, +2 more.
list_issuesC
Get issues for a GitLab project
Inputs: iid, page, sort, scope, +13 more.
list_labelsC
List labels for a GitLab project
Inputs: page, search, per_page, project_id, +1 more.
list_merge_request_discussionsB
List all discussions (threaded comments) on a merge request
Inputs: page, per_page, project_id, merge_request_iid.
list_merge_request_notesC
List all comments and notes on a merge request
Inputs: page, sort, order_by, per_page, +2 more.
list_merge_requestsC
Get merge requests for a GitLab project
Inputs: wip, page, sort, scope, +15 more.
list_milestonesB
List milestones for a GitLab project
Inputs: iids, page, state, title, +4 more.
list_pipeline_jobsC
List jobs for a specific pipeline
Inputs: page, scope, per_page, project_id, +2 more.
list_pipelinesB
List pipelines for a GitLab project
Inputs: ref, sha, page, sort, +8 more.
list_project_membersB
List all members of a GitLab project (including inherited members)
Inputs: page, query, per_page, project_id.
list_project_wiki_pagesC
List all wiki pages for a GitLab project
Inputs: project_id, with_content.
list_protected_branchesC
List protected branches for a GitLab project
Inputs: page, search, per_page, project_id.
list_releasesB
List releases for a GitLab project
Inputs: page, sort, order_by, per_page, +2 more.
list_tagsB
List tags for a GitLab project
Inputs: page, sort, search, order_by, +2 more.
list_usersC
List GitLab users
Inputs: page, sort, active, search, +5 more.
merge_merge_requestC
Merge a merge request
Inputs: sha, squash, project_id, merge_request_iid, +3 more.
protect_branchC
Protect a branch in a GitLab project
Inputs: name, project_id, allow_force_push, push_access_level, +2 more.
push_filesC
Push multiple files to a GitLab project in a single commit
Inputs: files, branch, project_id, commit_message.
rebase_merge_requestC
Rebase a merge request onto the target branch
Inputs: skip_ci, project_id, merge_request_iid.
retry_jobC
Retry a failed job
Inputs: job_id, project_id.
retry_pipelineB
Retry failed jobs in a pipeline
Inputs: project_id, pipeline_id.
search_repositoriesC
Search for GitLab projects
Inputs: page, search, per_page.
set_auto_mergeA
Set a merge request to merge when pipeline succeeds (auto-merge)
Inputs: sha, squash, project_id, merge_request_iid, +3 more.
trigger_pipelineB
Trigger a new pipeline for a branch or tag
Inputs: ref, variables, project_id.
unapprove_merge_requestA
Remove your approval from a merge request
Inputs: project_id, merge_request_iid.
unprotect_branchB
Remove protection from a branch
Inputs: name, project_id.
update_groupB
Update a GitLab group's settings
Inputs: name, path, group_id, visibility, +3 more.
update_issueB
Update an existing issue
Inputs: title, labels, due_date, issue_iid, +6 more.
update_labelC
Update an existing label
Inputs: color, label_id, new_name, priority, +2 more.
update_merge_requestC
Update an existing merge request
Inputs: draft, title, labels, squash, +9 more.
update_merge_request_noteB
Edit a comment on a merge request
Inputs: body, note_id, project_id, merge_request_iid.
update_milestoneB
Update an existing milestone
Inputs: title, due_date, project_id, start_date, +3 more.
update_projectC
Update a GitLab project's settings
Inputs: name, archived, project_id, visibility, +6 more.
upload_group_wiki_attachmentC
Upload an attachment to a GitLab group wiki
Inputs: branch, content, group_id, file_path, +1 more.
upload_project_wiki_attachmentC
Upload an attachment to a GitLab project wiki
Inputs: branch, content, file_path, project_id, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 86 tools
Most tools follow a clear resource+action pattern, but some pairs could cause confusion: list_issue_notes vs list_issue_discussions, and list_merge_request_notes vs list_merge_request_discussions are distinct (flat vs threaded) but descriptions don't emphasize the difference. Also create_or_update_file and push_files both handle file writing, though the scope (single vs multiple) is discernible.
Tool names consistently follow a verb_noun pattern throughout (create_, list_, get_, update_, delete_, etc.). Even complex operations like protect_branch, cancel_auto_merge, and rebase_merge_request follow the same predictable convention. No mixing of styles or vague verbs.
86 tools is far beyond the 25-tool threshold the rubric flags as too many. While GitLab is a large platform think the surface could be consolidated (e.g., wiki/group/project variants could be parameterized). The count is overwhelming for an agent to navigate efficiently.
The surface is extremely comprehensive, covering projects, merge requests, issues, pipelines, wikis, groups, labels, milestones, releases, and more. Minor gaps exist: no delete issue, no delete merge request, no add/remove group members (only list), and no label deletion. Core workflows are covered, so agents can mostly work around those gaps.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Unofficial GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
MCP server for Product Management
Related MCP Servers
- -licenseAqualityBmaintenanceMCP Server for the GitLab API, enabling project management, file operations, and more.95,950 npm92,139MIT
- AlicenseNot gradedqualityDmaintenanceProduction-ready MCP server providing GitLab integration with OAuth authentication, enabling AI assistants to manage projects, issues, merge requests, branches, files, and commits across GitLab instances.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for interacting with GitLab API, supporting both self-hosted instances and gitlab.com. Provides tools for managing issues, merge requests, code review, pipelines, milestones, releases, search, and file access.MIT
- FlicenseNot gradedqualityDmaintenanceHTTP-based MCP server for GitLab API, enabling project management, issue tracking, merge requests, and file operations through natural language.-