Install
$ agentstack add mcp-therealchristhomas-gitlab-mcp-server ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
GitLab MCP Server
MCP Server for the GitLab API, enabling project management, file operations, and more. Forked from https://github.com/modelcontextprotocol
Table of Contents
- [Installation](#installation)
- [NPX (Recommended)](#npx-recommended)
- [Global Installation](#global-installation)
- [Features](#features)
- [Group Milestones vs Project Milestones](#group-milestones-vs-project-milestones)
- [Project Milestones](#project-milestones)
- [Group Milestones](#group-milestones)
- [Group Milestone Examples](#group-milestone-examples)
- [List Group Milestones](#list-group-milestones)
- [Create Group Milestone](#create-group-milestone)
- [Advanced Group Milestone Search](#advanced-group-milestone-search)
- [Practical Workflow: Finding Groups and Creating Milestones](#practical-workflow-finding-groups-and-creating-milestones)
- [1. Search for Groups](#1-search-for-groups)
- [2. List Existing Group Milestones](#2-list-existing-group-milestones)
- [3. Create a Group Milestone](#3-create-a-group-milestone)
- [Tools](#tools)
- [File Operations](#file-operations)
- [Repository Management](#repository-management)
- [Issue Management](#issue-management)
- [Merge Request Management](#merge-request-management)
- [Label Management](#label-management)
- [Milestone Management](#milestone-management)
- [Group Operations](#group-operations)
- [Setup](#setup)
- [Personal Access Token](#personal-access-token)
- [Usage with Claude Desktop](#usage-with-claude-desktop)
- [Usage with Cursor/VSCode/Winsurf](#usage-with-cursorvscodewinsurf)
- [Environment Variables](#environment-variables)
- [Development](#development)
- [Build](#build)
- [Development Mode](#development-mode)
- [Watch Mode](#watch-mode)
- [License](#license)
Installation
NPX (Recommended)
npx @therealchristhomas/gitlab-mcp-server
Global Installation
npm install -g @therealchristhomas/gitlab-mcp-server
gitlab-mcp
Features
- Automatic Branch Creation: When creating/updating files or pushing changes, branches are automatically created if they don't exist
- Comprehensive Error Handling: Clear error messages for common issues
- Git History Preservation: Operations maintain proper Git history without force pushing
- Batch Operations: Support for both single-file and multi-file operations
- Project Workflow Management: Label and milestone management for better project organization
- Repository Management: Search, create, and fork GitLab projects
- File Operations: Create, update, and retrieve file contents
- Branch Management: Create branches and manage repository structure
- Issue Management: Create, list, update, search, and comment on issues
- Merge Request Management: List, update, merge, and comment on merge requests
- Label Management: Create, update, and delete project labels
- Project Milestones: Create, update, and delete project-level milestones
- Group Milestones: Create, update, and delete group-level milestones that span multiple projects
Group Milestones vs Project Milestones
This server supports both project milestones and group milestones:
Project Milestones
- Scoped to a single project
- Use tools:
list_milestones,create_milestone,update_milestone,delete_milestone - Example: Track features for
my-webappproject
Group Milestones
- Span multiple projects within a group
- Use tools:
list_group_milestones,create_group_milestone,update_group_milestone,delete_group_milestone - Support advanced filtering with
include_ancestors,include_descendants - Example: Track a release across
my-webapp,my-api, andmy-admin
Group Milestone Examples
List Group Milestones
{
"group_id": "my-organization",
"state": "active",
"include_descendants": true
}
Create Group Milestone
{
"group_id": "my-organization",
"title": "Q1 2025 Release",
"description": "Major feature release including new tools and performance improvements",
"due_date": "2025-03-31",
"start_date": "2025-01-01"
}
Advanced Group Milestone Search
{
"group_id": "my-organization/core",
"search": "release",
"include_ancestors": true,
"updated_after": "2024-01-01T00:00:00Z"
}
Based on the GitLab Group Milestones API, group milestones are ideal for coordinating releases and features across multiple projects in your organization.
Practical Workflow: Finding Groups and Creating Milestones
Here's a typical workflow for working with group milestones:
1. Search for Groups
First, find the group you want to work with:
{
"search": "my-organization",
"owned": true
}
2. List Existing Group Milestones
Check what milestones already exist:
{
"group_id": "my-organization",
"state": "active"
}
3. Create a Group Milestone
Create a milestone that spans multiple projects:
{
"group_id": "my-organization",
"title": "Q1 2025 Release",
"description": "Cross-project release including webapp, API, and admin features",
"due_date": "2025-03-31"
}
This workflow is especially useful for large organizations with multiple related projects under the same group.
Tools
File Operations
create_or_update_file
- Create or update a single file in a project
- Inputs:
project_id(string): Project ID or URL-encoded pathfile_path(string): Path where to create/update the filecontent(string): Content of the filecommit_message(string): Commit messagebranch(string): Branch to create/update the file inprevious_path(optional string): Path of the file to move/rename- Returns: File content and commit details
push_files
- Push multiple files in a single commit
- Inputs:
project_id(string): Project ID or URL-encoded pathbranch(string): Branch to push tofiles(array): Files to push, each withfile_pathandcontentcommit_message(string): Commit message- Returns: Updated branch reference
get_file_contents
- Get contents of a file or directory
- Inputs:
project_id(string): Project ID or URL-encoded pathfile_path(string): Path to file/directoryref(optional string): Branch/tag/commit to get contents from- Returns: File/directory contents
Repository Management
search_repositories
- Search for GitLab projects
- Inputs:
search(string): Search querypage(optional number): Page number for paginationper_page(optional number): Results per page (default 20)- Returns: Project search results
create_repository
- Create a new GitLab project
- Inputs:
name(string): Project namedescription(optional string): Project descriptionvisibility(optional string): 'private', 'internal', or 'public'initialize_with_readme(optional boolean): Initialize with README- Returns: Created project details
fork_repository
- Fork a project
- Inputs:
project_id(string): Project ID or URL-encoded pathnamespace(optional string): Namespace to fork to- Returns: Forked project details
create_branch
- Create a new branch
- Inputs:
project_id(string): Project ID or URL-encoded pathbranch(string): Name for new branchref(optional string): Source branch/commit for new branch- Returns: Created branch reference
Group Operations
search_groups
- Search for GitLab groups
- Inputs:
search(string): Search query for groupspage(optional number): Page number for paginationper_page(optional number): Results per page (default 20)owned(optional boolean): Limit by groups owned by the current usermin_access_level(optional number): Minimum access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)- Returns: Group search results
Issue Management
create_issue
- Create a new issue
- Inputs:
project_id(string): Project ID or URL-encoded pathtitle(string): Issue titledescription(optional string): Issue descriptionassignee_ids(optional number[]): User IDs to assignlabels(optional string[]): Labels to addmilestone_id(optional number): Milestone ID- Returns: Created issue details
list_issues
- List all issues in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathstate(optional string): 'opened', 'closed', or 'all'labels(optional string): Comma-separated list of label namesmilestone(optional string): Milestone titleassignee_id(optional number): User ID of assigneeauthor_id(optional number): User ID of authorsearch(optional string): Search against title and descriptioncreated_after(optional string): Return issues created after date (ISO 8601)created_before(optional string): Return issues created before date (ISO 8601)updated_after(optional string): Return issues updated after date (ISO 8601)updated_before(optional string): Return issues updated before date (ISO 8601)sort(optional string): Sort issues by various criteriaorder_by(optional string): 'asc' or 'desc'page(optional number): Page number for paginationper_page(optional number): Results per page (default 20)with_labels_details(optional boolean): If true, returns more details for each label. Default is false.- Returns: Array of issue objects
update_issue
- Update an existing issue in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathissue_iid(number): Issue internal IDtitle(optional string): New issue titledescription(optional string): New issue descriptionstate_event(optional string): 'close' or 'reopen'labels(optional string[]): Array of label namesassignee_ids(optional number[]): Array of user IDs to assignmilestone_id(optional number): Milestone ID to assign- Returns: Updated issue details
search_issues
- Search for issues in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathsearch(string): Search term for title and descriptionstate(optional string): 'opened', 'closed', or 'all'labels(optional string): Comma-separated list of label namespage(optional number): Page number for paginationper_page(optional number): Results per page (default 20)- Returns: Array of matching issue objects
add_issue_comment
- Add a comment to an issue in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathissue_iid(number): Issue internal IDbody(string): Content of the comment- Returns: Created comment details
Merge Request Management
create_merge_request
- Create a new merge request
- Inputs:
project_id(string): Project ID or URL-encoded pathtitle(string): MR titledescription(optional string): MR descriptionsource_branch(string): Branch containing changestarget_branch(string): Branch to merge intodraft(optional boolean): Create as draft MRallow_collaboration(optional boolean): Allow commits from upstream members- Returns: Created merge request details
list_merge_requests
- List all merge requests in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathstate(optional string): 'opened', 'closed', 'locked', 'merged', or 'all'target_branch(optional string): Filter by target branchsource_branch(optional string): Filter by source branchlabels(optional string): Comma-separated list of label namesmilestone(optional string): Milestone titleassignee_id(optional number): User ID of assigneeauthor_id(optional number): User ID of authorsearch(optional string): Search against title and descriptioncreated_after(optional string): Return MRs created after date (ISO 8601)created_before(optional string): Return MRs created before date (ISO 8601)updated_after(optional string): Return MRs updated after date (ISO 8601)updated_before(optional string): Return MRs updated before date (ISO 8601)sort(optional string): Sort merge requestsorder_by(optional string): 'asc' or 'desc'page(optional number): Page number for paginationper_page(optional number): Results per page (default 20)- Returns: Array of merge request objects
update_merge_request
- Update an existing merge request in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathmerge_request_iid(number): Merge request internal IDtitle(optional string): New merge request titledescription(optional string): New merge request descriptionstate_event(optional string): 'close' or 'reopen'target_branch(optional string): New target branchlabels(optional string[]): Array of label namesassignee_ids(optional number[]): Array of user IDs to assignmilestone_id(optional number): Milestone ID to assignremove_source_branch(optional boolean): Remove source branch when merged- Returns: Updated merge request details
merge_merge_request
- Merge a merge request in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathmerge_request_iid(number): Merge request internal IDmerge_commit_message(optional string): Custom merge commit messageshould_remove_source_branch(optional boolean): Remove source branch after mergemerge_when_pipeline_succeeds(optional boolean): Merge when pipeline succeedssha(optional string): SHA that must match the source branch HEAD- Returns: Merged merge request details
add_merge_request_comment
- Add a comment to a merge request in a GitLab project
- Inputs:
project_id(string): Project ID or URL-encoded pathmerge_request_iid(number): Merge request internal IDbody(string): Content of the comment- Returns: Created comment details
Label Management
list_labels
- List all labels in a project
- Inputs:
project_id(string): Project ID or URL-encoded pathpage(optional number): Page number for paginationper_page(optional number): Results per page (default 20)- Returns: Array of label objects
create_label
- Create a new label
- Inputs:
project_id(string): Project ID or URL-encoded pathname(string): Label namecolor(string): Label color (hex code)description(optional string): Label descriptionpriority(optional number): Label priority- Returns: Created label details
update_label
- Update an existing label
- Inputs:
project_id(string): Project ID or URL-encoded pathname(string): Current label namenew_name(optional string): New label namecolor(optional string): New label colordescription(optional string): New label descriptionpriority(optional number): New label priority- Returns: Updated label details
delete_label
- Delete a label
- Inputs:
- `pr
…
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: TheRealChrisThomas
- Source: TheRealChrisThomas/gitlab-mcp-server
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.