公式の GitLab MCP サーバーはありますか?
はい。GitLab は GitLab.com、Self-Managed、Dedicated で独自の MCP サーバーを `/api/v4/mcp` として提供しています。このページの `@modelcontextprotocol/server-gitlab` はアーカイブ済みのリファレンス実装で、GitLab の製品ではありません。

@modelcontextprotocol
基本情報
Model Context Protocol サーバー
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}Create or update a single file in a GitLab project
Search for GitLab projects
Create a new GitLab project
Get the contents of a file or directory from a GitLab project
Push multiple files to a GitLab project in a single commit
Create a new issue in a GitLab project
Create a new merge request in a GitLab project
Fork a GitLab project to your account or specified namespace
Create a new branch in a GitLab project
GitLab MCP Server は、AI アシスタントが GitLab API を通じてプロジェクトの検索、ファイルの読み取り、コミットのプッシュ、issue・ブランチ・フォーク・マージリクエストの作成を行えるようにする gitlab mcp 連携です。このページはアーカイブ済みのリファレンス版で、現在は GitLab 公式のメンテナンスされた MCP サーバーがあります。
このページに掲載されているパッケージ @modelcontextprotocol/server-gitlab は、Model Context Protocol プロジェクトが公開したリファレンスサーバーの一つです。現在は servers-archived リポジトリに移されており、同リポジトリは収録サーバーがメンテナンスされておらず、セキュリティ保証もないと明記しています。npm のパッケージもサポート終了と表示されています。新規導入には、GitLab 本体に組み込まれたリモートエンドポイント /api/v4/mcp である公式 GitLab MCP サーバーを使ってください。以下では両方を説明します。
前提条件:GitLab.com ではトップレベルグループで、GitLab Self-Managed と GitLab Dedicated ではインスタンスで、MCP サーバーへのアクセスを許可しておく必要があります。認証は OAuth です。初回接続時にクライアントが自身を登録し(OAuth 2.0 Dynamic Client Registration)、ブラウザが開くのでリクエストを承認します。MCP ツール権限を持つきめ細かい個人アクセストークンも使えますが、従来型の個人アクセストークン、プロジェクトアクセストークン、グループアクセストークンは使えません。
以下の例では、<gitlab.example.com> を gitlab.com またはセルフホストのインスタンス URL に置き換えてください。
claude mcp add -s user --transport http GitLab https://<gitlab.example.com>/api/v4/mcp
claude を起動して /mcp と入力し、GitLab サーバーを選んでブラウザで認可を承認します。
Node.js 20 以降が必要です。claude_desktop_config.json に次を追加し、Claude Desktop を再起動します。
{
"mcpServers": {
"GitLab": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://<gitlab.example.com>/api/v4/mcp"]
}
}
}
Settings > Cursor Settings > Tools & MCP で、mcp.json に新しい MCP サーバーを追加します。
{
"mcpServers": {
"GitLab": {
"type": "http",
"url": "https://<gitlab.example.com>/api/v4/mcp"
}
}
}
コマンドパレットを開いて MCP: Add Server を実行し、HTTP を選んで https://<gitlab.example.com>/api/v4/mcp を入力、ID を GitLab にして OAuth リクエストを承認します。
codex mcp add GitLab --url "https://<gitlab.example.com>/api/v4/mcp"
codex mcp login GitLab
GitLab のドキュメントでは、~/.codex/config.toml の [features] で rmcp_client を有効にするよう案内されています。
api スコープ(読み取り専用なら read_api)の GitLab 個人アクセストークンを作成し、npx でパッケージを実行します。
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gitlab"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}
GITLAB_API_URL は任意で、セルフホストのインスタンスでのみ必要です。README には Docker イメージ mcp/gitlab も記載されています。
https://<instance>/api/v4/mcp に接続して OAuth でサインインするだけです。core、merge_requests、work_items、repository、ci などのツールグループ(toolsets)を、X-Gitlab-Enabled-Mcp-Server-Toolsets ヘッダーで選択できます。X-Gitlab-Mcp-Server-Tool-Name-Prefix ヘッダーでツール名に接頭辞を付けられ、複数の GitLab インスタンスを接続するときに便利です。アーカイブ済みリファレンスサーバーは、このページに表示されている 9 つのツールを提供します。
search_repositories、create_repository、fork_repository、create_branch、get_file_contents。create_or_update_file は 1 ファイルを書き込み、push_files は複数ファイルを 1 回のコミットでプッシュします。create_issue と create_merge_request(ドラフト対応)。公式 GitLab MCP サーバーには、get_merge_request_diffs、save_merge_request_review、list_pipelines、get_job、list_work_items、semantic_search、Ultimate の脆弱性ツールなど、より多くのメンテナンスされたツールがあります。最新の一覧は GitLab の MCP サーバーツールのドキュメントを参照してください。
403 Forbidden(GitLab 19.4 以前では 404 Not Found):グループやインスタンスで MCP サーバーが許可されていないか、従来型の個人・プロジェクト・グループアクセストークンを使っています。前提条件を確認し、OAuth かきめ細かいトークンを使ってください。429 Too Many Requests: MCP または API のレート制限に達しています。制限がリセットされるまでリクエストは失敗します。mcp-remote で OAuth が失敗し続ける: rm -rf ~/.mcp-auth/mcp-remote* でローカルの認証キャッシュを削除して再接続します。GITLAB_PERSONAL_ACCESS_TOKEN に api スコープがあるか、セルフホストの場合 GITLAB_API_URL が /api/v4 で終わっているかを確認します。はい。GitLab は GitLab.com、Self-Managed、Dedicated で独自の MCP サーバーを `/api/v4/mcp` として提供しています。このページの `@modelcontextprotocol/server-gitlab` はアーカイブ済みのリファレンス実装で、GitLab の製品ではありません。
GitLab のドキュメントでは、公式サーバーは Free・Premium・Ultimate の各ティアが対象です。一部のツールグループは有料機能が必要で、たとえば脆弱性ツールには Ultimate が必要です。アーカイブ版パッケージは MIT ライセンスのオープンソースです。
いいえ。現在は servers-archived リポジトリにあり、更新やセキュリティ修正は提供されないと明記されています。npm でもサポート終了と表示されています。
公式サーバーはブラウザ経由の OAuth、または MCP ツール権限を持つきめ細かい個人アクセストークンを使います。アーカイブ版サーバーには `GITLAB_PERSONAL_ACCESS_TOKEN` に個人アクセストークンが必要です。
はい。GitLab は Claude Code、Claude Desktop、Cursor、VS Code の GitHub Copilot、Codex、Gemini CLI、Kiro、OpenCode、Zed、Amazon Q Developer の設定方法を公開しています。
公式の gitlab mcp server は HTTP 経由のリモートサーバーで、HTTP 非対応のクライアントは stdio で `mcp-remote` プロキシを使います。アーカイブ版サーバーは `npx` または Docker でローカルに stdio で動作します。
はい。公式サーバーの URL を自分のインスタンスに向けるか、アーカイブ版サーバーで `GITLAB_API_URL` を設定します。
ツールはあなたの権限で実行されるため、エージェントはあなたがアクセスできる範囲にしか届きません。GitLab はプロンプトインジェクション対策は利用者の責任だと警告しているので、信頼できる GitLab のコンテンツでのみツールを使ってください。

The system of record for AI-written software. A persistent graph of entities, relationships, changes, and provenance, so humans and AI agents see what a change touches before it merges. Beside Git today.

Model Context Protocol Servers
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
A Git MCP server for AI agents. STDIO & Streamable HTTP.
A Go-based MCP (Model Control Protocol) connector for Jira that enables AI assistants like Claude to interact with Atlassian Jira. This tool provides a seamless interface for AI models to perform common Jira operations including issue management, sprint planning, and workflow tra
コメント