gitlab mcp
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Allows interaction with GitLab repositories including creating/updating files, pushing multiple files, searching repositories, creating repositories, getting file contents, creating issues, creating merge requests, forking repositories, creating branches, getting merge request details and diffs, updating merge requests, and creating notes/comments.
Better GitLab MCP Server
@zereight/mcp-gitlab
GitLab MCP(Model Context Protocol) Server. Includes bug fixes and improvements over the original GitLab MCP server.
Usage
Using with Claude App, Cline, Roo Code
When using with the Claude App, you need to set up your API key and URLs directly.
Using with Cursor
When using with Cursor, you can set up environment variables and run the server as follows:
GITLAB_PERSONAL_ACCESS_TOKEN
: Your GitLab personal access token.GITLAB_API_URL
: Your GitLab API URL. (Default:https://gitlab.com/api/v4
)
Tools š ļø
create_or_update_file
- Create or update a single file in a GitLab project. š
- Inputs:
project_id
(string): Project ID or namespace/project_pathfile_path
(string): Path to create/update the filecontent
(string): File contentcommit_message
(string): Commit messagebranch
(string): Branch to create/update the file inprevious_path
(optional string): Previous file path when renaming a file
- Returns: File content and commit details
push_files
- Push multiple files in a single commit. š¤
- Inputs:
project_id
(string): Project ID or namespace/project_pathbranch
(string): Branch to push tofiles
(array): Array of files to push, each withfile_path
andcontent
propertiescommit_message
(string): Commit message
- Returns: Updated branch reference
search_repositories
- Search for GitLab projects. š
- Inputs:
search
(string): Search querypage
(optional number): Page number (default: 1)per_page
(optional number): Results per page (default: 20, max: 100)
- Returns: Project search results
create_repository
- Create a new GitLab project. ā
- Inputs:
name
(string): Project namedescription
(optional string): Project descriptionvisibility
(optional string): Project visibility level (public, private, internal)initialize_with_readme
(optional boolean): Initialize with README
- Returns: Details of the created project
get_file_contents
- Get the contents of a file or directory. š
- Inputs:
project_id
(string): Project ID or namespace/project_pathfile_path
(string): Path to the file/directoryref
(optional string): Branch, tag, or commit SHA (default: default branch)
- Returns: File/directory content
create_issue
- Create a new issue. š
- Inputs:
project_id
(string): Project ID or namespace/project_pathtitle
(string): Issue titledescription
(string): Issue descriptionassignee_ids
(optional number[]): Array of assignee IDsmilestone_id
(optional number): Milestone IDlabels
(optional string[]): Array of labels
- Returns: Details of the created issue
create_merge_request
- Create a new merge request. š
- Inputs:
project_id
(string): Project ID or namespace/project_pathtitle
(string): Merge request titledescription
(string): Merge request descriptionsource_branch
(string): Branch with changestarget_branch
(string): Branch to merge intoallow_collaboration
(optional boolean): Allow collaborators to push commits to the source branchdraft
(optional boolean): Create as a draft merge request
- Returns: Details of the created merge request
fork_repository
- Fork a project. š“
- Inputs:
project_id
(string): Project ID or namespace/project_path to forknamespace
(optional string): Namespace to fork into (default: user namespace)
- Returns: Details of the forked project
create_branch
- Create a new branch. šæ
- Inputs:
project_id
(string): Project ID or namespace/project_pathname
(string): New branch nameref
(optional string): Ref to create the branch from (branch, tag, commit SHA, default: default branch)
- Returns: Created branch reference
get_merge_request
- Get details of a merge request. ā¹ļø
- Inputs:
project_id
(string): Project ID or namespace/project_pathmerge_request_iid
(number): Merge request IID
- Returns: Merge request details
get_merge_request_diffs
- Get changes (diffs) of a merge request. diff
- Inputs:
project_id
(string): Project ID or namespace/project_pathmerge_request_iid
(number): Merge request IIDview
(optional string): Diff view type ('inline' or 'parallel')
- Returns: Array of merge request diff information
update_merge_request
- Update a merge request. š
- Inputs:
project_id
(string): Project ID or namespace/project_pathmerge_request_iid
(number): Merge request IIDtitle
(optional string): New titledescription
(string): New descriptiontarget_branch
(optional string): New target branchstate_event
(optional string): Merge request state change event ('close', 'reopen')remove_source_branch
(optional boolean): Remove source branch after mergeallow_collaboration
(optional boolean): Allow collaborators to push commits to the source branch
- Returns: Updated merge request details
create_note
- Create a new note (comment) to an issue or merge request. š¬
- Inputs:
project_id
(string): Project ID or namespace/project_pathnoteable_type
(string): Type of noteable ("issue" or "merge_request")noteable_iid
(number): IID of the issue or merge requestbody
(string): Note content
- Returns: Details of the created note
| list_projects
| List accessible projects with rich filtering options š | ā¢ Search/filtering: search
, owned
, membership
, archived
, visibility
ā¢ Features filtering: with_issues_enabled
, with_merge_requests_enabled
ā¢ Sorting: order_by
, sort
ā¢ Access control: min_access_level
ā¢ Pagination: page
, per_page
, simple
| Array of projects |
| list_labels
| List all labels for a project with filtering options š·ļø | ā¢ project_id
(string): Project ID or pathā¢ with_counts
(optional): Include issue and merge request countsā¢ include_ancestor_groups
(optional): Include ancestor groupsā¢ search
(optional): Filter labels by keyword | Array of labels |
| get_label
| Get a single label from a project š·ļø | ā¢ project_id
(string): Project ID or pathā¢ label_id
(number/string): Label ID or nameā¢ include_ancestor_groups
(optional): Include ancestor groups | Label details |
| create_label
| Create a new label in a project š·ļøā | ā¢ project_id
(string): Project ID or pathā¢ name
(string): Label nameā¢ color
(string): Color in hex format (e.g., "#FF0000")ā¢ description
(optional): Label descriptionā¢ priority
(optional): Label priority | Created label details |
| update_label
| Update an existing label in a project š·ļøāļø | ā¢ project_id
(string): Project ID or pathā¢ label_id
(number/string): Label ID or nameā¢ new_name
(optional): New label nameā¢ color
(optional): New color in hex formatā¢ description
(optional): New descriptionā¢ priority
(optional): New priority | Updated label details |
| delete_label
| Delete a label from a project š·ļøā | ā¢ project_id
(string): Project ID or pathā¢ label_id
(number/string): Label ID or name | Success message |
Environment Variable Configuration
Before running the server, you need to set the following environment variables:
License
MIT License