MCP Gitlab

io.github.crunchtools由 GitHub 帳號 crunchtools 發布v0.4.1更新於 Oct 27, 2026

Secure MCP server for GitLab projects, merge requests, issues, and pipelines

發布方自己的服務:Gitlab

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理瀏覽並操作 GitLab 的專案、合併請求、議題、流水線與搜尋結果。

可以做什麼
  • 列出並檢視專案、分支與提交,瀏覽群組及其專案
  • 列出、建立與更新合併請求,讀取差異並新增留言
  • 列出、建立與更新議題,讀取或新增議題留言
  • 列出 CI/CD 流水線,檢視流水線工作並讀取工作日誌
  • 在全域或單一專案內搜尋
適用情境
適合在 GitLab 上工作時使用:讓助理彙整合併請求、整理議題、排查流水線失敗或搜尋程式碼,不必離開對話。支援 gitlab.com、自架與企業版執行個體。
執行需求
以 Python 套件(uvx 或 pip)或容器映像在本機執行。需要 GitLab 個人存取權杖,透過 GITLAB_TOKEN 提供;自架執行個體可選用 GITLAB_URL,自訂憑證可用 SSL_CERT_FILE 或 GITLAB_SSL_VERIFY。需要能連線至 GitLab 執行個體的網路。
安裝前請注意
此權杖可存取你的 GitLab 帳號:read_api 為唯讀,api 則允許建立與更新合併請求、議題與留言。請將權杖放在環境變數中,不要寫入檔案或命令列參數,並避免用 GITLAB_SSL_VERIFY 關閉 TLS 驗證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP Gitlab,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP GitLab CrunchTools

A secure MCP (Model Context Protocol) server for GitLab projects, merge requests, issues, pipelines, and search. Works with any GitLab instance (gitlab.com, self-hosted, or enterprise).

Overview

This MCP server is designed to be:

  • Secure by default - documented threat model (see SECURITY.md), Pydantic input validation, and the API token held as a SecretStr to prevent accidental logging
  • No third-party services - Runs locally via stdio, your API token never leaves your machine
  • Multi-instance - Works with gitlab.com, self-hosted GitLab, or enterprise instances via configurable URL
  • Cross-platform - Works on Linux, macOS, and Windows
  • Automatically updated - GitHub Actions monitor for CVEs and update dependencies
  • Containerized - Available at quay.io/crunchtools/mcp-gitlab built on Hummingbird Python base image

Naming Convention

ComponentName
GitHub repocrunchtools/mcp-gitlab
Containerquay.io/crunchtools/mcp-gitlab
Python package (PyPI)mcp-gitlab-crunchtools
CLI commandmcp-gitlab-crunchtools
Module importmcp_gitlab_crunchtools

Why Hummingbird?

The container image is built on the Hummingbird Python base image from Project Hummingbird, which provides:

  • Minimal CVE exposure - Built with a minimal package set, dramatically reducing the attack surface
  • Regular updates - Security patches are applied promptly
  • Optimized for Python - Pre-configured Python environment with uv package manager
  • Production-ready - Proper signal handling and non-root user defaults

Features

Project Management (5 tools)

  • list_projects - List projects with filtering and search
  • get_project - Get project details by ID or path
  • list_project_branches - List repository branches
  • get_project_branch - Get a single branch
  • list_project_commits - List commits with date/path filtering

Group Management (3 tools)

  • list_groups - List groups with filtering
  • get_group - Get group details by ID or path
  • list_group_projects - List projects in a group (with subgroup support)

Merge Requests (7 tools)

  • list_merge_requests - List MRs by state, labels, milestone
  • get_merge_request - Get MR details
  • create_merge_request - Create a new MR
  • update_merge_request - Update MR title, description, state, assignees
  • list_mr_notes - List comments on an MR
  • create_mr_note - Add a comment to an MR
  • get_mr_changes - Get the diff for an MR

Issues (6 tools)

  • list_issues - List issues by state, labels, milestone, assignee
  • get_issue - Get issue details
  • create_issue - Create a new issue
  • update_issue - Update issue title, description, state, labels
  • list_issue_notes - List comments on an issue
  • create_issue_note - Add a comment to an issue

