GitLab MCP Server
GitLab MCP サーバー
モデルコンテキストプロトコル(MCP)サーバーで、GitLabアカウントとの連携が可能になります。差分の取得、マージリクエストの分析、コードレビュー、変更のチェリーピックなど、様々な機能をご利用いただけます。これは、モデルコンテキストプロトコルプロジェクトのMCP GitLabサーバーの拡張版です。
特徴
この MCP サーバーは、次のような GitLab リポジトリと対話するための包括的なツールを提供します。
コアリポジトリの機能
プロジェクトの一覧表示と詳細の取得
ブランチとリポジトリの管理
マージリクエストと差分の操作
マージリクエストにコメントと内部メモを追加する
マージリクエスト属性の更新
問題の一覧表示と対処
リポジトリファイルの内容を取得して比較する
プロジェクト設定と統合
プロジェクト統合とサービスの管理
Slack 統合の設定と制御
Webhookの設定、更新、テスト
CI/CD管理
パイプライントリガートークンの操作
CI/CD変数の管理
パイプラインのトリガーと制御
ユーザーとグループの管理
ユーザーの一覧表示と管理
グループとグループメンバーシップの操作
プロジェクトメンバーとアクセスレベルの管理
Related MCP server: GitLab MCP Server
インストール
前提条件
Node.js (v16 以上)
npm
APIトークンを持つGitLabアカウント
設定
リポジトリをクローンします。
git clone https://github.com/rifqi96/mcp-gitlab.git
cd mcp-gitlab依存関係をインストールします:
npm installサーバーを構築します。
npm run buildGit フックをインストールします (オプションですが、貢献者には推奨されます)。
npm run install-hooksこれにより、src/utils/tools-data.ts が変更されたときに TOOLS.md を自動的に再生成するコミット前フックがインストールされます。
GitLab API トークンを設定します。
MCP設定ファイルにGitLab APIトークンを指定する必要があります。このトークンはGitLab APIの認証に使用されます。
Cursor/Roo Cline の場合、MCP 設定ファイル ( ~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json ) に以下を追加します。
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": [
"/path/to/mcp-gitlab/build/index.js"
],
"env": {
"GITLAB_API_TOKEN": "YOUR_GITLAB_API_TOKEN",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}Claude Desktop の場合、MCP 設定ファイル ( ~/Library/Application Support/Claude/claude_desktop_config.json ) に以下を追加します。
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": [
"/path/to/mcp-gitlab/build/index.js"
],
"env": {
"GITLAB_API_TOKEN": "YOUR_GITLAB_API_TOKEN",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}YOUR_GITLAB_API_TOKEN実際の GitLab API トークンに置き換えてください。トークンは GitLab アカウントの「設定」>「アクセストークン」で生成できます。
利用可能なツール
利用可能なツールとそのパラメータの完全なリストについては、 TOOLS.md を参照してください。
使用例
MCP をサポートする AI アシスタントでこれらのツールを使用する方法の例を次に示します。
プロジェクトをリストアップする
Could you list my GitLab projects?特定のマージリクエストに関する情報を取得する
Can you show me the details of merge request with ID 123 in the project 'mygroup/myproject'?マージリクエストにコメントを追加する
Please add a comment to merge request 123 in project 'mygroup/myproject' saying "This looks good, but please add more tests."マージリクエストに内部メモを追加する
Add an internal note to merge request 123 in project 'mygroup/myproject' that says "Needs security review before merging." Make sure it's only visible to team members.マージリクエストのタイトルと説明を更新する
Update the title of merge request 123 in project 'mygroup/myproject' to "Fix login page performance issues" and update the description to include "This PR addresses the slow loading times on the login page by optimizing database queries."ブランチを比較する
Compare the 'feature-branch' with 'main' in the project 'mygroup/myproject' and show me the differences.実践的なワークフロー
マージリクエストのレビュー
1. Show me merge request 123 in project 'mygroup/myproject'
2. Show me the changes for this merge request
3. Add an internal note with my review comments
4. Update the merge request title to better reflect the changesプロジェクト探索
1. List all my GitLab projects
2. Show me the details of project 'mygroup/myproject'
3. List all branches in this project
4. Show me the content of the README.md file in the main branch利用可能なリソース
gitlab://プロジェクト
API トークンでアクセスできる GitLab プロジェクトのリスト。
AIアシスタントとの統合
GitLab MCP サーバーは、モデル コンテキスト プロトコル (MCP) をサポートする AI アシスタントと統合されます。
機能
このサーバーを AI アシスタントに接続すると、アシスタントは次のことを実行できるようになります。
コードの表示と分析: アシスタントはファイルの内容を取得し、ブランチの違いを表示し、マージ リクエストの変更を調べて、コードをよりよく理解できるようにします。
コードレビューを提供する: アシスタントはマージリクエストを分析し、コメントや内部メモを通じてフィードバックを提供できます。
プロジェクト ワークフローの管理: アシスタントは、マージ リクエストの属性を更新したり、コメントを追加したり、リポジトリ管理タスクを支援したりできます。
プロジェクト構造の探索: アシスタントはプロジェクト、ブランチ、およびファイルを参照して、コードベースの構造を理解できます。
CI/CD と統合を構成する: アシスタントは、Webhook の設定、CI/CD 変数の管理、プロジェクト統合の構成に役立ちます。
AIアシスタント統合を最大限に活用する
プロジェクト、マージリクエスト、ファイルについて質問するときは具体的にしてください
可能な場合はプロジェクトIDまたはパスを指定します
特定のマージリクエストを分析するように依頼して、コードレビューにアシスタントを使用する
リポジトリの設定と管理タスクをアシスタントに手伝ってもらう
マージリクエストに関するチーム専用のフィードバックには内部メモを使用する
ライセンス
マサチューセッツ工科大学
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
- FlicenseAqualityDmaintenanceA Model Context Protocol server that enables management of GitLab Kanban boards through tools for listing, creating, updating, and deleting tasks, as well as adding comments.53
- AlicenseCqualityDmaintenanceAn MCP server that enables communication with GitLab repositories, allowing interaction with GitLab's API to manage projects, issues, and repositories through natural language.4592,9841MIT
- -license-quality-maintenanceA Model Context Protocol server that enables AI assistants to interact with GitLab repositories, allowing tasks like managing merge requests, searching projects, and creating comments through RESTful API integration.242
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with self-hosted GitLab instances through 30 specialized tools. It supports managing projects, merge requests, CI/CD pipelines, and repository operations via the GitLab REST API v4.30MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
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/rifqi96/mcp-gitlab'
If you have feedback or need assistance with the MCP directory API, please join our Discord server