Skip to main content
Glama

MCP GitLab CrunchTools

GitLabプロジェクト、マージリクエスト、イシュー、パイプライン、検索のためのセキュアなMCP(Model Context Protocol)サーバー。あらゆるGitLabインスタンス(gitlab.com、セルフホスト、エンタープライズ)で動作します。

概要

このMCPサーバーは以下のように設計されています:

  • デフォルトでセキュア - 包括的な脅威モデリング、入力検証、トークン保護

  • サードパーティサービスなし - stdio経由でローカル実行され、APIトークンがマシンから外部に送信されることはありません

  • マルチインスタンス - 設定可能なURLにより、gitlab.com、セルフホストGitLab、エンタープライズインスタンスで動作

  • クロスプラットフォーム - Linux、macOS、Windowsで動作

  • 自動更新 - GitHub ActionsがCVEを監視し、依存関係を更新

  • コンテナ化 - Hummingbird Pythonベースイメージ上に構築され、quay.io/crunchtools/mcp-gitlabで利用可能

Related MCP server: gitlab-mcp-server

命名規則

コンポーネント

名前

GitHubリポジトリ

crunchtools/mcp-gitlab

コンテナ

quay.io/crunchtools/mcp-gitlab

Pythonパッケージ(PyPI)

mcp-gitlab-crunchtools

CLIコマンド

mcp-gitlab-crunchtools

モジュールインポート

mcp_gitlab_crunchtools

Hummingbirdを選ぶ理由

コンテナイメージはProject HummingbirdHummingbird Pythonベースイメージ上に構築されており、以下を提供します:

  • 最小限のCVE曝露 - 最小限のパッケージセットで構築され、攻撃対象領域を大幅に削減

  • 定期的な更新 - セキュリティパッチが迅速に適用されます

  • Python向けに最適化 - uvパッケージマネージャーで事前設定されたPython環境

  • 本番環境対応 - 適切なシグナル処理と非rootユーザーのデフォルト

機能

プロジェクト管理(5ツール)

  • list_projects - フィルタリングと検索でプロジェクトを一覧表示

  • get_project - IDまたはパスでプロジェクトの詳細を取得

  • list_project_branches - リポジトリのブランチを一覧表示

  • get_project_branch - 単一のブランチを取得

  • list_project_commits - 日付/パスフィルタリングでコミットを一覧表示

グループ管理(3ツール)

  • list_groups - フィルタリングでグループを一覧表示

  • get_group - IDまたはパスでグループの詳細を取得

  • list_group_projects - グループ内のプロジェクトを一覧表示(サブグループ対応)

マージリクエスト(7ツール)

  • list_merge_requests - 状態、ラベル、マイルストーンでMRを一覧表示

  • get_merge_request - MRの詳細を取得

  • create_merge_request - 新しいMRを作成

  • update_merge_request - MRのタイトル、説明、状態、担当者を更新

  • list_mr_notes - MRのコメントを一覧表示

  • create_mr_note - MRにコメントを追加

  • get_mr_changes - MRの差分を取得

イシュー(6ツール)

  • list_issues - 状態、ラベル、マイルストーン、担当者でイシューを一覧表示

  • get_issue - イシューの詳細を取得

  • create_issue - 新しいイシューを作成

  • update_issue - イシューのタイトル、説明、状態、ラベルを更新

  • list_issue_notes - イシューのコメントを一覧表示

  • create_issue_note - イシューにコメントを追加

パイプライン(4ツール)

  • list_pipelines - ステータスフィルタリングでCI/CDパイプラインを一覧表示

  • get_pipeline - パイプラインの詳細を取得

  • list_pipeline_jobs - パイプライン内のジョブを一覧表示

  • get_job_log - ジョブログの出力を取得

検索(2ツール)

  • search_global - アクセス可能なすべてのGitLabリソースを横断検索

  • search_project - 特定のプロジェクト内を検索

