gitlab mcp
GitLab MCP Server
New Feature: Dynamic GitLab API URL support with connection pooling! See Dynamic API URL Documentation for details.
@zereight/mcp-gitlab
A comprehensive GitLab MCP server for AI clients. Manage projects, merge requests, issues, pipelines, wiki, releases, tags, milestones, and more through stdio, SSE, and Streamable HTTP.
Supports PAT, OAuth, read-only mode, dynamic API URLs, and remote authorization for VS Code, Claude, Cursor, Copilot, and other MCP clients.
Why use this GitLab MCP?
Broad GitLab coverage — projects, repository browsing, merge requests, issues, pipelines, wiki, releases, tags, labels, milestones, and more
Flexible auth — Personal Access Token, local OAuth2 browser flow, MCP OAuth proxy, and per-request remote authorization
Multiple transports — stdio for local clients, SSE for legacy clients, and Streamable HTTP for modern remote deployments
Client-friendly setup — examples for Claude Code, Codex, Antigravity, OpenCode, Copilot, Cline, Roo Code, Cursor, Kilo Code, and Amp Code
Self-hosted ready — works with custom GitLab instances, proxy settings, and dynamic API URL routing
Quick start: choose either Personal Access Token or OAuth2 setup below and use @zereight/mcp-gitlab in your MCP client configuration.
Client Setup Guides
JSON-Based MCP Clients Setup Guide - for Factory AI Droid, OpenClaw, and OpenCode style clients
Related MCP server: gitlab-mcp
Usage
Setup Overview
Authentication Methods
The server supports four authentication methods:
For local/desktop use (most common):
Personal Access Token (
GITLAB_PERSONAL_ACCESS_TOKEN) — simplest setupOAuth2 — Local Browser (
GITLAB_USE_OAUTH) — recommended for better security
For server/remote deployments:
OAuth2 — MCP Proxy (
GITLAB_MCP_OAUTH) — for remote MCP clients such as Claude.aiRemote Authorization (
REMOTE_AUTHORIZATION) — multi-user deployments where each caller provides their own token
Quick setup paths
Claude Code: see Claude Code Setup Guide
VS Code: see VS Code Setup Guide
GitHub Copilot: see GitHub Copilot Setup Guide
Codex: see Codex Setup Guide
Cursor: see Cursor Setup Guide
Factory AI Droid / OpenClaw / OpenCode style clients: see JSON-Based MCP Clients Setup Guide
OAuth browser flow details: see OAuth2 Authentication Setup Guide
For the simplest local setup, start with a Personal Access Token. For browser-based local auth, use OAuth2. For remote or multi-user deployments, continue to the MCP OAuth and Remote Authorization sections later in this README.
Using CLI Arguments (for clients with env var issues)
Some MCP clients (like GitHub Copilot CLI) have issues with environment variables. Use CLI arguments instead:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab",
"--token=YOUR_GITLAB_TOKEN",
"--api-url=https://gitlab.com/api/v4"
],
"tools": ["*"]
}
}
}Available CLI arguments:
--token- GitLab Personal Access Token (replacesGITLAB_PERSONAL_ACCESS_TOKEN)--api-url- GitLab API URL (replacesGITLAB_API_URL)--read-only=true- Enable read-only mode (replacesGITLAB_READ_ONLY_MODE)--use-wiki=true- Enable wiki API (replacesUSE_GITLAB_WIKI)--use-milestone=true- Enable milestone API (replacesUSE_MILESTONE)--use-pipeline=true- Enable pipeline API (replacesUSE_PIPELINE)
CLI arguments take precedence over environment variables.
sse
docker run -i --rm \
-e HOST=0.0.0.0 \
-e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
-e GITLAB_READ_ONLY_MODE=true \
-e USE_GITLAB_WIKI=true \
-e USE_MILESTONE=true \
-e USE_PIPELINE=true \
-e SSE=true \
-p 3333:3002 \
zereight050/gitlab-mcp{
"mcpServers": {
"gitlab": {
"type": "sse",
"url": "http://localhost:3333/sse"
}
}
}streamable-http
docker run -i --rm \
-e HOST=0.0.0.0 \
-e REMOTE_AUTHORIZATION=true \
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
-e GITLAB_READ_ONLY_MODE=true \
-e USE_GITLAB_WIKI=true \
-e USE_MILESTONE=true \
-e USE_PIPELINE=true \
-e STREAMABLE_HTTP=true \
-p 3333:3002 \
zereight050/gitlab-mcp{
"mcpServers": {
"gitlab": {
"type": "streamable-http",
"url": "http://localhost:3333/mcp",
"headers": {
"Authorization": "Bearer glpat-..."
}
}
}
}Using MCP OAuth Proxy (GITLAB_MCP_OAUTH)
For server/remote deployments only. This mode requires the MCP server to be deployed with a publicly accessible HTTPS URL. For local/desktop use, see
GITLAB_USE_OAUTHabove.
For remote MCP clients that support the MCP OAuth specification (e.g. Claude.ai).
The server acts as a full OAuth 2.0 authorization server — unauthenticated requests
receive a 401 + WWW-Authenticate response, which triggers the OAuth browser flow
automatically on the client side.
Remote MCP clients such as OpenCode, MCPJam, and Claude.ai can send their own
callback URL during authorization. If you cannot register every client callback
URL in GitLab, enable GITLAB_OAUTH_CALLBACK_PROXY=true. With callback proxy
mode, GitLab only needs one registered redirect URI: {MCP_SERVER_URL}/callback.
GITLAB_OAUTH_REDIRECT_URI is for local OAuth (GITLAB_USE_OAUTH) only. It does
not override remote MCP OAuth client callback URLs and should not be used to fix
remote Unregistered redirect_uri errors.
This variable exists because the local OAuth flow starts a browser on the same
machine as the MCP server and listens for the callback on a local HTTP server,
for example http://127.0.0.1:8888/callback.
Remote MCP OAuth is different. In GITLAB_MCP_OAUTH=true mode, the MCP client
provides its own callback URL during /authorize. GITLAB_OAUTH_REDIRECT_URI
does not replace that client-provided URL.
Mode | Enable with | Callback variable | GitLab redirect URI |
Local OAuth |
|
|
|
Remote MCP OAuth |
|
|
|
Use GITLAB_OAUTH_REDIRECT_URI only when the MCP server itself owns the local
browser callback. Use GITLAB_OAUTH_CALLBACK_PROXY=true when a remote MCP client
owns the callback URL.
How it works: You deploy this MCP server somewhere with a public HTTPS URL. MCP
clients connect to {MCP_SERVER_URL}/mcp. The server handles the OAuth 2.0 flow,
exchanging credentials with GitLab on behalf of the client.
Prerequisites:
A publicly accessible HTTPS server URL (
MCP_SERVER_URL) — use ngrok for local testingA pre-registered GitLab OAuth application with
api(orread_api) scopes — Go toAdmin area→Applications, set Redirect URI to{MCP_SERVER_URL}/callback
Environment Variable | Required | Description |
| ✅ | Set to |
| ✅ | GitLab API base URL |
| ✅ | GitLab OAuth Application ID |
| ✅ | Public HTTPS URL of this MCP server |
| ✅ | Must be |
| optional | Set to |
| optional | Comma-separated scopes (default: |
When STREAMABLE_HTTP=true, server-side GITLAB_PERSONAL_ACCESS_TOKEN or GITLAB_JOB_TOKEN require REMOTE_AUTHORIZATION=true or GITLAB_MCP_OAUTH=true.
Troubleshooting
Unregistered redirect_uriCheck the
redirect_uriin the browser URL. If it points to a client callback such ashttp://127.0.0.1:xxxxx/.../callback, enable:GITLAB_OAUTH_CALLBACK_PROXY=trueDo not fix remote MCP OAuth by changing
GITLAB_OAUTH_REDIRECT_URI. That variable is for local OAuth (GITLAB_USE_OAUTH) only.
docker run -i --rm \
-e HOST=0.0.0.0 \
-e GITLAB_MCP_OAUTH=true \
-e GITLAB_OAUTH_CALLBACK_PROXY=true \
-e STREAMABLE_HTTP=true \
-e MCP_SERVER_URL=https://your-server.example.com \
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
-e GITLAB_OAUTH_APP_ID=your_app_id \
-p 3000:3002 \
zereight050/gitlab-mcpMCP client configuration:
{
"mcpServers": {
"gitlab": {
"type": "http",
"url": "https://your-server.example.com/mcp"
}
}
}Using Remote Authorization (REMOTE_AUTHORIZATION)
For server/remote deployments only. Each HTTP caller provides their own GitLab token directly in request headers — no OAuth flow involved.
For multi-user or multi-tenant deployments where each caller provides their own GitLab token in the HTTP request header. No OAuth flow — the MCP server forwards the token to GitLab on behalf of the caller.
Header priority: Private-Token > JOB-TOKEN > Authorization: Bearer
Environment Variable | Required | Description |
| ✅ | Set to |
| ✅ | Must be |
| optional | Allow per-request GitLab URL via |
Example request headers:
Private-Token: glpat-xxxxxxxxxxxxxxxxxxxxor using a Bearer token:
Authorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx⚠️
REMOTE_AUTHORIZATIONis not compatible with SSE transport.STREAMABLE_HTTP=trueis required.
Environment Variables
Use the dedicated reference for the full environment variable list:
Most users only need one of these starting sets:
Local PAT:
GITLAB_PERSONAL_ACCESS_TOKEN,GITLAB_API_URLLocal OAuth:
GITLAB_USE_OAUTH=true,GITLAB_OAUTH_CLIENT_ID,GITLAB_OAUTH_REDIRECT_URI,GITLAB_API_URLRemote multi-user HTTP:
STREAMABLE_HTTP=true,REMOTE_AUTHORIZATION=true,HOST,PORTMulti-pod HPA (stateless): above +
OAUTH_STATELESS_MODE=true,OAUTH_STATELESS_SECRET(same across all pods). See Stateless Mode.
Commonly referenced variables:
GITLAB_API_URLGITLAB_PERSONAL_ACCESS_TOKENGITLAB_USE_OAUTHREMOTE_AUTHORIZATIONGITLAB_MCP_OAUTHGITLAB_OAUTH_CALLBACK_PROXYOAUTH_STATELESS_MODEOAUTH_STATELESS_SECRET
The reference document also covers:
auth and OAuth variables
MCP OAuth proxy variables
project and tool filtering variables
dynamic tool discovery via
discover_tools(on-demand toolset activation)transport and session variables
proxy and TLS variables
For callback proxy mode details, see GitLab MCP OAuth Callback Proxy.
Remote Authorization Setup (Multi-User Support)
When using REMOTE_AUTHORIZATION=true, the MCP server can support multiple users, each with their own GitLab token passed via HTTP headers. This is useful for:
Shared MCP server instances where each user needs their own GitLab access
IDE integrations that can inject user-specific tokens into MCP requests
Setup Example:
# Start server with remote authorization
docker run -d \
-e HOST=0.0.0.0 \
-e STREAMABLE_HTTP=true \
-e REMOTE_AUTHORIZATION=true \
-e GITLAB_API_URL="https://gitlab.com/api/v4" \
-e GITLAB_READ_ONLY_MODE=true \
-e SESSION_TIMEOUT_SECONDS=3600 \
-p 3333:3002 \
zereight050/gitlab-mcpClient Configuration:
Your IDE or MCP client must send one of these headers with each request:
Authorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxxor
Private-Token: glpat-xxxxxxxxxxxxxxxxxxxxThe token is stored per session (identified by mcp-session-id header) and reused for subsequent requests in the same session.
Remote Authorization Client Configuration Example with Cursor
{
"mcpServers": {
"GitLab": {
"url": "http(s)://<your_mcp_gitlab_server>/mcp",
"headers": {
"Authorization": "Bearer glpat-..."
}
}
}
}Important Notes:
Remote authorization only works with Streamable HTTP transport
Each session is isolated - tokens from one session cannot access another session's data Tokens are automatically cleaned up when sessions close
Session timeout: Auth tokens expire after
SESSION_TIMEOUT_SECONDS(default 1 hour) of inactivity. After timeout, the client must send auth headers again. The transport session remains active.Each request resets the timeout timer for that session
Rate limiting: Each session is limited to
MAX_REQUESTS_PER_MINUTErequests per minute (default 60)Capacity limit: Server accepts up to
MAX_SESSIONSconcurrent sessions (default 1000)
MCP OAuth Setup (Claude.ai Native OAuth)
When using GITLAB_MCP_OAUTH=true, the server acts as an OAuth proxy to your GitLab
instance. Claude.ai (and any MCP-spec-compliant client) handles the entire browser
authentication flow automatically — no manual Personal Access Token management needed.
Prerequisites:
A pre-registered GitLab OAuth application is required. GitLab restricts dynamically
registered (unverified) applications to the mcp scope, which is insufficient for API
calls (need api or read_api).
Go to your GitLab instance → Admin Area > Applications (instance-wide) or User Settings > Applications (personal)
Create a new application with:
Confidential: unchecked
Scopes:
api,read_api,read_user(or whichever scopes you intend to request viaGITLAB_OAUTH_SCOPES)
Save and copy the Application ID — this is your
GITLAB_OAUTH_APP_ID
How it works:
User adds your MCP server URL in Claude.ai
Claude.ai discovers OAuth endpoints via
/.well-known/oauth-authorization-serverClaude.ai registers itself via Dynamic Client Registration (
POST /register) — handled locally by the MCP server (each client gets a virtual client ID)Claude.ai redirects the user's browser to GitLab's login page using the pre-registered OAuth application
User authenticates; GitLab redirects back to
https://claude.ai/api/mcp/auth_callbackClaude.ai sends
Authorization: Bearer <token>on every MCP requestServer validates the token with GitLab and stores it per session
Server setup:
docker run -d \
-e STREAMABLE_HTTP=true \
-e GITLAB_MCP_OAUTH=true \
-e GITLAB_OAUTH_APP_ID="your-gitlab-oauth-app-client-id" \
-e GITLAB_API_URL="https://gitlab.example.com/api/v4" \
-e MCP_SERVER_URL="https://your-mcp-server.example.com" \
-p 3002:3002 \
zereight050/gitlab-mcpFor local development (HTTP allowed):
MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL=true \
STREAMABLE_HTTP=true \
GITLAB_MCP_OAUTH=true \
GITLAB_OAUTH_APP_ID=your-gitlab-oauth-app-client-id \
MCP_SERVER_URL=http://localhost:3002 \
GITLAB_API_URL=https://gitlab.com/api/v4 \
node build/index.jsClaude.ai configuration:
{
"mcpServers": {
"GitLab": {
"url": "https://your-mcp-server.example.com/mcp"
}
}
}No headers field is needed — Claude.ai obtains the token via OAuth automatically.
Environment variables:
Variable | Required | Description |
| Yes | Set to |
| Yes | Client ID of the pre-registered GitLab OAuth application |
| Yes | Public HTTPS URL of your MCP server |
| Yes | Your GitLab instance API URL (e.g. |
| Yes | Must be |
| No | Comma-separated GitLab scopes to request (e.g. |
| No | Set |
Important Notes:
MCP OAuth only works with Streamable HTTP transport (
SSE=trueis incompatible)Each user session stores its own OAuth token — sessions are fully isolated
Session timeout, rate limiting, and capacity limits apply identically to the
REMOTE_AUTHORIZATIONmode (SESSION_TIMEOUT_SECONDS,MAX_REQUESTS_PER_MINUTE,MAX_SESSIONS)Header auth fallback: when
Private-TokenorJOB-TOKENrequest headers are present, OAuth validation is skipped and the raw token is used directly for that session. This allows PATs and CI job tokens to be used alongside the OAuth flow on the same server instance.Authorization: Beareris always treated as an OAuth token — usePrivate-Tokenfor PAT-based header auth.
Agent Skill Files
Pre-built skill files are available in skills/gitlab-mcp/ for AI agents that support skill/instruction loading (Claude Code, GitHub Copilot, Cursor, etc.).
SKILL.md — Core guide (~800 tokens) with toolset overview, key workflows, and parameter hints
reference/ — Detailed workflow docs for code review, merge requests, issues, and pipelines
Install with the skills CLI:
npx skills add zereight/gitlab-mcp --skill gitlab-mcp-skillRegister the skill directory in your AI client to get optimal tool usage guidance without relying solely on the full ListTools response.
Tools 🛠️
merge_merge_request- Merge a merge request in a GitLab projectcreate_or_update_file- Create or update a single file in a GitLab projectsearch_repositories- Search for GitLab projectscreate_repository- Create a new GitLab projectget_file_contents- Get the contents of a file or directory from a GitLab projectpush_files- Push multiple files to a GitLab project in a single commitcreate_issue- Create a new issue in a GitLab projectcreate_merge_request- Create a new merge request in a GitLab projectfork_repository- Fork a GitLab project to your account or specified namespacecreate_branch- Create a new branch in a GitLab projectget_merge_request- Get details of a merge request with compact deployment summary, behind-count, commit addition summary, and approval summary (Either mergeRequestIid or branchName must be provided)get_merge_request_diffs- Get the changes/diffs of a merge request (Either mergeRequestIid or branchName must be provided)list_merge_request_diffs- List merge request diffs with pagination support (Either mergeRequestIid or branchName must be provided)get_merge_request_conflicts- Get the conflicts of a merge request in a GitLab projectlist_merge_request_changed_files- STEP 1 of code review workflow. Returns ONLY the list of changed file paths in a merge request — WITHOUT diff content. Call this first to get file paths, then call get_merge_request_file_diff with multiple files in a single batched call (recommended 3-5 files per call). Supports excluded_file_patterns filtering using regex. (Either mergeRequestIid or branchName must be provided)get_merge_request_file_diff- STEP 2 of code review workflow. Get diffs for one or more files from a merge request. Call list_merge_request_changed_files first, then pass them as an array to fetch diffs efficiently. Batching multiple files (recommended 3-5) is supported. (Either mergeRequestIid or branchName must be provided)list_merge_request_versions- List all versions of a merge requestget_merge_request_version- Get a specific version of a merge requestget_branch_diffs- Get the changes/diffs between two branches or commits in a GitLab projectupdate_merge_request- Update a merge request (Either mergeRequestIid or branchName must be provided)create_note- Create a new note (comment) to an issue or merge requestcreate_merge_request_thread- Create a new thread on a merge requestmr_discussions- List discussion items for a merge requestresolve_merge_request_thread- Resolve a thread on a merge requestupdate_merge_request_note- Modify an existing merge request thread notecreate_merge_request_note- Add a new note to an existing merge request threaddelete_merge_request_discussion_note- Delete a discussion note on a merge requestupdate_merge_request_discussion_note- Update a discussion note on a merge requestcreate_merge_request_discussion_note- Add a new discussion note to an existing merge request threaddelete_merge_request_note- Delete an existing merge request noteget_merge_request_note- Get a specific note for a merge requestget_merge_request_notes- List notes for a merge requestget_draft_note- Get a single draft note from a merge requestlist_draft_notes- List draft notes for a merge requestcreate_draft_note- Create a draft note for a merge requestupdate_draft_note- Update an existing draft notedelete_draft_note- Delete a draft notepublish_draft_note- Publish a single draft notebulk_publish_draft_notes- Publish all draft notes for a merge requestlist_merge_requests- List merge requests globally or in a specific GitLab project with filtering options (project_id is now optional)approve_merge_request- Approve a merge request (requires appropriate permissions)unapprove_merge_request- Unapprove a previously approved merge requestget_merge_request_approval_state- Get merge request approval details including approvers (usesapproval_statewhen available, otherwise falls back toapprovals)update_issue_note- Modify an existing issue thread notecreate_issue_note- Add a new note to an existing issue threadlist_issues- List issues (default: created by current user only; use scope='all' for all accessible issues)my_issues- List issues assigned to the authenticated user (defaults to open issues)get_issue- Get details of a specific issue in a GitLab projectupdate_issue- Update an issue in a GitLab projectdelete_issue- Delete an issue from a GitLab projectlist_todos- List GitLab to-do items for the current usermark_todo_done- Mark a GitLab to-do item as donemark_all_todos_done- Mark all pending GitLab to-do items as done for the current userlist_issue_links- List all issue links for a specific issuelist_issue_discussions- List discussions for an issue in a GitLab projectget_issue_link- Get a specific issue linkcreate_issue_link- Create an issue link between two issuesdelete_issue_link- Delete an issue linklist_namespaces- List all namespaces available to the current userget_namespace- Get details of a namespace by ID or pathverify_namespace- Verify if a namespace path existsget_project- Get details of a specific projectlist_projects- List projects accessible by the current userlist_project_members- List members of a GitLab projectlist_group_projects- List projects in a GitLab group with filtering optionslist_group_iterations- List group iterations with filtering optionslist_labels- List labels for a projectget_label- Get a single label from a projectcreate_label- Create a new label in a projectupdate_label- Update an existing label in a projectdelete_label- Delete a label from a projectlist_pipelines- List pipelines in a GitLab project with filtering optionsget_pipeline- Get details of a specific pipeline in a GitLab projectlist_pipeline_jobs- List all jobs in a specific pipelinelist_pipeline_trigger_jobs- List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelinesget_pipeline_job- Get details of a GitLab pipeline job numberget_pipeline_job_output- Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usagevalidate_ci_lint- Validate provided GitLab CI/CD YAML content for a projectvalidate_project_ci_lint- Validate an existing.gitlab-ci.ymlconfiguration for a projectcreate_pipeline- Create a new pipeline for a branch or tagretry_pipeline- Retry a failed or canceled pipelinecancel_pipeline- Cancel a running pipelineplay_pipeline_job- Run a manual pipeline jobretry_pipeline_job- Retry a failed or canceled pipeline jobcancel_pipeline_job- Cancel a running pipeline joblist_deployments- List deployments in a GitLab project with filtering optionsget_deployment- Get details of a specific deployment in a GitLab projectlist_environments- List environments in a GitLab projectget_environment- Get details of a specific environment in a GitLab projectlist_job_artifacts- List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizesdownload_job_artifacts- Download the entire artifact archive (zip) for a job to a local path. Returns the saved file pathget_job_artifact_file- Get the content of a single file from a job's artifacts by its path within the archivelist_milestones- List milestones in a GitLab project with filtering optionsget_milestone- Get details of a specific milestonecreate_milestone- Create a new milestone in a GitLab projectedit_milestone- Edit an existing milestone in a GitLab projectdelete_milestone- Delete a milestone from a GitLab projectget_milestone_issue- Get issues associated with a specific milestoneget_milestone_merge_requests- Get merge requests associated with a specific milestonepromote_milestone- Promote a milestone to the next stageget_milestone_burndown_events- Get burndown events for a specific milestonelist_wiki_pages- List wiki pages in a GitLab projectget_wiki_page- Get details of a specific wiki pagecreate_wiki_page- Create a new wiki page in a GitLab projectupdate_wiki_page- Update an existing wiki page in a GitLab projectdelete_wiki_page- Delete a wiki page from a GitLab projectlist_group_wiki_pages- List wiki pages in a GitLab groupget_group_wiki_page- Get details of a specific group wiki pagecreate_group_wiki_page- Create a new wiki page in a GitLab groupupdate_group_wiki_page- Update an existing wiki page in a GitLab groupdelete_group_wiki_page- Delete a wiki page from a GitLab groupget_repository_tree- Get the repository tree for a GitLab project (list files and directories)list_commits- List repository commits with filtering optionsget_commit- Get details of a specific commitget_commit_diff- Get changes/diffs of a specific commitlist_commit_statuses- List statuses for a specific commitcreate_commit_status- Create or update the status of a specific commitlist_releases- List all releases for a projectget_release- Get a release by tag namecreate_release- Create a new release in a GitLab projectupdate_release- Update an existing release in a GitLab projectdelete_release- Delete a release from a GitLab project (does not delete the associated tag)create_release_evidence- Create release evidence for an existing release (GitLab Premium/Ultimate only)download_release_asset- Download a release asset file by direct asset pathlist_tags- List repository tags with filtering and pagination supportget_tag- Get details of a specific repository tagcreate_tag- Create a new tag in the repositorydelete_tag- Delete a tag from the repositoryget_tag_signature- Get the signature of a signed tagget_users- Get GitLab user details by usernameslist_events- List all events for the currently authenticated userget_project_events- List all visible events for a specified projectupload_markdown- Upload a file to a GitLab project for use in markdown contentdownload_attachment- Download an uploaded file from a GitLab project by secret and filenameget_work_item- Get a single work item with full details including status, hierarchy (parent/children), type, labels, assignees, and all widgetslist_work_items- List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy infocreate_work_item- Create a new work item (issue, task, incident, test_case, epic, key_result, objective, requirement, ticket). Supports setting title, description, labels, assignees, weight, parent, health status, start/due dates, milestone, and confidentialityupdate_work_item- Update a work item. Can modify title, description, labels, assignees, weight, state, status, parent hierarchy, children, health status, start/due dates, milestone, confidentiality, linked items, and custom fieldsconvert_work_item_type- Convert a work item to a different type (e.g. issue to task, task to incident)list_work_item_statuses- List available statuses for a work item type in a project. Requires GitLab Premium/Ultimate with configurable statuseslist_custom_field_definitions- List available custom field definitions for a work item type in a project. Returns field names, types, and IDs needed for setting custom fields via update_work_itemmove_work_item- Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutationlist_work_item_notes- List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system/internal flagscreate_work_item_note- Add a note/comment to a work item. Supports Markdown, internal notes, and threaded repliesget_timeline_events- List timeline events for an incident. Returns chronological events with notes, timestamps, and tagscreate_timeline_event- Create a timeline event on an incident. Supports tags: 'Start time', 'End time', 'Impact detected', 'Response initiated', 'Impact mitigated', 'Cause identified'list_webhooks- List all configured webhooks for a GitLab project or group. Provide either project_id or group_idlist_webhook_events- List recent webhook events (past 7 days) for a project or group webhook. Use summary mode for overview, then get_webhook_event for full detailsget_webhook_event- Get full details of a specific webhook event by ID, including request/response payloadssearch_code- Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)search_project_code- Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)search_group_code- Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)execute_graphql- Execute a GitLab GraphQL query
Testing 🧪
The project includes comprehensive test coverage including remote authorization:
# Run all tests (API validation + remote auth)
npm test
# Run only remote authorization tests
npm run test:remote-auth
# Run all tests including readonly MCP tests
npm run test:all
# Run only API validation
npm run test:integrationAll remote authorization tests use a mock GitLab server and do not require actual GitLab credentials.
Available Tools
40 toolscreate_issueB
Create a new issue. Open a new issue. Use update_issue for an existing issue and create_issue_note for discussion.
Inputs: title (required), project_id (required), labels, weight, +5 more.
create_issue_noteA
Add a note to an issue, optionally replying to a discussion thread. Add a note to an existing issue, optionally as a reply. Use update_issue for issue fields.
Inputs: body (required), issue_iid (required), project_id (required), jmespath, +2 more.
create_merge_requestA
Create a new merge request. Open a merge request from an existing source branch to a target. Use update_merge_request after it exists.
Inputs: title (required), project_id (required), source_branch (required), target_branch (required), +10 more.
create_merge_request_threadA
Create a new thread on a merge request. Start a review thread. Use create_merge_request_note for an unthreaded note and create_merge_request_discussion_note to reply.
Inputs: body (required), project_id (required), merge_request_iid (required), jmespath, +2 more.
discover_toolsARead-only
List or activate a toolset for this session. Omit category to list; pass one to enable. Prefer this over GITLAB_TOOLSETS=all (loads ~all schemas). Session-only; with OAUTH_STATELESS_MODE=true persist GITLAB_TOOLSETS=core,<category> instead. Categories: core, merge_requests, issues, repositories, branches, projects, labels, ci, groups, pipelines, milestones, wiki, releases, tags, snippets, users, workitems, webhooks, search, variables, dependency_proxy, vulnerabilities, orbit. Response lists already-active ones. api is explicit-only.
Inputs: category, jmespath.
get_branchARead-only
Get branch details (commit, protection status). To find resources, use the matching list or search tool.
Inputs: project_id (required), branch_name (required), jmespath.
get_commitBRead-only
Get details of a specific commit. To find resources, use the matching list or search tool.
Inputs: sha (required), project_id (required), stats, jmespath.
get_commit_diffARead-only
Get changes/diffs of a specific commit. Return the file diffs for one commit. Use get_commit for metadata without the patch.
Inputs: sha (required), project_id (required), jmespath, full_diff.
get_file_blameARead-only
Get git blame for a file at a given ref. Each entry maps a contiguous range of source lines to the commit that last changed them (id, author, authored_date, message). Use range_start/range_end to limit blame to specific lines.
Inputs: ref (required), file_path (required), project_id (required), jmespath, +2 more.
get_file_contentsARead-only
Get the contents of one file from a GitLab project. ref defaults to the default branch. encoding is utf8 when a UTF-8 round-trip test passes, else base64; binaries with valid UTF-8 bytes (e.g. 0x00) also pass. Read encoding, don't infer it. Directories are not supported: use get_repository_tree.
Inputs: ref, path, limit, offset, +3 more.
get_issueARead-only
Get one issue. Slim nested milestone by default; full_response=true for the complete milestone. Use this for issue management. Use list_issues or my_issues to discover issues first.
Inputs: issue_iid (required), project_id (required), jmespath, full_response.
get_merge_requestARead-only
Get details of a merge request (merge_request_iid or source_branch required). Set include_summaries=true for deployment/commit/approval summaries. To find resources, use the matching list or search tool.
Inputs: project_id (required), jmespath, source_branch, include_summaries, +1 more.
get_merge_request_approval_stateARead-only
Get merge request approval details including approvers. Inspect approval rules and approvers before merging. Use approve_merge_request to change approval state.
Inputs: project_id (required), merge_request_iid (required), jmespath.
get_merge_request_diffsBRead-only
Get the changes/diffs of a merge request (merge_request_iid or source_branch required). To find resources, use the matching list or search tool.
Inputs: project_id (required), view, jmespath, source_branch, +2 more.
get_merge_request_discussionARead-only
Get a single discussion item for a merge request. Fetch one discussion by id. Use mr_discussions for a collection and get_merge_request_note for a flat note.
Inputs: project_id (required), discussion_id (required), merge_request_iid (required), jmespath.
get_merge_request_file_diffARead-only
Get diffs for specific files from a merge request (merge_request_iid or source_branch required).
Inputs: file_paths (required), project_id (required), unidiff, jmespath, +2 more.
get_merge_request_noteARead-only
Get a specific note for a merge request. Fetch one note by id. Use get_merge_request_notes for a collection and mr_discussions for threads.
Inputs: note_id (required), project_id (required), merge_request_iid (required), jmespath.
get_merge_request_notesARead-only
List notes for a merge request. List flat notes. Use mr_discussions when thread structure and resolution state are required.
Inputs: project_id (required), merge_request_iid (required), page, sort, +3 more.
get_projectBRead-only
Get details of a specific project. To find resources, use the matching list or search tool.
Inputs: project_id (required), jmespath.
get_repository_treeARead-only
List files and directories in a repository. One level under path unless recursive is true. Use get_file_contents to read a file.
Inputs: project_id (required), ref, page, path, +5 more.
health_checkARead-only
Check auth and versions. Always includes mcp_server_version. When authenticated, also GitLab version, revision, and enterprise from GET /api/v4/version. Version lookup failures omit those fields instead of failing.
Inputs: jmespath.
helpARead-only
Return a short GitLab workflow guide. Omit topic for the overview and topic list. Topics: code-review, merge-requests, issues, pipelines, search, token-saving. Prefer discover_tools over GITLAB_TOOLSETS=all. With OAUTH_STATELESS_MODE=true persist GITLAB_TOOLSETS instead.
Inputs: topic, jmespath.
list_branchesBRead-only
List branches in project with search filter. For one known resource, use the matching get tool.
Inputs: project_id (required), page, search, summary, +2 more.
list_commitsBRead-only
List repository commits with filtering options. For one known resource, use the matching get tool.
Inputs: project_id (required), all, page, path, +11 more.
list_issue_discussionsBRead-only
List discussions for an issue. List threaded discussions for an issue. Use list_issues or get_issue for issue records.
Inputs: issue_iid (required), project_id (required), page, summary, +2 more.
list_issuesARead-only
List issues (default: created by current user; use scope='all' for all). Use this for issue management. Optional project_id. Use get_issue when the iid is known and my_issues for assignments.
Inputs: page, sort, scope, state, +21 more.
list_labelsBRead-only
List labels for a project. For one known resource, use the matching get tool.
Inputs: project_id (required), page, search, summary, +4 more.
list_merge_request_changed_filesARead-only
List changed file paths in a merge request without diff content (merge_request_iid or source_branch required).
Inputs: project_id (required), summary, jmespath, source_branch, +2 more.
list_merge_request_diffsARead-only
List merge request diffs with pagination (merge_request_iid or source_branch required). For one known resource, use the matching get tool.
Inputs: project_id (required), page, summary, unidiff, +4 more.
list_merge_requestsARead-only
List merge requests (without project_id: user's MRs; with project_id: project MRs). For one known resource, use the matching get tool.
Inputs: wip, page, sort, scope, +23 more.
list_project_membersARead-only
List members of a GitLab project. Search project members by name or username. Use list_group_members for a group.
Inputs: project_id (required), page, query, summary, +5 more.
list_projectsARead-only
List projects accessible by the current user. For one known resource, use the matching get tool.
Inputs: page, sort, owned, topic, +13 more.
mr_discussionsARead-only
List discussion items for a merge request. List complete discussion threads. Use get_merge_request_notes for flat notes.
Inputs: project_id (required), merge_request_iid (required), page, summary, +2 more.
my_issuesARead-only
List issues assigned to the authenticated user. Use this for issue management. Use list_issues for project-wide listing and get_issue for one issue. Requires classic read_user or fine-grained User:Read.
Inputs: page, state, labels, search, +8 more.
resolve_merge_request_threadA
Resolve a thread on a merge request. Mark an existing review thread resolved. Use update_merge_request_discussion_note to change note text.
Inputs: resolved (required), project_id (required), discussion_id (required), merge_request_iid (required), +1 more.
search_repositoriesARead-only
Search for GitLab projects. If the identifier is known, use a typed get or list tool.
Inputs: page, query, search, jmespath, +1 more.
update_issueA
Update an issue. Slim confirmation by default; full_response=true for the complete object. Change fields on an existing issue. Use update_issue_description_patch for a targeted description edit and create_issue_note for discussion.
Inputs: issue_iid (required), project_id (required), title, labels, +11 more.
update_issue_description_patchA
Patch an issue description (search/replace or unified diff) without resending the full body. dry_run previews; create_note summarizes.
Inputs: patch (required), issue_iid (required), patch_type (required), project_id (required), +4 more.
update_merge_requestA
Update a merge request (merge_request_iid or source_branch required). Use the create tool for new resources and a note tool for comments.
Inputs: project_id (required), draft, title, labels, +11 more.
whoamiARead-only
Get current authenticated user details. Requires classic read_user or fine-grained User:Read. Use get_user or get_users to look up another user.
Inputs: jmespath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Most tools are distinguishable, but the merge request surface has several overlapping diff tools (get_merge_request_diffs, list_merge_request_diffs, get_merge_request_file_diff, list_merge_request_changed_files) and note/discussion tools that require careful description reading. Descriptions do clarify intended use, but some boundaries remain fuzzy, especially around notes versus discussions.
The set overwhelmingly follows snake_case with verb_noun naming (get_merge_request, list_issues, create_issue, update_issue). A few exceptions like whoami, help, my_issues, and mr_discussions break the pattern, and mr_discussions is inconsistent with the merge_request prefix used elsewhere, but these are minor deviations.
With 40 tools, the surface is heavy and includes many granular merge request and issue variants that could be consolidated. The discover_tools mechanism partially mitigates this by enabling toolsets per session, but the full listed set is still well above a well-scoped size.
Several descriptions reference tools that are not present in the set, such as approve_merge_request, create_merge_request_note, create_merge_request_discussion_note, update_merge_request_discussion_note, get_user, get_users, and list_group_members. Core lifecycle operations are also missing, including merging a merge request, creating or updating files, and delete operations, leaving significant dead ends.
Maintenance
Related MCP Connectors
Unofficial GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
A MCP server built for developers enabling Git based project management with project and personal…
Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for GitLab CI/CD — pipelines, jobs, schedules, branches, tags, merge requests and repository files. Works with any GitLab (SaaS gitlab.com or self-hosted) via python-gitlab.2659 PyPI2MIT
- 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
- AlicenseAqualityBmaintenanceModel Context Protocol (MCP) server for GitLab — exposes 1006 GitLab REST & GraphQL API operations as MCP tools (42 meta-tools / 57 enterprise), 24 resources, 38 prompts, and 17 completion types for AI assistants. Written in Go, single static binary, stdio and HTTP transport.257MIT
- AlicenseCqualityBmaintenanceMCP server for interacting with GitLab API, supporting dynamic tool selection and enterprise-grade security.20810MIT