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またはパスを指定します
特定のマージリクエストを分析するように依頼して、コードレビューにアシスタントを使用する
リポジトリの設定と管理タスクをアシスタントに手伝ってもらう
マージリクエストに関するチーム専用のフィードバックには内部メモを使用する
ライセンス
マサチューセッツ工科大学
Available Tools
41 toolsgitlab_add_group_memberC
Add a user to a group
Inputs: access_level (required), group_id (required), user_id (required).
gitlab_add_project_memberC
Add a user to a project
Inputs: access_level (required), project_id (required), user_id (required).
gitlab_add_webhookC
Add a new webhook to a project
Inputs: project_id (required), url (required), enable_ssl_verification, issues_events, +3 more.
gitlab_compare_branchesC
Compare branches, tags or commits
Inputs: from (required), project_id (required), to (required).
gitlab_create_cicd_variableC
Create a new CI/CD variable
Inputs: key (required), project_id (required), value (required), masked, +1 more.
gitlab_create_merge_request_noteC
Add a comment to a merge request
Inputs: body (required), merge_request_iid (required), project_id (required).
gitlab_create_merge_request_note_internalB
Add a comment to a merge request with option to make it an internal note
Inputs: body (required), merge_request_iid (required), project_id (required), internal.
gitlab_create_trigger_tokenC
Create a new pipeline trigger token
Inputs: description (required), project_id (required).
gitlab_delete_cicd_variableC
Delete a CI/CD variable
Inputs: key (required), project_id (required).
gitlab_delete_trigger_tokenC
Delete a pipeline trigger token
Inputs: project_id (required), trigger_id (required).
gitlab_delete_webhookC
Delete a webhook
Inputs: project_id (required), webhook_id (required).
gitlab_disable_slack_integrationC
Disable Slack integration for a project
Inputs: project_id (required).
gitlab_get_cicd_variableB
Get a specific CI/CD variable
Inputs: key (required), project_id (required).
gitlab_get_groupC
Get details of a specific group
Inputs: group_id (required).
gitlab_get_integrationC
Get integration details for a project
Inputs: integration (required), project_id (required).
gitlab_get_merge_requestB
Get details of a specific merge request
Inputs: merge_request_iid (required), project_id (required).
gitlab_get_merge_request_changesC
Get changes (diff) of a specific merge request
Inputs: merge_request_iid (required), project_id (required).
gitlab_get_projectC
Get details of a specific GitLab project
Inputs: project_id (required).
gitlab_get_repository_fileC
Get content of a file in a repository
Inputs: file_path (required), project_id (required), ref.
gitlab_get_trigger_tokenC
Get details of a pipeline trigger token
Inputs: project_id (required), trigger_id (required).
gitlab_get_userC
Get details of a specific user
Inputs: user_id (required).
gitlab_get_webhookC
Get details of a specific webhook
Inputs: project_id (required), webhook_id (required).
gitlab_list_branchesC
List branches of a GitLab project
Inputs: project_id (required), search.
gitlab_list_cicd_variablesC
List CI/CD variables for a project
Inputs: project_id (required).
gitlab_list_group_membersC
List members of a group
Inputs: group_id (required).
gitlab_list_groupsC
List GitLab groups
Inputs: owned, search.
gitlab_list_integrationsB
List all available project integrations/services
Inputs: project_id (required).
gitlab_list_issuesC
List issues in a GitLab project
Inputs: project_id (required), labels, state.
gitlab_list_merge_requestsC
List merge requests in a GitLab project
Inputs: project_id (required), scope, state.
gitlab_list_project_membersC
List members of a project
Inputs: project_id (required).
gitlab_list_projectsB
List GitLab projects accessible to the user
Inputs: membership, owned, per_page, search.
gitlab_list_trigger_tokensC
List pipeline trigger tokens
Inputs: project_id (required).
gitlab_list_usersC
List GitLab users
Inputs: active, search.
gitlab_list_webhooksC
List webhooks for a project
Inputs: project_id (required).
gitlab_test_webhookC
Test a webhook
Inputs: project_id (required), webhook_id (required).
gitlab_trigger_pipelineC
Trigger a pipeline run
Inputs: project_id (required), ref (required), token (required), variables.
gitlab_update_cicd_variableC
Update a CI/CD variable
Inputs: key (required), project_id (required), value (required), masked, +1 more.
gitlab_update_merge_requestC
Update a merge request title and description
Inputs: merge_request_iid (required), project_id (required), description, title.
gitlab_update_slack_integrationC
Update Slack integration settings for a project
Inputs: project_id (required), webhook (required), channel, username.
gitlab_update_trigger_tokenC
Update a pipeline trigger token
Inputs: description (required), project_id (required), trigger_id (required).
gitlab_update_webhookC
Update an existing webhook
Inputs: project_id (required), url (required), webhook_id (required), enable_ssl_verification, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Most tools have distinct purposes targeting specific resources and actions, but there is some overlap: gitlab_create_merge_request_note and gitlab_create_merge_request_note_internal are nearly identical, differing only in an optional parameter, which could cause confusion. Otherwise, tools are well-differentiated across groups, projects, CI/CD, webhooks, and integrations.
All tools follow a consistent gitlab_verb_noun pattern with snake_case throughout, such as gitlab_list_projects, gitlab_create_cicd_variable, and gitlab_update_webhook. This uniformity makes the tool set predictable and easy to navigate, with no deviations in style or structure.
With 41 tools, the count is high for a GitLab server, bordering on heavy. While it covers many aspects of GitLab's API, it may overwhelm agents with its breadth. A more focused set of 15-25 tools might be more manageable, but it's not extreme like 50+ tools.
The tool set provides comprehensive coverage for GitLab operations, including CRUD for groups, projects, members, CI/CD variables, webhooks, trigger tokens, and integrations. It supports full lifecycles with create, get, update, delete, and list operations, leaving no obvious gaps for core workflows in the domain.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Read projects, issues, merge requests and pipelines; create issues and comments in GitLab.
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
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.451MIT
- -licenseNot gradedqualityNot gradedmaintenanceA 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.21 npm2-
- AlicenseBqualityCmaintenanceA 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