Pipelines (4 tools)

  • list_pipelines - List CI/CD pipelines with status filtering
  • get_pipeline - Get pipeline details
  • list_pipeline_jobs - List jobs in a pipeline
  • get_job_log - Get job log output

Search (2 tools)

  • search_global - Search across all accessible GitLab resources
  • search_project - Search within a specific project

Installation

With uvx (Recommended)

bash
uvx mcp-gitlab-crunchtools

With pip

bash
pip install mcp-gitlab-crunchtools

With Container

bash
podman run -e GITLAB_TOKEN=your_token \    quay.io/crunchtools/mcp-gitlab

Configuration

Environment Variables

VariableRequiredDefaultDescription
GITLAB_TOKENYes—Personal Access Token
GITLAB_URLNohttps://gitlab.comGitLab instance URL
SSL_CERT_FILENo—Custom CA bundle path, for self-hosted GitLab with an internal CA
GITLAB_SSL_VERIFYNotrueSet false to disable TLS verification (not recommended)

Creating a GitLab Personal Access Token

  1. Navigate to Access Tokens

  2. Create a Custom Token

    • Name: mcp-gitlab-crunchtools
    • Expiration: Set an appropriate date (90 days recommended)
    • Scopes: Select scopes based on your needs
  3. Scope Selection

    ScopeAccess LevelCapabilities
    read_apiRead-onlyList/view projects, issues, MRs, pipelines
    apiFull accessAll features including create/update
  4. Copy and Store Token

    • Copy the token immediately (starts with glpat-)
    • Store securely in a password manager

Add to Claude Code

bash
claude mcp add mcp-gitlab-crunchtools \    --env GITLAB_TOKEN=your_token_here \    -- uvx mcp-gitlab-crunchtools

For self-hosted GitLab:

bash
claude mcp add mcp-gitlab-crunchtools \    --env GITLAB_TOKEN=your_token_here \    --env GITLAB_URL=https://gitlab.example.com \    -- uvx mcp-gitlab-crunchtools

For the container version:

bash
claude mcp add mcp-gitlab-crunchtools \    --env GITLAB_TOKEN=your_token_here \    -- podman run -i --rm -e GITLAB_TOKEN quay.io/crunchtools/mcp-gitlab

Usage Examples

List Your Projects

User: List my GitLab projectsAssistant: [calls list_projects with membership=true]

View Merge Requests

User: Show open merge requests for my-org/backendAssistant: [calls list_merge_requests with project_id="my-org/backend"]

Create an Issue

User: Create an issue in my-org/backend titled "Fix login timeout"Assistant: [calls create_issue with title="Fix login timeout"]

Check Pipeline Status

User: Show failed pipelines for my-org/apiAssistant: [calls list_pipelines with status="failed"]

Search Code

User: Search for "authentication" in my-org/backendAssistant: [calls search_project with scope="blobs"]

Security

This server was designed with security as a primary concern. See SECURITY.md for:

  • Threat model and attack vectors
  • Defense in depth architecture
  • Token handling best practices
  • Input validation rules
  • Audit logging

Key Security Features

  1. Token Protection

    • Stored as SecretStr (never accidentally logged)
    • Environment variable only (never in files or args)
    • Sanitized from all error messages
  2. Input Validation

    • Pydantic models for all inputs
    • Allowlist character validation for project/group IDs
    • Path traversal prevention
  3. API Hardening

    • HTTPS enforcement (except localhost)
    • TLS certificate validation
    • Request timeouts (30s)
    • Response size limits (10MB)
  4. Automated CVE Scanning

    • GitHub Actions scan dependencies weekly
    • Container security scanning with Trivy
    • CodeQL analysis for Python

Development

Setup

bash
git clone https://github.com/crunchtools/mcp-gitlab.gitcd mcp-gitlabuv sync

Run Tests

bash
uv run pytest

Lint and Type Check

bash
uv run ruff check src testsuv run mypy src

Build Container

bash
podman build -t mcp-gitlab .

License

AGPL-3.0-or-later

Contributing

Contributions welcome! Please read SECURITY.md before submitting security-related changes.

Links

來源:README.md,提交 4524e51

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Gitlab 整合