Skip to main content
Glama

gitlab-mcp

MCP server for GitLab — gives AI assistants access to CI pipelines, job logs, repositories, branches, merge requests, and commits through the GitLab REST API.

Why

CI failures, pipeline status, and MR reviews are a constant context-switch. This server lets an AI assistant fetch job logs, retry failures, inspect diffs, and comment on MRs without the developer leaving their current task.

Related MCP server: qodev-gitlab-mcp

Tools

Pipelines & Jobs

Tool

Description

gitlab_list_pipelines

Recent pipelines with status

gitlab_get_pipeline

Pipeline summary + job breakdown

gitlab_list_jobs

Jobs in a specific pipeline

gitlab_get_job

Status of a single job

gitlab_get_job_log

Raw log output (with tail truncation)

gitlab_poll_job

Block until a job reaches a terminal state

gitlab_retry_job

Retry a failed/cancelled job

gitlab_cancel_job

Cancel a running job

gitlab_retry_pipeline

Retry all failed jobs in a pipeline

gitlab_trigger_pipeline

Trigger a new pipeline on a ref

Repositories & Branches

Tool

Description

gitlab_list_projects

Projects accessible to the token

gitlab_get_project

Project metadata

gitlab_list_branches

Branches with latest commit

gitlab_get_file

File contents at any ref

gitlab_list_commits

Commit log for a ref

gitlab_get_commit

Commit detail + diff stats

Merge Requests

Tool

Description

gitlab_list_merge_requests

Open/closed/merged MRs

gitlab_get_merge_request

Full MR detail

gitlab_create_merge_request

Open a new MR

gitlab_add_mr_note

Post a comment on an MR

Configuration

Variable

Description

GITLAB_URL

GitLab instance base URL

GITLAB_TOKEN

Personal or project access token

GITLAB_DEFAULT_PROJECT

Default project path (e.g. group/project)

MCP_TRANSPORT

stdio (default) or sse

MCP_HOST / MCP_PORT

SSE listen address

Run

pip install -e .
GITLAB_URL=https://gitlab.example.com GITLAB_TOKEN=... gitlab-mcp

Deploy

Deployed as a systemd SSE service on Proteus. GitLab CI pushes on merge to main.

Available Tools

20 tools
gitlab_add_mr_noteB

Add a comment to a merge request.

Args: mr_iid: The merge request IID (e.g. 42 for !42). body: Comment text (markdown supported). project_path: GitLab project path, e.g. 'group/project'.

Inputs: body (required), mr_iid (required), project_path. Returns: result

gitlab_cancel_jobA

Cancel a running CI job.

Args: job_id: The numeric job ID to cancel. project_path: GitLab project path, e.g. 'group/project'.

Inputs: job_id (required), project_path. Returns: result

gitlab_create_merge_requestB

Create a new merge request.

Args: title: MR title. source_branch: Branch to merge from. target_branch: Branch to merge into. project_path: GitLab project path, e.g. 'group/project'. description: Optional MR description / body text. remove_source_branch: Delete source branch after merge (default False). squash: Squash commits on merge (default False).

Inputs: title (required), source_branch (required), target_branch (required), squash, +3 more. Returns: result

gitlab_get_commitB

Get details and diff stats for a specific commit.

Args: sha: Full or short commit SHA. project_path: GitLab project path, e.g. 'group/project'.

Inputs: sha (required), project_path. Returns: result

gitlab_get_fileA

Retrieve the contents of a file from the repository.

Args: file_path: Path to the file within the repo, e.g. 'src/main.py'. ref: Branch, tag, or commit SHA (default 'HEAD'). project_path: GitLab project path, e.g. 'group/project'.

Inputs: file_path (required), ref, project_path. Returns: result

gitlab_get_jobA

Get the current status of a GitLab CI job by ID.

Args: job_id: The numeric job ID (visible in the GitLab UI URL). project_path: GitLab project path, e.g. 'group/project'. Defaults to GITLAB_DEFAULT_PROJECT env var if not provided.

Inputs: job_id (required), project_path. Returns: result

gitlab_get_job_logA

Fetch the raw log output of a CI job.

Args: job_id: The numeric job ID. project_path: GitLab project path, e.g. 'group/project'. tail: Return only the last N lines (default 100, 0 = all lines).

Inputs: job_id (required), tail, project_path. Returns: result

gitlab_get_merge_requestA

Get details of a merge request by its project-level IID.

