mcp-gitlab-crunchtools
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リポジトリ | |
コンテナ |
|
Pythonパッケージ(PyPI) |
|
CLIコマンド |
|
モジュールインポート |
|
Hummingbirdを選ぶ理由
コンテナイメージはProject HummingbirdのHummingbird 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-crunchtoolspipを使用
pip install mcp-gitlab-crunchtoolsコンテナを使用
podman run -e GITLAB_TOKEN=your_token \
quay.io/crunchtools/mcp-gitlab設定
環境変数
変数 | 必須 | デフォルト | 説明 |
| はい | — | 個人アクセストークン |
| いいえ |
| GitLabインスタンスURL |
GitLab個人アクセストークンの作成
アクセストークンに移動
https://gitlab.com/-/user_settings/personal_access_tokens にアクセス
または:アバター > 設定 > アクセストークン
カスタムトークンを作成
名前:
mcp-gitlab-crunchtools有効期限: 適切な日付を設定(90日を推奨)
スコープ: ニーズに基づいてスコープを選択
スコープの選択
スコープ
アクセスレベル
機能
read_api読み取り専用
プロジェクト、イシュー、MR、パイプラインの一覧表示/閲覧
apiフルアクセス
作成/更新を含むすべての機能
トークンをコピーして保存
トークンをすぐにコピー(
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を参照してください:
脅威モデルと攻撃ベクトル
多層防御アーキテクチャ
トークン処理のベストプラクティス
入力検証ルール
監査ログ
主なセキュリティ機能
トークン保護
SecretStrとして保存(誤ってログに記録されることはありません)
環境変数のみ(ファイルや引数には決して保存されません)
すべてのエラーメッセージからサニタイズ
入力検証
すべての入力に対するPydanticモデル
プロジェクト/グループIDの許可リスト文字検証
パストラバーサル防止
APIの堅牢化
HTTPSの強制(localhostを除く)
TLS証明書の検証
リクエストタイムアウト(30秒)
レスポンスサイズ制限(10MB)
自動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をお読みください。
リンク
Maintenance
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
- Alicense-qualityDmaintenanceMCP 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.514MIT
- AlicenseAqualityCmaintenanceEnables 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.104MIT
- Flicense-qualityCmaintenanceExposes 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.
- FlicenseAqualityDmaintenanceEnables LLMs to interact with GitLab via MCP, providing access to issues, merge requests, pipelines, and repository files for browsing, searching, and reading details.19
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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