MCP server: One MCP server.

GitLab MCP Server

@sumiratiMCP server · External

Developer-ready GitLab MCP server for CE and EE instances.

v1.0.1MITJavaScript
Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

Not assessed yet.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

npm@sumirati/mcp-gitlabv1.0.1

Run

npx -y @sumirati/mcp-gitlab

MCP client config

{
  "mcpServers": {
    "gitlab-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@sumirati/mcp-gitlab"
      ]
    }
  }
}
README6 min read

GitLab MCP Server (@sumirati/mcp-gitlab)

A robust, developer-ready, and LLM-ergonomic Model Context Protocol (MCP) server for both self-hosted GitLab Community Edition (CE) and GitLab Enterprise Edition (EE).

npm version License: MIT GitHub GitLab


Mission

MCP-gitlab provides high-signal, LLM-optimized access to GitLab instances. Rather than dumping raw API payloads, it focuses on context efficiency, developer ergonomics, and native AI pair-programming workflows for codebase management, task coordination, CI/CD observability, and release delivery.


Core Pillars & Capabilities

1. Task & Project Planning

  • Full Issue Lifecycle: CRUD operations, filtering by state, milestone, label, author, and assignee with clean summaries.
  • Smart Milestone Management: Full CRUD with automatic resolution of human-readable milestone_title to internal numeric IDs.
  • Task Dependencies (issue_links): First-class tracking of blocks, is_blocked_by, and relates_to relationships for AI roadmap planning and dependency graphs.
  • Discussions & Progress Tracking (issue_notes): Post progress logs, test results, or design rationale directly to issues without modifying descriptions.

2. CI/CD & Test Observability

  • Pipelines & Job Inspection: Query pipelines by branch, commit SHA, or execution status (running, failed, success).
  • Safe Job Log Tailing (get_job_trace): Safely tail test/build logs (tail_lines) so agents can inspect stack traces directly without token overflow.
  • JUnit Test Reports (get_pipeline_test_report): High-level test suite breakdowns (total, passed, failed, failure messages).

3. Release & Version Delivery

  • GitLab Releases API: Create and inspect formal GitLab releases linked to Git tags, milestones, and markdown changelogs.
  • Git Tags: List and create semantic version tags (vX.Y.Z).

4. Merge Request Review & Delivery

  • Full MR Lifecycle: Create, inspect, update, and accept/merge MRs with branch cleanup and squash options.
  • Diff Reviews (get_merge_request_changes): Review code diffs and post review comments (create_merge_request_note).

LLM-First Architectural Principles

  • Context Token Economy: Lean response payloads by default returning high-signal summaries instead of thousands of lines of raw GitLab API metadata.
  • Smart Auto-Resolution: Transparently resolves paths (e.g. 'group/project-name' vs numeric 31), milestone titles, and label strings/arrays.
  • Self-Hosted & CE First: Zero dependencies on GitLab Duo or enterprise licenses; connects over standard v4 REST using a Personal Access Token (PAT).

Quickstart & Installation

Option 1: Run with npx (No installation needed)

bash
npx -y @sumirati/mcp-gitlab

Option 2: Install Globally

bash
npm install -g @sumirati/mcp-gitlab
mcp-gitlab

Option 3: Local Clone

bash
git clone https://github.com/sumirati/mcp-gitlab.git
# Or from GitLab.com:
# git clone https://gitlab.com/sumirati/mcp-gitlab.git

cd mcp-gitlab
npm install
node index.js

Environment Configuration

Configure the following environment variables (or copy .env.example to .env):

VariableRequiredDefaultDescription
GITLAB_PERSONAL_ACCESS_TOKENYes—Personal access token with api scope.
GITLAB_API_URLNohttps://gitlab.com/api/v4Base API URL of your GitLab CE/EE or cloud instance.

Client Configuration

Google Antigravity / Claude Desktop / Cursor

Add to your MCP configuration file (mcp_config.json or claude_desktop_config.json):

Using npm / npx:

json
{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@sumirati/mcp-gitlab"],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<your-gitlab-token>",
        "GITLAB_API_URL": "https://gitlab.example.com/api/v4"
      }
    }
  }
}

Using local repository:

