gitlab-mcp-server MCP Server

MCP Server for the GitLab API, enabling project management, file operations, and more. Forked from https://github.com/modelcontextprotocol

Local serverstdioMIT

What is the gitlab-mcp-server MCP Server?

gitlab-mcp-server is an MCP project maintained in the therealchristhomas/gitlab-mcp-server repository. The maintainer describes its purpose as “MCP Server for the GitLab API, enabling project management, file operations, and more. Forked from https://github.com/modelcontextprotocol”. Read the project documentation for the complete scope.

Installation

The documented npm package is @therealchristhomas/gitlab-mcp-server. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Configuration values

The example declares GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_URL. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
Inputs:group_id (string): Group ID or URL-encoded path
previous_pathoptional string): Path of the file to move/rename
ReturnsSuccess confirmation
refoptional string): Source branch/commit for new branch
pageoptional number): Page number for pagination
per_pageoptional number): Results per page (default 20)
visibilityoptional string): 'private', 'internal', or 'public'
initialize_with_readmeoptional boolean): Initialize with README
namespaceoptional string): Namespace to fork to
ownedoptional boolean): Limit by groups owned by the current user
min_access_leveloptional number): Minimum access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)
titleoptional string): New title
assignee_idsoptional number[]): Array of user IDs to assign
labelsoptional string[]): Array of label names
milestone_idnumber): Milestone ID to delete
stateoptional string): 'active' or 'closed'
milestoneoptional string): Milestone title
assignee_idoptional number): User ID of assignee
author_idoptional number): User ID of author
searchoptional string): Search in title or description
created_afteroptional string): Return MRs created after date (ISO 8601)
created_beforeoptional string): Return MRs created before date (ISO 8601)
updated_afteroptional string): Filter by update date (ISO 8601)
updated_beforeoptional string): Filter by update date (ISO 8601)
sortoptional string): Sort merge requests
order_byoptional string): 'asc' or 'desc'
with_labels_detailsoptional boolean): If true, returns more details for each label. Default is false.
state_eventoptional string): 'close' or 'activate'
source_branchoptional string): Filter by source branch
target_branchoptional string): New target branch
draftoptional boolean): Create as draft MR
allow_collaborationoptional boolean): Allow commits from upstream members
remove_source_branchoptional boolean): Remove source branch when merged
merge_commit_messageoptional string): Custom merge commit message
should_remove_source_branchoptional boolean): Remove source branch after merge
merge_when_pipeline_succeedsoptional boolean): Merge when pipeline succeeds
shaoptional string): SHA that must match the source branch HEAD
coloroptional string): New label color
priorityoptional number): New label priority
new_nameoptional string): New label name
due_dateoptional string): New due date
start_dateoptional string): New start date
search_titleoptional string): Search in title only
include_ancestorsoptional boolean): Include parent group milestones
include_descendantsoptional boolean): Include subgroup milestones
containing_dateoptional string): Milestones containing given date
end_dateoptional string): Filter where start_date <= end_date

How to install the gitlab-mcp-server MCP Server

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": [
        "-y",
        "@therealchristhomas/gitlab-mcp-server"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "YOUR_GITLAB_PERSONAL_ACCESS_TOKEN",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
GITLAB_PERSONAL_ACCESS_TOKENDeclared in the maintainer’s client configuration.Yes
GITLAB_API_URLDeclared in the maintainer’s client configuration.Optional