Skip to main content
Glama
owayo

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

by owayo

GitLab-MCP-Server

GitLab과의 연동 기능을 제공하는 Model Context Protocol (MCP) 서버입니다. GitLab의 특정 프로젝트에서 파이프라인 실패 정보 및 병합 요청에 대한 지적 사항을 검색하여 AI 어시스턴트에게 제공합니다.

개요

이 MCP 서버는 GitLab API를 활용하여 다음 정보를 AI 어시스턴트에게 제공합니다.

  1. GitLab 파이프라인에서 실패한 작업의 콘솔 출력

  2. GitLab MR에 대한 미해결 지적 사항(댓글)

  3. GitLab MR 변경 사항(로컬 리포지토리의 현재 상태와의 차이)

MCP의 기능을 사용함으로써 AI 어시스턴트는 GitLab의 정보를 직접 얻고 보다 정확한 지원을 제공할 수 있습니다.

Related MCP server: mcp-gitlab-jira

설치

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

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

준비

GitLab 액세스 토큰이 필요합니다. 액세스 토큰은 GitLab 설정 → 액세스 토큰에서 발행하십시오. 발행할 때, read_api 에 체크를 넣어 주세요.

기능

1. 파이프라인 실패 정보를 가져오고 수정 ( get_pipeline_failed_jobs )

GitLab 파이프라인에서 실패한 작업의 콘솔 출력을 가져옵니다. 취득한 정보를 바탕으로 AI 어시스턴트에 의한 수정이 이루어집니다.

산출 :

  • 실패한 작업의 콘솔 출력(작업 이름, 상태, 상세 로그 포함)

2. MR의 지적 사항을 취득해 수정 ( get_review_comments )

GitLab MR의 미해결 지적 사항(코멘트)을 취득해 대응합니다. 해결된 댓글이나 파일에 붙어 있지 않은 댓글은 제외됩니다.

산출 :

  • MR에 미해결하고 파일에 붙어있는 지적 사항 (코멘트자, 시간, 코멘트 내용, 파일 위치 정보 등을 포함)

3. MR의 변경 내용을 취득하고 리뷰 ( get_review_changes )

GitLab MR의 기본 커밋(base_sha)에서 현재 로컬 리포지토리 상태까지의 차이를 가져옵니다. 원격 차이가 아닌 로컬 최신 상태(작업 중 커밋되지 않은 변경 포함)와의 차이를 얻을 수 있습니다. 취득한 차이로 검토가 이루어집니다.

산출 :

  • MR의 기본 커밋에서 현재 로컬 상태까지의 변경 내용(각 파일의 변경 유형과 차이)

AI 어시스턴트와의 협력

AI 어시스턴트(예: Claude)는 이 MCP 서버에 대해 다음 함수를 호출할 수 있습니다.

  • get_pipeline_failed_jobs() : 파이프라인의 실패 정보 취득

  • get_review_comments() : MR의 지적 사항 취득

  • get_review_changes() : MR의 변경 내용 취득

이러한 함수는 현재 브랜치와 관련된 MR 정보를 자동으로 검색합니다.

Claude for Desktop에서 설정

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"
            }
        }
    }
}

Cursor에서 설정

프로젝트 루트의 .cursor/mcp.json 에 다음 설정을 추가하십시오.

{
    "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"
            ]
        }
    }
}

참고: 위의 설정 예에서 다음 값을 적절하게 바꾸십시오.

  • your_gitlab_api_key : GitLab API 액세스 토큰

  • /path/to/git/repo : 로컬 Git 저장소의 절대 경로

  • /path/to/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.

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

TDQS

B3.1/5.0

Scored across 3 tools

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

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.
    14 npm
    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
    9 npm
    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