
GitLab MCP Server
The GitLab MCP Server provides comprehensive GitLab project management capabilities to AI clients through a Model Context Protocol interface, enabling operations on projects, merge requests, issues, pipelines, wiki, and releases. It offers multiple authentication methods including Personal Access Tokens, OAuth2 with browser-based flows, and remote authorization support, with compatibility across stdio, SSE, and HTTP transports for clients like Claude, VS Code, Cursor, and Copilot. The server solves the problem of giving AI assistants secure, authenticated access to GitLab resources while supporting various deployment scenarios from local desktop use to remote multi-user server deployments.
- GitHub stars
- 2.1K
- tools
- 80
- auth
- Secret needed
- transport
- STDIO
- env vars
- 21
- last updated
- Nov 12, 2026
Install
From registry metadata$ npx add-mcp @zereight/mcp-gitlab --name gitlab-mcp --env 'GITLAB_PERSONAL_ACCESS_TOKEN=${GITLAB_PERSONAL_ACCESS_TOKEN}' --env 'GITLAB_JOB_TOKEN=${GITLAB_JOB_TOKEN}'Run in your terminal. add-mcp asks which agents to add it to, then asks for each value it needs. Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add gitlab-mcp --env GITLAB_PERSONAL_ACCESS_TOKEN=YOUR_GITLAB_PERSONAL_ACCESS_TOKEN --env GITLAB_PERSONAL_ACCESS_TOKEN_FILE=YOUR_GITLAB_PERSONAL_ACCESS_TOKEN_FILE --env GITLAB_JOB_TOKEN=YOUR_GITLAB_JOB_TOKEN --env GITLAB_AUTH_COOKIE_PATH=YOUR_GITLAB_AUTH_COOKIE_PATH --env GITLAB_USE_OAUTH=YOUR_GITLAB_USE_OAUTH --env GITLAB_OAUTH_CLIENT_ID=YOUR_GITLAB_OAUTH_CLIENT_ID --env GITLAB_OAUTH_TOKEN_SCRIPT=YOUR_GITLAB_OAUTH_TOKEN_SCRIPT --env GITLAB_API_URL=https://gitlab.com/api/v4 --env GITLAB_ALLOWED_PROJECT_IDS=YOUR_GITLAB_ALLOWED_PROJECT_IDS --env GITLAB_PERMISSION_MODE=YOUR_GITLAB_PERMISSION_MODE --env GITLAB_TOOLSETS=YOUR_GITLAB_TOOLSETS --env GITLAB_TOOLS=YOUR_GITLAB_TOOLS --env GITLAB_DENIED_TOOLS_REGEX=YOUR_GITLAB_DENIED_TOOLS_REGEX --env GITLAB_TOOL_POLICY_APPROVE=YOUR_GITLAB_TOOL_POLICY_APPROVE --env GITLAB_TOOL_POLICY_HIDDEN=YOUR_GITLAB_TOOL_POLICY_HIDDEN --env NODE_TLS_REJECT_UNAUTHORIZED=YOUR_NODE_TLS_REJECT_UNAUTHORIZED --env GITLAB_CA_CERT_PATH=YOUR_GITLAB_CA_CERT_PATH --env GITLAB_MASKING_ENABLED=false --env GITLAB_MASKING_CONFIG=YOUR_GITLAB_MASKING_CONFIG --env GITLAB_MASKING_POLICY_FILE=YOUR_GITLAB_MASKING_POLICY_FILE --env GITLAB_MASKING_WORKSPACE_DIR=YOUR_GITLAB_MASKING_WORKSPACE_DIR -- npx -y @zereight/mcp-gitlabRun in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.
Tools
Verified live · 80 toolsVerified live against the running server on Jun 10, 2026.
merge_merge_requestMerge a merge request8 params
Merge a merge request
auto_mergebooleanmerge_commit_messagestringmerge_request_iidstringmerge_when_pipeline_succeedsbooleanproject_id*stringshould_remove_source_branchbooleansquashbooleansquash_commit_messagestringapprove_merge_requestApprove a merge request4 params
Approve a merge request
approval_passwordstringmerge_request_iid*stringproject_id*stringshastringunapprove_merge_requestUnapprove a merge request2 params
Unapprove a merge request
merge_request_iid*stringproject_id*stringget_merge_request_approval_stateGet merge request approval details including approvers2 params
Get merge request approval details including approvers
merge_request_iid*stringproject_id*stringget_merge_request_conflictsGet the conflicts of a merge request2 params
Get the conflicts of a merge request
merge_request_iid*stringproject_id*stringlist_merge_request_pipelinesList pipelines for a merge request with pagination4 params
List pipelines for a merge request with pagination
merge_request_iid*stringpagenumberper_pagenumberproject_id*stringcreate_or_update_fileCreate or update a file in a GitLab project8 params
Create or update a file in a GitLab project
branch*stringcommit_idstringcommit_message*stringcontent*stringfile_path*stringlast_commit_idstringprevious_pathstringproject_id*stringsearch_repositoriesSearch for GitLab projects4 params
Search for GitLab projects
pagenumberper_pagenumberquerystringsearchstringcreate_repositoryCreate a new GitLab project4 params
Create a new GitLab project
descriptionstringinitialize_with_readmebooleanname*stringvisibilitystringprivate · internal · publiccreate_groupCreate new group or subgroup5 params
Create new group or subgroup
descriptionstringname*stringparent_idnumberpath*stringvisibilitystringprivate · internal · publicget_file_contentsGet contents of a file or directory from a GitLab project4 params
Get contents of a file or directory from a GitLab project
file_pathstringpathstringproject_idstringrefstringpush_filesPush multiple files in a single commit4 params
Push multiple files in a single commit
branch*stringcommit_message*stringfiles*arrayproject_id*stringcreate_issueCreate a new issue8 params
Create a new issue
assignee_idsarraydescriptionstringissue_typestringissue · incident · test_case · taskdefault: issuelabelsarraymilestone_idstringproject_id*stringtitle*stringweightnumbercreate_merge_requestCreate a new merge request13 params
Create a new merge request
allow_collaborationbooleanassignee_idsarraydescriptionstringdraftbooleanlabelsarrayproject_id*stringremove_source_branchbooleanreviewer_idsarraysource_branch*stringsquashbooleantarget_branch*stringtarget_project_idstringtitle*stringfork_repositoryFork a project to your account or specified namespace2 params
Fork a project to your account or specified namespace
namespacestringproject_id*stringcreate_branchCreate a new branch3 params
Create a new branch
branch*stringproject_id*stringrefstringget_branchGet branch details (commit, protection status)2 params
Get branch details (commit, protection status)
branch_name*stringproject_id*stringlist_branchesList branches in project with search filter4 params
List branches in project with search filter
pagenumberper_pagenumberproject_id*stringsearchstringdelete_branchDelete branch from project2 params
Delete branch from project
branch_name*stringproject_id*stringget_merge_requestGet details of a merge request (mergeRequestIid or branchName required)3 params
Get details of a merge request (mergeRequestIid or branchName required)
merge_request_iidstringproject_id*stringsource_branchstringget_merge_request_diffsGet the changes/diffs of a merge request (mergeRequestIid or branchName required)5 params
Get the changes/diffs of a merge request (mergeRequestIid or branchName required)
excluded_file_patternsarraymerge_request_iidstringproject_id*stringsource_branchstringviewstringinline · parallellist_merge_request_changed_filesList changed file paths in a merge request without diff content (mergeRequestIid or branchName required)4 params
List changed file paths in a merge request without diff content (mergeRequestIid or branchName required)
excluded_file_patternsarraymerge_request_iidstringproject_id*stringsource_branchstringlist_merge_request_diffsList merge request diffs with pagination (mergeRequestIid or branchName required)6 params
List merge request diffs with pagination (mergeRequestIid or branchName required)
merge_request_iidstringpagenumberper_pagenumberproject_id*stringsource_branchstringunidiffbooleanget_merge_request_file_diffGet diffs for specific files from a merge request (mergeRequestIid or branchName required)5 params
Get diffs for specific files from a merge request (mergeRequestIid or branchName required)
file_paths*arraymerge_request_iidstringproject_id*stringsource_branchstringunidiffbooleanlist_merge_request_versionsList all versions of a merge request2 params
List all versions of a merge request
merge_request_iid*stringproject_id*stringget_merge_request_versionGet a specific version of a merge request4 params
Get a specific version of a merge request
merge_request_iid*stringproject_id*stringunidiffbooleanversion_id*stringget_branch_diffsGet diffs between two branches or commits5 params
Get diffs between two branches or commits
excluded_file_patternsarrayfrom*stringproject_id*stringstraightbooleanto*stringupdate_merge_requestUpdate a merge request (mergeRequestIid or branchName required)13 params
Update a merge request (mergeRequestIid or branchName required)
assignee_idsarraydescriptionstringdraftbooleanlabelsarraymerge_request_iidstringproject_id*stringremove_source_branchbooleanreviewer_idsarraysource_branchstringsquashbooleanstate_eventstringclose · reopentarget_branchstringtitlestringcreate_noteCreate a new note (comment) to an issue or merge request4 params
Create a new note (comment) to an issue or merge request
body*stringnoteable_iid*stringnoteable_type*stringissue · merge_requestproject_id*stringcreate_merge_request_threadCreate a new thread on a merge request5 params
Create a new thread on a merge request
body*stringcreated_atstringmerge_request_iid*stringpositionobjectproject_id*stringresolve_merge_request_threadResolve a thread on a merge request4 params
Resolve a thread on a merge request
discussion_id*stringmerge_request_iid*stringproject_id*stringresolved*booleanmr_discussionsList discussion items for a merge request4 params
List discussion items for a merge request
merge_request_iid*stringpagenumberper_pagenumberproject_id*stringdelete_merge_request_discussion_noteDelete a discussion note on a merge request4 params
Delete a discussion note on a merge request
discussion_id*stringmerge_request_iid*stringnote_id*stringproject_id*stringupdate_merge_request_discussion_noteUpdate a discussion note on a merge request6 params
Update a discussion note on a merge request
bodystringdiscussion_idstringmerge_request_iidstringnote_idstringproject_idstringresolvedbooleancreate_merge_request_discussion_noteAdd a new discussion note to an existing merge request thread5 params
Add a new discussion note to an existing merge request thread
body*stringcreated_atstringdiscussion_id*stringmerge_request_iid*stringproject_id*stringcreate_merge_request_noteAdd a new note to a merge request3 params
Add a new note to a merge request
body*stringmerge_request_iid*stringproject_id*stringdelete_merge_request_noteDelete an existing merge request note3 params
Delete an existing merge request note
merge_request_iid*stringnote_id*stringproject_id*stringget_merge_request_noteGet a specific note for a merge request3 params
Get a specific note for a merge request
merge_request_iid*stringnote_id*stringproject_id*stringget_merge_request_notesList notes for a merge request6 params
List notes for a merge request
merge_request_iid*stringorder_bystringcreated_at · updated_atpagenumberper_pagenumberproject_id*stringsortstringasc · descupdate_merge_request_noteModify an existing merge request note4 params
Modify an existing merge request note
body*stringmerge_request_iid*stringnote_id*stringproject_id*stringget_draft_noteGet a single draft note from a merge request3 params
Get a single draft note from a merge request
draft_note_id*stringmerge_request_iid*stringproject_id*stringlist_draft_notesList draft notes for a merge request2 params
List draft notes for a merge request
merge_request_iid*stringproject_id*stringcreate_draft_noteCreate a draft note for a merge request6 params
Create a draft note for a merge request
body*stringin_reply_to_discussion_idstringmerge_request_iid*stringpositionobjectproject_id*stringresolve_discussionbooleanupdate_draft_noteUpdate an existing draft note6 params
Update an existing draft note
bodystringdraft_note_id*stringmerge_request_iid*stringpositionobjectproject_id*stringresolve_discussionbooleandelete_draft_noteDelete a draft note3 params
Delete a draft note
draft_note_id*stringmerge_request_iid*stringproject_id*stringpublish_draft_notePublish a single draft note3 params
Publish a single draft note
draft_note_id*stringmerge_request_iid*stringproject_id*stringbulk_publish_draft_notesPublish all draft notes for a merge request2 params
Publish all draft notes for a merge request
merge_request_iid*stringproject_id*stringlist_merge_request_emoji_reactionsList all emoji reactions on a merge request2 params
List all emoji reactions on a merge request
merge_request_iid*stringproject_id*stringlist_merge_request_note_emoji_reactionsList all emoji reactions on a merge request note. Pass discussion_id for discussion thread replies.4 params
List all emoji reactions on a merge request note. Pass discussion_id for discussion thread replies.
discussion_idstringmerge_request_iid*stringnote_id*stringproject_id*stringcreate_merge_request_emoji_reactionAdd an emoji reaction to a merge request (e.g. thumbsup, rocket, eyes)3 params
Add an emoji reaction to a merge request (e.g. thumbsup, rocket, eyes)
merge_request_iid*stringname*stringproject_id*stringdelete_merge_request_emoji_reactionRemove an emoji reaction from a merge request3 params
Remove an emoji reaction from a merge request
award_id*stringmerge_request_iid*stringproject_id*stringcreate_merge_request_note_emoji_reactionAdd an emoji reaction to a merge request note. Pass discussion_id for discussion thread replies.5 params
Add an emoji reaction to a merge request note. Pass discussion_id for discussion thread replies.
discussion_idstringmerge_request_iid*stringname*stringnote_id*stringproject_id*stringdelete_merge_request_note_emoji_reactionRemove an emoji reaction from a merge request note. Pass discussion_id for discussion thread replies.5 params
Remove an emoji reaction from a merge request note. Pass discussion_id for discussion thread replies.
award_id*stringdiscussion_idstringmerge_request_iid*stringnote_id*stringproject_id*stringupdate_issue_noteModify an existing issue thread note6 params
Modify an existing issue thread note
bodystringdiscussion_idstringissue_iidstringnote_idstringproject_idstringresolvedbooleancreate_issue_noteAdd a note to an issue, optionally replying to a discussion thread5 params
Add a note to an issue, optionally replying to a discussion thread
body*stringcreated_atstringdiscussion_idstringissue_iid*stringproject_id*stringlist_issue_emoji_reactionsList all emoji reactions on an issue2 params
List all emoji reactions on an issue
issue_iid*stringproject_id*stringlist_issue_note_emoji_reactionsList all emoji reactions on an issue note. Pass discussion_id for discussion thread replies.4 params
List all emoji reactions on an issue note. Pass discussion_id for discussion thread replies.
discussion_idstringissue_iid*stringnote_id*stringproject_id*stringcreate_issue_emoji_reactionAdd an emoji reaction to an issue (e.g. thumbsup, rocket, eyes)3 params
Add an emoji reaction to an issue (e.g. thumbsup, rocket, eyes)
issue_iid*stringname*stringproject_id*stringdelete_issue_emoji_reactionRemove an emoji reaction from an issue3 params
Remove an emoji reaction from an issue
award_id*stringissue_iid*stringproject_id*stringcreate_issue_note_emoji_reactionAdd an emoji reaction to an issue note. Pass discussion_id for discussion thread replies.5 params
Add an emoji reaction to an issue note. Pass discussion_id for discussion thread replies.
discussion_idstringissue_iid*stringname*stringnote_id*stringproject_id*stringdelete_issue_note_emoji_reactionRemove an emoji reaction from an issue note. Pass discussion_id for discussion thread replies.5 params
Remove an emoji reaction from an issue note. Pass discussion_id for discussion thread replies.
award_id*stringdiscussion_idstringissue_iid*stringnote_id*stringproject_id*stringlist_issuesList issues (default: created by current user; use scope='all' for all)21 params
List issues (default: created by current user; use scope='all' for all)
assignee_idstringassignee_usernamearrayauthor_idstringauthor_usernamestringconfidentialbooleancreated_afterstringcreated_beforestringdue_datestringissue_typestringissue · incident · test_case · taskiteration_idstringlabelsarraymilestonestringpagenumberper_pagenumberproject_idstringscopestringcreated_by_me · assigned_to_me · allsearchstringstatestringopened · closed · allupdated_afterstringupdated_beforestring+1 more parameters. See the server's own documentation for the full schema.
my_issuesList issues assigned to the authenticated user11 params
List issues assigned to the authenticated user
created_afterstringcreated_beforestringlabelsarraymilestonestringpagenumberper_pagenumberproject_idstringsearchstringstatestringopened · closed · allupdated_afterstringupdated_beforestringget_issueGet details of a specific issue2 params
Get details of a specific issue
issue_iid*stringproject_id*stringupdate_issueUpdate an issue13 params
Update an issue
assignee_idsarrayconfidentialbooleandescriptionstringdiscussion_lockedbooleandue_datestringissue_iid*stringissue_typestringissue · incident · test_case · tasklabelsarraymilestone_idstringproject_id*stringstate_eventstringclose · reopentitlestringweightnumberupdate_issue_description_patchApply a patch (search/replace or unified diff) to an issue description. Reduces token usage by allowing small changes without sending the full description. Supports dry_run to preview changes and create_note to summarize updates.7 params
Apply a patch (search/replace or unified diff) to an issue description. Reduces token usage by allowing small changes without sending the full description. Supports dry_run to preview changes and create_note to summarize updates.
allow_multiplebooleancreate_notebooleandry_runbooleanissue_iid*stringpatch*stringpatch_type*stringsearch_replace · unified_diffproject_id*stringdelete_issueDelete an issue2 params
Delete an issue
issue_iid*stringproject_id*stringlist_todosList GitLab to-do items for the current user8 params
List GitLab to-do items for the current user
actionstringassigned · mentioned · build_failed · marked · approval_required · unmergeableauthor_idnumbergroup_idnumberpagenumberper_pagenumberproject_idnumberstatestringpending · donetypestringIssue · MergeRequest · Commit · Epic · DesignManagement::Design · AlertManagement::Alertmark_todo_doneMark a GitLab to-do item as done1 params
Mark a GitLab to-do item as done
id*numbermark_all_todos_doneMark all pending GitLab to-do items as done for the current user
Mark all pending GitLab to-do items as done for the current user
No parameters. Call it with no arguments.
list_issue_linksList all issue links for a specific issue2 params
List all issue links for a specific issue
issue_iid*stringproject_id*stringlist_issue_discussionsList discussions for an issue4 params
List discussions for an issue
issue_iid*stringpagenumberper_pagenumberproject_id*stringget_issue_linkGet a specific issue link3 params
Get a specific issue link
issue_iid*stringissue_link_id*stringproject_id*stringcreate_issue_linkCreate an issue link between two issues5 params
Create an issue link between two issues
issue_iid*stringlink_typestringrelates_to · blocks · is_blocked_byproject_id*stringtarget_issue_iid*stringtarget_project_id*stringdelete_issue_linkDelete an issue link3 params
Delete an issue link
issue_iid*stringissue_link_id*stringproject_id*stringlist_namespacesList all namespaces (users and groups) available to the current user. Filter by kind='group' for groups only.4 params
List all namespaces (users and groups) available to the current user. Filter by kind='group' for groups only.
ownedbooleanpagenumberper_pagenumbersearchstringget_namespaceGet details of a namespace (user or group) by ID or path. Groups are namespaces with kind='group'.1 params
Get details of a namespace (user or group) by ID or path. Groups are namespaces with kind='group'.
namespace_id*stringverify_namespaceVerify if a namespace path exists1 params
Verify if a namespace path exists
path*stringget_projectGet details of a specific project1 params
Get details of a specific project
project_id*stringlist_projectsList projects accessible by the current user15 params
List projects accessible by the current user
archivedbooleanmembershipbooleanmin_access_levelnumberorder_bystringid · name · path · created_at · updated_at · last_activity_atownedbooleanpagenumberper_pagenumbersearchstringsearch_namespacesbooleansimplebooleansortstringasc · desctopicstringvisibilitystringpublic · internal · privatewith_issues_enabledbooleanwith_merge_requests_enabledbooleanSponsors
Configuration
GITLAB_PERSONAL_ACCESS_TOKENsecretGitLab personal access token for local stdio use. A non-empty value overrides GITLAB_PERSONAL_ACCESS_TOKEN_FILE. One of this token, GITLAB_PERSONAL_ACCESS_TOKEN_FILE, GITLAB_JOB_TOKEN, GITLAB_AUTH_COOKIE_PATH, or GITLAB_USE_OAUTH=true must be set. Create a token with the GitLab s
GITLAB_PERSONAL_ACCESS_TOKEN_FILEPath to a file that contains the personal access token. Read once at startup and trimmed. Ignored when GITLAB_PERSONAL_ACCESS_TOKEN or --token is non-empty. A missing, unreadable, or empty file stops startup. Does not replace job token, OAuth, cookie, or remote authorization.
GITLAB_JOB_TOKENsecretOptional GitLab CI job token to use instead of a personal access token when running inside GitLab CI.
GITLAB_AUTH_COOKIE_PATHOptional path to a GitLab authentication cookie file for cookie-based authentication.
GITLAB_USE_OAUTHSet to true to start with GitLab OAuth instead of a personal access token, job token, or cookie file.
GITLAB_OAUTH_CLIENT_IDGitLab OAuth application ID. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_TOKEN_SCRIPT.
GITLAB_OAUTH_TOKEN_SCRIPTCommand that prints an OAuth access token. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_CLIENT_ID.
GITLAB_API_URLdefault: https://gitlab.com/api/v4GitLab API base URL. Use https://gitlab.com/api/v4 for GitLab.com or your self-managed GitLab API URL.
GITLAB_ALLOWED_PROJECT_IDSOptional comma-separated list of GitLab project IDs that this server is allowed to access.
GITLAB_PERMISSION_MODETool exposure. Allowed values are readonly, modify, and full. Unset uses full. readonly keeps read-only tools. modify blocks delete and teardown tools.
GITLAB_TOOLSETSOptional comma-separated toolset ids (projects, issues, merge_requests, …). Unset keeps the lean core default plus discover_tools. Do not set all unless you accept loading ~all schemas (~73k tokens).
GITLAB_TOOLSOptional comma-separated list of individual tool names to add on top of enabled toolsets.
GITLAB_DENIED_TOOLS_REGEXOptional regular expression used to hide matching tools from the server.
GITLAB_TOOL_POLICY_APPROVEOptional comma-separated list of tool names that require explicit approval before execution.
GITLAB_TOOL_POLICY_HIDDENOptional comma-separated list of tool names to hide from tools/list.
NODE_TLS_REJECT_UNAUTHORIZEDSet to 0 only when you intentionally need to connect to a GitLab instance with invalid or self-signed TLS certificates.
GITLAB_CA_CERT_PATHOptional path to a custom CA certificate file for self-managed GitLab instances.
GITLAB_MASKING_ENABLEDdefault: falseSet to true to mask text tool results and returned errors using built-in or configured rules.
GITLAB_MASKING_CONFIGOptional path to a response-masking JSON configuration file.
GITLAB_MASKING_POLICY_FILEOptional protected server-owned JSON file containing managed masking policies.
GITLAB_MASKING_WORKSPACE_DIRDirectory used to resolve response-masking configuration paths.
Readme
Details
- Repository
- github.com/zereight/gitlab-mcp
- Website
- zereight.github.io/gitlab-mcp
- Categories
- Developer Tools, Documents & Knowledge
- Package
@zereight/mcp-gitlab- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active
- Tools verified
- Jun 10, 2026