インストール

uvxを使用(推奨)

uvx mcp-gitlab-crunchtools

pipを使用

pip install mcp-gitlab-crunchtools

コンテナを使用

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

設定

環境変数

変数

必須

デフォルト

説明

GITLAB_TOKEN

はい

個人アクセストークン

GITLAB_URL

いいえ

https://gitlab.com

GitLabインスタンスURL

GitLab個人アクセストークンの作成

  1. アクセストークンに移動

  2. カスタムトークンを作成

    • 名前: mcp-gitlab-crunchtools

    • 有効期限: 適切な日付を設定(90日を推奨)

    • スコープ: ニーズに基づいてスコープを選択

  3. スコープの選択

    スコープ

    アクセスレベル

    機能

    read_api

    読み取り専用

    プロジェクト、イシュー、MR、パイプラインの一覧表示/閲覧

    api

    フルアクセス

    作成/更新を含むすべての機能

  4. トークンをコピーして保存

    • トークンをすぐにコピー(glpat-で始まります)

    • パスワードマネージャーに安全に保存

Claude Codeに追加

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

セルフホストGitLabの場合:

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

コンテナ版の場合:

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

使用例

プロジェクトを一覧表示

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

マージリクエストを表示

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

イシューを作成

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

パイプラインのステータスを確認

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

コードを検索

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

セキュリティ

このサーバーはセキュリティを最優先事項として設計されています。SECURITY.mdを参照してください:

  • 脅威モデルと攻撃ベクトル

  • 多層防御アーキテクチャ

  • トークン処理のベストプラクティス

  • 入力検証ルール

  • 監査ログ

主なセキュリティ機能

  1. トークン保護

    • SecretStrとして保存(誤ってログに記録されることはありません)

    • 環境変数のみ(ファイルや引数には決して保存されません)

    • すべてのエラーメッセージからサニタイズ

  2. 入力検証

    • すべての入力に対するPydanticモデル

    • プロジェクト/グループIDの許可リスト文字検証

    • パストラバーサル防止

  3. APIの堅牢化

    • HTTPSの強制(localhostを除く)

    • TLS証明書の検証

    • リクエストタイムアウト(30秒)

    • レスポンスサイズ制限(10MB)

  4. 自動CVEスキャン

    • GitHub Actionsが毎週依存関係をスキャン

    • Trivyによるコンテナセキュリティスキャン

    • Python向けCodeQL分析

開発

セットアップ

git clone https://github.com/crunchtools/mcp-gitlab.git
cd mcp-gitlab
uv sync

テストの実行

uv run pytest

リントと型チェック

uv run ruff check src tests
uv run mypy src

コンテナのビルド

podman build -t mcp-gitlab .

ライセンス

AGPL-3.0-or-later

貢献

貢献を歓迎します!セキュリティ関連の変更を提出する前に、SECURITY.mdをお読みください。

リンク

Install Server
A
license - permissive license
B
quality
B
maintenance

Maintenance

Maintainers
Response time
4dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    MCP server for interacting with GitLab API, supporting both self-hosted instances and gitlab.com. Provides tools for managing issues, merge requests, code review, pipelines, milestones, releases, search, and file access.
    514
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables interacting with GitLab repositories, merge requests, and code through natural language using MCP. Supports authentication with personal access tokens or OAuth2, and provides tools for listing projects, reading repository code, and analyzing merge request lifetimes.
    10
    4
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    Exposes the GitLab REST API to MCP clients for managing projects, issues, merge requests, repositories, and CI/CD pipelines. It is multi-tenant, allowing each user to authenticate with their own token and instance URL.

View all related MCP servers

Related MCP Connectors

  • GitLab Public MCP — wraps the GitLab REST API v4 (public endpoints, no auth)

  • Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.

  • A MCP server built for developers enabling Git based project management with project and personal…

View all MCP Connectors

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/crunchtools/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server