Skip to main content
Glama
owayo

https://github.com/owayo/gitlab-mcp-server

by owayo

GitLab-MCP-Server

This is a Model Context Protocol (MCP) server that provides integration with GitLab. It retrieves pipeline failure information and merge request findings from specific projects in GitLab and provides them to the AI assistant.

overview

This MCP server uses GitLab's API to provide the following information to the AI assistant:

  1. Console output of failed jobs in GitLab Pipeline

  2. Open issues (comments) for GitLab MR

  3. Changes in the GitLab MR (diff against the current state of your local repository)

Using MCP capabilities, the AI assistant can pull information directly from GitLab to provide more targeted assistance.

Related MCP server: mcp-gitlab-jira

install

# uvのインストール
$ curl -LsSf https://astral.sh/uv/install.sh | sh

$ cd /path/to/this-mcp-server
# ライブラリのインストール
$ uv sync

Preparation

You need a GitLab access token. Please issue an access token in GitLab Settings → Access Token. When issuing the token, please check read_api .

function

1. Get pipeline failure information and fix it ( get_pipeline_failed_jobs )

Capture the console output of failed jobs in your GitLab pipelines, and use that information to make corrections with your AI assistant.

output :

  • The console output of the failed job, including the job name, status, and detailed logs

2. Get and correct the MR's comments ( get_review_comments )

Retrieves and responds to unresolved issues (comments) from GitLab MR. Resolved comments and comments not associated with a file are excluded.

output :

  • Open file-related issues in MR (including commenter, time, comment content, file location, etc.)

3. Get and review the changes in the MR ( get_review_changes )

Get the difference between the base commit (base_sha) of the GitLab MR and the current state of your local repository. You can get the difference between the latest local state (including uncommitted changes in progress) and the remote difference, not the remote difference. The review will be performed using the obtained difference.

output :

  • Changes from the base commit of the MR to the current local state (type of change and diff for each file)

Collaboration with AI assistants

An AI assistant (such as Claude) can call the following functions on this MCP server:

  • get_pipeline_failed_jobs() : Get pipeline failure information

  • get_review_comments() : Get MR's comments

  • get_review_changes() : Get the changes in the MR

These functions automatically retrieve information about the MR related to the current branch.

Claude for Desktop Settings

Add the following to claude_desktop_config.json :

{
    "mcpServers": {
        "gitlab-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/this-mcp-server",
                "run",
                "main.py"
            ],
            "env": {
                "GITLAB_URL": "your_gitlab_url",
                "GITLAB_PROJECT_NAME": "gitlab_project_name",
                "GITLAB_API_KEY": "your_gitlab_api_key",
                "GIT_REPO_PATH": "/path/to/git/repo"
            }
        }
    }
}

Setting with Cursor

Add the following to .cursor/mcp.json in your project root:

{
    "mcpServers": {
        "gitlab-mcp": {
            "command": "env",
            "args": [
                "GITLAB_URL=your_gitlab_url",
                "GITLAB_PROJECT_NAME=gitlab_project_name",
                "GITLAB_API_KEY=your_gitlab_api_key",
                "GIT_REPO_PATH=/path/to/git/repo",
                "uv",
                "--directory",
                "/path/to/this-mcp-server",
                "run",
                "main.py"
            ]
        }
    }
}

Note: In the above example configuration, replace the following values appropriately:

  • your_gitlab_api_key : Your GitLab API access token

  • /path/to/git/repo : The absolute path to the local Git repository

  • /path/to/this-mcp-server : Absolute path to the directory of this MCP server

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    -
    quality
    -
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with GitLab repositories, allowing tasks like managing merge requests, searching projects, and creating comments through RESTful API integration.
    24
    2
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol (MCP) server for GitLab and Jira integration. This server allows AI agents like gemini-cli to interact with your GitLab and Jira instances.
    32
    32
    11
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with self-hosted GitLab instances through 30 specialized tools. It supports managing projects, merge requests, CI/CD pipelines, and repository operations via the GitLab REST API v4.
    30
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A Model Context Protocol server for GitLab integration, enabling AI assistants to manage projects, merge requests, pipelines, issues, releases, and more.
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/owayo/gitlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server