mcp-gitlab MCP Server (English)

by ZephyrDeng

6 335 downloads Not rated yet

About

[中文版](./README.md) ![](https://badge.mcpx.dev?type=server&features=tools 'MCP server with tools') [![Build Status](https://github.com/ZephyrDeng/mcp-server-gitlab/actions/workflows/ci.yml/badge.svg)](https://github.com/ZephyrDeng/mcp-server-gitlab/actions) [![Node…

Explore

- GitlabSearchUserProjectsTool: Search users and their active projects by username
- GitlabGetUserTasksTool: Get current user's pending tasks
- GitlabSearchProjectDetailsTool: Search projects and details
- GitlabCreateMRCommentTool: Add comments to merge requests
- GitlabAcceptMRTool: Accept and merge merge requests
- GitlabUpdateMRTool: Update merge request assignee, reviewers, title, description, and labels
- GitlabCreateMRTool: Create a new merge request with assignee and reviewers
- GitlabRawApiTool: Call any GitLab API with custom parameters

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name mcp-gitlab MCP Server (English)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

bun install


env

MCP_HOST=0.0.0.0

You can also interact with the MCP server directly via HTTP requests:


HTTP Stream mode supports multiple ways to provide GitLab tokens and instance URLs:

Token Authentication:

1. Bearer Token (Recommended):

http
POST http://localhost:3000/mcp
Content-Type: application/json
Authorization: Bearer your-gitlab-access-token

2. Private Token Header:
http
POST http://localhost:3000/mcp
Content-Type: application/json
PRIVATE-TOKEN: your-gitlab-access-token

3. Alternative Private Token Header:
http
POST http://localhost:3000/mcp
Content-Type: application/json
private-token: your-gitlab-access-token

4. Custom GitLab Token Header:
http
POST http://localhost:3000/mcp
Content-Type: application/json
x-gitlab-token: your-gitlab-access-token

GitLab Instance URL Configuration:

1. GitLab URL Header (Recommended):

http
POST http://localhost:3000/mcp
Content-Type: application/json
x-gitlab-url: https://gitlab.company.com

2. Alternative GitLab URL Headers:
http
POST http://localhost:3000/mcp
Content-Type: application/json
gitlab-url: https://gitlab.company.com

http
POST http://localhost:3000/mcp
Content-Type: application/json
gitlab-api-url: https://gitlab.company.com

5. Fallback to Environment Variables:
If no token or URL is provided in headers, the server will fall back to the GITLAB_TOKEN and GITLAB_API_URL environment variables.

Complete Example:

http
POST http://localhost:3000/mcp
Content-Type: application/json
Authorization: Bearer your-gitlab-access-token
x-gitlab-url: https://gitlab.company.com

The repository includes a Dockerfile for easy deployment:

bash

docker run -d \
-p 3000:3000 \
-e MCP_TRANSPORT_TYPE=httpStream \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=3000 \
gitlab-mcp-server


bash

npm install
npm run build

npm install -g pm2

For detailed examples of each tool's parameters, see USAGE.md.

Key benefits of HTTP Stream mode with dynamic authentication:
- Multi-tenant support: Single server instance can serve multiple users
- Security: Each request uses its own authentication token and GitLab instance URL
- Flexibility: Tokens and GitLab URLs can be configured per client without server restart
- Multi-instance support: Connect to different GitLab instances from the same server

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp-gitlab mcp server (english)": {
            "mcp-server-gitlab": {
                "command": "bun",
                "args": [
                    "run",
                    "build"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-gitlab": {
        "command": "bun",
        "args": [
            "run",
            "build"
        ]
    }
}

A GitLab integration server built on the fastmcp framework, providing various GitLab RESTful API tools. Supports integration with Claude, Smithery, and other platforms.

Features

- GitlabSearchUserProjectsTool: Search users and their active projects by username
- GitlabGetUserTasksTool: Get current user's pending tasks
- GitlabSearchProjectDetailsTool: Search projects and details
- GitlabCreateMRCommentTool: Add comments to merge requests
- GitlabAcceptMRTool: Accept and merge merge requests
- GitlabUpdateMRTool: Update merge request assignee, reviewers, title, description, and labels
- GitlabCreateMRTool: Create a new merge request with assignee and reviewers
- GitlabRawApiTool: Call any GitLab API with custom parameters

Quick Start

Stdio Mode (Default)

```bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.