json
{
  "mcpServers": {
    "gitlab": {
      "command": "node",
      "args": ["/path/to/MCP-gitlab/index.js"],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<your-gitlab-token>",
        "GITLAB_API_URL": "https://gitlab.example.com/api/v4"
      }
    }
  }
}

Complete Tools Reference

The server exposes 39 tools organized across key functional domains:

Repository & Files

ToolDescription
search_repositoriesSearch projects and repositories by query with pagination
create_repositoryCreate a new GitLab project/repository
get_file_contentsRead file or directory content from a repository
create_or_update_fileCreate or update a single file with commit message
push_filesCommit multiple files in a single atomic commit
fork_repositoryFork a project into a user or group namespace
create_branchCreate a new branch from a commit, tag, or branch

Issues & Notes

ToolDescription
list_issuesList and filter issues (state, milestone, labels, assignee)
get_issueGet details for an issue by project-scoped IID (#<iid>)
create_issueCreate an issue with title, description, milestone, and labels
update_issueUpdate issue title, state, milestone, labels, or assignees
list_issue_notesList discussions, comments, and activity log on an issue
create_issue_notePost a comment or progress/verification note to an issue
list_issue_linksList related, blocking, or blocked-by issue dependencies
create_issue_linkCreate an issue dependency (relates_to, blocks, is_blocked_by)

Milestones & Labels

ToolDescription
list_milestonesList project milestones with start and due dates
get_milestoneGet details for a milestone by numeric ID
create_milestoneCreate a project milestone with due dates
update_milestoneUpdate milestone title, dates, description, or state
list_labelsList labels available in the project
create_labelCreate a project label with color hex and description

CI/CD Pipelines & Test Observability

ToolDescription
list_pipelinesList CI/CD pipelines filtered by branch, tag, status, or SHA
get_pipelineGet pipeline status, duration, and commit information
create_pipelineTrigger a new CI/CD pipeline execution for a branch/tag
list_pipeline_jobsList all jobs (build, test, deploy) and status in a pipeline
get_job_traceInspect terminal output log of a job with safe tail_lines
get_pipeline_test_reportGet JUnit test report summary (passed/failed suites, error traces)

Releases & Tags

ToolDescription
list_releasesList published releases and changelogs
get_releaseGet release details by tag name
create_releasePublish a formal release with tag, changelog, and milestones
list_tagsList Git tags in the repository
create_tagCreate a Git tag pointing to a branch or commit

Merge Requests

ToolDescription
list_merge_requestsList merge requests filtered by state, branches, milestone, labels
get_merge_requestGet merge request details and status by IID (!<iid>)
create_merge_requestCreate a merge request between branches
update_merge_requestUpdate MR title, description, state, milestone, or labels
get_merge_request_changesInspect code diffs and modified files in an MR
accept_merge_requestMerge an approved MR with squash and branch cleanup flags
create_merge_request_notePost a review comment or note on a merge request

Roadmap

  • Read-Only Mode (GITLAB_READ_ONLY=true): Safeguard enabling AI agents to read, query, and diagnose GitLab assets without permission to perform write operations, commits, or state changes.
  • Inline Diff Reviews: Add support for posting review comments directly to specific diff lines/positions on Merge Requests (create_diff_discussion).
  • Project Wiki & Snippets Support: Expand tooling to read and update GitLab project wikis and code snippets.
  • Streamable HTTP Remote Transport: Support running as a remote/hosted MCP service alongside the default local stdio transport.

Acknowledgements & Third-Party Lineage

This project incorporates architectural concepts, schemas, and patterns from:

  • @modelcontextprotocol/server-gitlab (MIT License) — Copyright (c) 2024 Anthropic, PBC / GitLab, PBC. Baseline repository and file schema patterns.
  • @modelcontextprotocol/sdk (MIT License) — Copyright (c) Anthropic, PBC.
  • zod & zod-to-json-schema (MIT License) — Colin McDonnell & Stefan Evertsson.
  • GitLab REST API v4 — GitLab, PBC.
  • Architectural patterns evaluated from Vijay-Duke/mcp-gitlab and zereight/gitlab-mcp.

See NOTICE for complete third-party attribution details.


License

This project is licensed under the MIT License — Copyright (c) 2026 sumirati@buggycode.net.