- Home
- MCP servers
- GitLab
GitLab
- javascript
1
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"maxkulish-gitlab-mcp-archive": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"GITLAB_PERSONAL_ACCESS_TOKEN",
"-e",
"GITLAB_API_URL",
"mcp/gitlab"
],
"env": {
"GITLAB_API_URL": "https://gitlab.com/api/v4",
"GITLAB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
}
}
}
}You can manage GitLab projects, files, issues, and merge requests through a dedicated MCP server that connects to the GitLab API. It automates common tasks, preserves Git history, and supports batch operations, making it easier to integrate GitLab workflows into your MCP-enabled tools.
How to use
You interact with the GitLab MCP Server through your MCP client. Use it to create or update files in a project, push multiple files in a single commit, search for repositories, and manage issues and merge requests. Each tool focuses on a specific GitLab action, while the server handles branches, history, and error handling to keep your Git history clean.
How to install
Prerequisites: ensure you have Docker installed or that you can run MCP servers locally with a compatible runtime (such as NPX). You also need a GitLab Personal Access Token with appropriate scopes for API and repository access.
Option A: Run via Docker (recommended for quick setup) using the MCP GitLab server image. Prepare your token and API URL in the environment.
docker run --rm -i \
-e GITLAB_PERSONAL_ACCESS_TOKEN=YOUR_TOKEN \
-e GITLAB_API_URL=https://gitlab.com/api/v4 \
mcp/gitlab
Option B: Run via NPX (locally without building a Docker image). Supply your token and API URL via environment variables or a config file in your environment.
npx -y @modelcontextprotocol/server-gitlab
Additional setup and notes
Environment variables you will typically provide: GITLAB_PERSONAL_ACCESS_TOKEN and GITLAB_API_URL. The token must have sufficient scopes (api, read_api, read_repository, write_repository) to perform repository operations.
Available tools
create_or_update_file
Create or update a single file in a project with a commit message and optional move/rename of a previous path.
push_files
Push multiple files in a single commit to a specified branch.
search_repositories
Search for GitLab projects with pagination support.
create_repository
Create a new GitLab project with optional description and visibility settings.
get_file_contents
Retrieve contents of a file or directory from a project at a specific ref.
create_issue
Create a new issue in a project with optional assignees, labels, and milestone.
create_merge_request
Create a new merge request with optional draft mode and collaboration settings.
fork_repository
Fork a project into a specified namespace.
create_branch
Create a new branch from a given ref or source branch.