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

Available Tools

3 tools
get_pipeline_failed_jobsB

GitLabパイプラインで失敗したジョブのコンソール出力を取得

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions retrieving console output for failed jobs, implying a read-only operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, error handling, or what happens if no failed jobs exist. The description is minimal and lacks critical operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence in Japanese that directly states the tool's function without unnecessary words. It's front-loaded and efficiently conveys the core purpose, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value includes (e.g., job details, error messages, format) or address potential complexities like pagination or filtering. For a tool that likely interacts with GitLab APIs, more context is needed for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param details, but this is acceptable given the schema's completeness. Baseline is 4 for zero parameters, as the description doesn't need to compensate for gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'GitLabパイプラインで失敗したジョブのコンソール出力を取得' (Get console output for failed jobs in a GitLab pipeline). It specifies the verb ('取得' - get/retrieve) and resource ('失敗したジョブのコンソール出力' - console output of failed jobs), though it doesn't explicitly distinguish from sibling tools like 'get_review_changes' or 'get_review_comments'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a pipeline ID or authentication), context for invocation, or exclusions. Without annotations or sibling tool context, usage is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_review_changesC

GitLab MRで修正したファイルの差分を取得

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does (gets file differences) but doesn't describe any behavioral traits: no information about authentication requirements, rate limits, pagination, error conditions, or what format the differences are returned in. For a tool with zero annotation coverage, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Japanese that directly states the tool's purpose. There's no wasted verbiage or unnecessary elaboration. However, it could be slightly improved by being front-loaded with more complete information about the tool's behavior and usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what format the differences are returned in (unified diff? JSON? raw git diff?), what authentication is required, or any error conditions. For a tool that presumably interacts with GitLab's API, this leaves significant gaps in understanding how to properly use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation (none). The description doesn't need to compensate for any parameter gaps. The baseline for 0 parameters with full schema coverage is 4, as there's no parameter semantics burden on the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'gets differences of modified files in GitLab MR' which provides a basic purpose (verb+resource). However, it doesn't distinguish this from sibling tools like 'get_review_comments' - both appear to retrieve MR-related information but with different data types. The purpose is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention when this should be used instead of 'get_review_comments' or 'get_pipeline_failed_jobs', nor does it provide any context about prerequisites, timing, or constraints. The agent receives no usage guidance beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_review_commentsB

GitLab MRの未解決の指摘事項(コメント)を取得

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool retrieves unresolved comments, but doesn't disclose behavioral traits such as authentication requirements, rate limits, pagination, error handling, or what 'unresolved' specifically means. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and no output schema, the description is minimally complete. It specifies what the tool does but lacks details on behavior, output format, or usage context. For a tool with no annotations and no output schema, more information would be helpful, but it's adequate for basic understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline score of 4 is given since the schema fully covers the parameters (none), and the description doesn't need to compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'GitLab MRの未解決の指摘事項(コメント)を取得' translates to 'Get unresolved comments (review comments) for GitLab Merge Requests.' It specifies the verb ('get'), resource ('review comments'), and scope ('unresolved'), but doesn't explicitly differentiate from sibling tools like 'get_review_changes'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools, prerequisites, or specific contexts where this tool is preferred over others. Usage is implied by the purpose but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updates
    • First observedget_pipeline_failed_jobs
    • First observedget_review_changes
    • First observedget_review_comments

TDQS

B3.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_pipeline_failed_jobs targets pipeline failures, get_review_changes targets MR file diffs, and get_review_comments targets MR unresolved comments. There is no overlap in functionality or ambiguity between these three tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'get_' prefix and snake_case formatting (get_pipeline_failed_jobs, get_review_changes, get_review_comments). The naming convention is perfectly uniform across all tools.

Tool Count2/5

With only 3 tools, this server feels severely under-scoped for a GitLab integration. While the tools are coherent, a typical GitLab MCP server would need many more operations (e.g., list projects, create MRs, trigger pipelines) to be useful. The count is too low for the apparent domain.

Completeness2/5

The tool surface is extremely incomplete for GitLab operations. It only provides three specific 'get' operations for pipelines and MRs, missing all CRUD/lifecycle coverage (no create, update, delete, or listing operations). Agents will encounter dead ends when trying to perform basic GitLab workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    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.
    19
    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
    18
    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
    Not graded
    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

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