Get the FREE Ultimate OpenClaw Setup Guide →

GitLab

Official

MCP server for GitLab API integration - projects, issues, merge requests, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio modelcontextprotocol-server-gitlab npx -y @modelcontextprotocol/server-gitlab

How to use

The GitLab MCP server provides seamless integration with the GitLab API, allowing you to manage projects, issues, merge requests, and more through a unified interface. By leveraging this server, you can automate your development workflows, enhance project management, and streamline collaboration within your team. Whether you need to create issues or manage branches, this MCP server simplifies interactions with the GitLab platform.

Once connected to the GitLab MCP server, you can utilize various tools to interact with your GitLab projects effectively. For instance, you can use create_or_update_file to manage project files, or create_issue to track bugs and feature requests. Commands like search_projects help you quickly locate relevant repositories, while create_merge_request enables you to facilitate code reviews. Tailor your queries depending on your project needs to maximize the functionality of this server.

How to install

Prerequisites

Before installing the GitLab MCP server, ensure you have Node.js installed on your machine. You can download it from Node.js official website.

Option A: Quick Start with npx

To quickly start using the GitLab MCP server, you can run the following command:

npx -y @modelcontextprotocol/server-gitlab  

Option B: Global Install Alternative

If you prefer a global installation, you can install the package using npm:

npm install -g @modelcontextprotocol/server-gitlab  

After installation, you can initiate the server according to your project's requirements.

Additional notes

When configuring the GitLab MCP server, make sure to set the necessary environment variables, such as your GitLab API token for authentication. This token can be obtained from your GitLab account settings. Common issues include failing to authenticate due to missing or incorrect tokens, so double-check your configuration if you encounter access problems.

Available tools

create_or_update_file

Create or update a file in a project

search_projects

Search for GitLab projects

get_file_contents

Get contents of a file

push_files

Push multiple files in a commit

create_issue

Create a new issue

create_merge_request

Create a merge request

fork_project

Fork a project

create_branch

Create a new branch

Related MCP Servers

Sponsor this space

Reach thousands of developers