Args: mr_iid: The merge request IID (shown in the GitLab UI as !123). project_path: GitLab project path, e.g. 'group/project'.

Inputs: mr_iid (required), project_path. Returns: result

gitlab_get_pipelineA

Get the status and summary of a GitLab CI pipeline.

Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.

Inputs: pipeline_id (required), project_path. Returns: result

gitlab_get_projectB

Get metadata for a GitLab project.

Args: project_path: GitLab project path, e.g. 'group/project'.

Inputs: project_path. Returns: result

gitlab_list_branchesA

List branches in a project.

Args: project_path: GitLab project path, e.g. 'group/project'. search: Optional keyword to filter branch names. limit: Max branches to return (default 20, max 100).

Inputs: limit, search, project_path. Returns: result

gitlab_list_commitsA

List commits on a branch or ref.

Args: project_path: GitLab project path, e.g. 'group/project'. ref: Branch, tag, or commit SHA (default 'HEAD'). limit: Max commits to return (default 20, max 100).

Inputs: ref, limit, project_path. Returns: result

gitlab_list_jobsB

List all jobs in a specific pipeline with their statuses.

Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.

Inputs: pipeline_id (required), project_path. Returns: result

gitlab_list_merge_requestsA

List merge requests for a project.

Args: project_path: GitLab project path, e.g. 'group/project'. state: Filter by state: 'opened', 'closed', 'merged', or 'all' (default 'opened'). limit: Max MRs to return (default 20, max 100).

Inputs: limit, state, project_path. Returns: result

gitlab_list_pipelinesA

List the most recent pipelines for a project.

Args: project_path: GitLab project path, e.g. 'group/project'. limit: Number of pipelines to return (default 10, max 100).

Inputs: limit, project_path. Returns: result

gitlab_list_projectsA

List GitLab projects accessible to the authenticated user.

Args: search: Optional keyword to filter projects by name. limit: Max projects to return (default 20, max 100).

Inputs: limit, search. Returns: result

gitlab_poll_jobA

Poll a GitLab CI job until it reaches a terminal state.

Checks every interval_seconds and gives up after timeout_minutes. Returns the final job status summary.

Args: job_id: The numeric job ID. project_path: GitLab project path, e.g. 'group/project'. interval_seconds: How often to poll (default 30s). timeout_minutes: Stop polling after this many minutes (default 30).

Inputs: job_id (required), project_path, timeout_minutes, interval_seconds. Returns: result

gitlab_retry_jobA

Retry a failed or cancelled CI job.

Args: job_id: The numeric job ID to retry. project_path: GitLab project path, e.g. 'group/project'.

Inputs: job_id (required), project_path. Returns: result

gitlab_retry_pipelineC

Retry all failed jobs in a pipeline.

Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.

Inputs: pipeline_id (required), project_path. Returns: result

gitlab_trigger_pipelineA

Trigger a new CI pipeline on the given branch or tag.

Args: ref: Branch name, tag, or SHA to run the pipeline on. project_path: GitLab project path, e.g. 'group/project'. variables: Optional dict of CI variable key/value pairs to inject.

Inputs: ref (required), variables, project_path. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 20 tools

    Disambiguation5/5

    Each tool targets a distinct operation (e.g., get_job vs get_job_log vs poll_job are clearly different). No two tools have overlapping purposes; all are well-separated.

    Naming Consistency5/5

    All tools follow the consistent pattern `gitlab_verb_noun` in snake_case. Examples: gitlab_create_merge_request, gitlab_get_job_log, gitlab_trigger_pipeline. No deviations.

    Tool Count5/5

    20 tools cover a broad yet focused scope (projects, MRs, CI/CD, files, branches). Each tool serves a clear purpose without redundancy, making the set well-scoped for a GitLab integration.

    Completeness3/5

    Key operations are present (create/get/list MRs, CI triggers, job management), but missing write actions like merge/close MRs, create/update files, or manage branches. This leaves notable gaps for full lifecycle coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Production-ready MCP server providing GitLab integration with OAuth authentication, enabling AI assistants to manage projects, issues, merge requests, branches, files, and commits across GitLab instances.
      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
    • A
      license
      C
      quality
      B
      maintenance
      A production-ready MCP server for GitLab enabling AI assistants to read and manage GitLab projects, merge requests, issues, pipelines, wikis, releases, and more through a unified interface.
      268
      1,908 npm
      10
      MIT