GitLab リモートMCPサーバー – 公式URL・MCP接続設定・ツール一覧
GitLab は GitLab が提供するリモートMCPサーバー(公式運営、カテゴリ:開発者ツール・Git)です。エンドポイント https://gitlab.com/api/v4/mcp を通じて、AIエージェントが直接呼び出せる 22 個の構造化ツールを提供します。
このページでは、公式リモートエンドポイント、トランスポート、認証方式、全ツールスキーマ、リアルタイムの死活監視・セキュリティ監査結果を掲載し、Cursor・Claude Code・VS Code・ChatGPT など 10 のクライアントへのMCP接続手順を解説します。
- 提供元
- GitLab ↗
- カテゴリ
- 🛠️ 開発者ツール・Git
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"gitlab": {
"url": "https://gitlab.com/api/v4/mcp"
}
}
}claude mcp add --transport http gitlab https://gitlab.com/api/v4/mcp
Or add to .vscode/mcp.json:
{
"servers": {
"gitlab": {
"type": "http",
"url": "https://gitlab.com/api/v4/mcp"
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://gitlab.com/api/v4/mcp - Complete the browser OAuth 2.1 login flow when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://gitlab.com/api/v4/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"gitlab": {
"serverUrl": "https://gitlab.com/api/v4/mcp"
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"gitlab": {
"url": "https://gitlab.com/api/v4/mcp"
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.gitlab] url = "https://gitlab.com/api/v4/mcp"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"gitlab": {
"type": "streamableHttp",
"url": "https://gitlab.com/api/v4/mcp"
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"gitlab": {
"httpUrl": "https://gitlab.com/api/v4/mcp"
}
}
}🧰 GitLab のMCPツールとスキーマ(22)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| mcp_search ~34 tok | 🟢 Read | Search GitLab projects, issues and merge requests. | — |
| get_project ~30 tok | 🟢 Read | Get details of a GitLab project. | — |
| list_projects ~28 tok | 🟢 Read | List GitLab projects. | — |
| get_file_contents ~31 tok | 🟢 Read | Read a file from a repository. | — |
| get_issue ~26 tok | 🟢 Read | Get a GitLab issue. | — |
| list_issues ~28 tok | 🟢 Read | List issues of a project. | — |
| create_issue ~28 tok | 🟠 Write | Create a GitLab issue. | — |
| create_issue_note ~29 tok | 🟠 Write | Add a note to an issue. | — |
| get_merge_request ~29 tok | 🟢 Read | Get a merge request. | — |
| list_merge_requests ~32 tok | 🟢 Read | List merge requests of a project. | — |
| create_merge_request ~30 tok | 🟠 Write | Create a merge request. | — |
| create_merge_request_note ~33 tok | 🟠 Write | Add a note to a merge request. | — |
| get_pipeline ~28 tok | 🟢 Read | Get a CI/CD pipeline. | — |
| list_pipelines ~30 tok | 🟢 Read | List pipelines of a project. | — |
| get_job ~26 tok | 🟢 Read | Get a pipeline job. | — |
| get_milestone ~29 tok | 🟢 Read | Get a project milestone. | — |
| list_milestones ~29 tok | 🟢 Read | List project milestones. | — |
| get_commit ~25 tok | 🟢 Read | Get a commit. | — |
| list_branches ~29 tok | 🟢 Read | List repository branches. | — |
| create_branch ~29 tok | 🟠 Write | Create a repository branch. | — |
| list_tags ~27 tok | 🟢 Read | List repository tags. | — |
| run_pipeline ~29 tok | 🟠 Write | Trigger a CI/CD pipeline. | — |
🛡️ セキュリティ評価・品質・コンテキスト監査
- No prompt-injection or hidden-character anomalies detected in tool descriptions
- Streamable HTTP primary endpoint (current 2025-03-26 transport)
- OAuth 2.1 with PKCE S256 enforced
- Official first-party endpoint operated by the vendor
- Manually verified by RemoteMCP.net
🔐 OAuth 2.1 とセキュリティ
- 認証方式
- OAuth 2.1
- 動的クライアント登録(DCR)
- —
- PKCE S256
- ✅ 対応
- 保護リソースメタデータ
- https://gitlab.com/.well-known/oauth-protected-resource
📡 公式リモートエンドポイントとトランスポート
リモートエンドポイント https://gitlab.com/api/v4/mcp は Streamable HTTP(2025-03-26 仕様) を採用。Streamable HTTP は単一の POST エンドポイントで JSON-RPC の双方向通信を完結する現行推奨トランスポートで、npx mcp-remote ブリッジなしに Claude・Cursor・VS Code などへ URL だけでMCP接続できます。
接続前にエンドポイントを オンライン MCP Inspector に貼り付けて initialize / tools/list のハンドシェイクを確認することを推奨します。
🔐 認証・権限フロー
認証方式は OAuth 2.1 です。初回接続時にクライアントが 401 チャレンジを受け取り、WWW-Authenticate ヘッダーから RFC 9728 の保護リソースメタデータを解決。続けて認可サーバー発見(RFC 8414)、PKCE S256 によるブラウザ認可が自動で行われます。ブラウザで一度承認するだけで、キーの手動貼り付けは不要です。
🛡️ コンテキスト消費とセキュリティ監査
このサーバーには現在 22 個のツールが登録されており、定義の合計は約 659 トークン。リクエストごとにモデルのシステムプロンプトへ注入されます。セキュリティ評価は A+(公式運営ソース)。ツール名とスキーマが簡潔なほどコンテキストウィンドウへの「税」は低くなります。feecalculator.app で呼び出しあたりのコストも試算できます。
🧩 主要クライアントへのMCP接続
GitLab について、Cursor / Claude Code / VS Code / ChatGPT / Windsurf / Kiro / Codex / Cline / Gemini など 10 クライアント向けの設定を自動生成しています。ワンクリック deeplink、claude mcp add コマンド、JSON / TOML スニペットから選べます。代表的なツール:mcp_search、get_project、list_projects、get_file_contents、get_issue など。
📖 GitLab の詳細
GitLab — Remote MCP Server
GitLab's official MCP server gives agents first-party access to repositories, merge requests, issues, pipelines and code search across gitlab.com and self-managed instances. The remote endpoint means there is nothing to install — point your MCP client at the URL and complete the OAuth consent screen. GitLab operates and versions the server themselves, so tool coverage tracks their API surface as it ships.
Official GitLab Endpoint & Transport Architecture
- Endpoint URL:
https://gitlab.com/api/v4/mcp - Transport: Streamable HTTP
Streamable HTTP is the current MCP transport (2025-03-26 spec): a single URL accepts JSON-RPC POSTs and may stream responses over SSE, so one endpoint serves both simple and streaming workloads. GitLab does not publish a separate legacy SSE endpoint, so your client must speak Streamable HTTP.
Authentication, Scopes & Permission Boundaries
GitLab uses OAuth 2.1 — the first request returns a 401 Unauthorized challenge with a WWW-Authenticate header pointing at the authorization metadata. Compliant clients (Cursor, Claude, VS Code, ChatGPT) handle the whole flow — PKCE — and simply open a browser consent screen.
All 0 cataloged tools are read-only — GitLab cannot mutate your account data, which makes it safe to connect broadly.
Common Troubleshooting & Connection Tips
- 401 Unauthorized on connect — that's expected; the server is OAuth-protected. Let your client complete the browser consent flow, or inspect the endpoint in our OAuth debugger to see the exact
WWW-Authenticatechallenge. - "Session expired" / stale
Mcp-Session-Id— just re-sendinitialize; stateless clients can ignore session headers entirely. - Requires the
mcpOAuth scope on GitLab 18.x+.
🚀 GitLab リモートMCPへの接続方法
- リモートエンドポイントを取得 — 公式エンドポイント https://gitlab.com/api/v4/mcp をコピーします。
- クライアント設定に追加 — Cursor の mcp.json / Claude Code CLI / 各クライアントに URLを追加します(下記クライアント別ガイド参照)。
- 認可して検証 — ブラウザで OAuth 認可を完了後、当サイトの Inspector で initialize と tools/list を実行して接続を確認します。
🔌 GitLab × クライアント別MCP接続ガイド
❓ よくある質問
GitLab のリモートMCPサーバーは公式ですか?
このエントリは「公式運営」と表示されています。エンドポイントは GitLab 公式が運営しています。掲載エンドポイントはすべて実際の MCP initialize ハンドシェイクで検証済みです。
Claude / Cursor で GitLab にMCP接続するには?
リモートエンドポイント https://gitlab.com/api/v4/mcp をコピーします。Claude Code では claude mcp add --transport http gitlab https://gitlab.com/api/v4/mcp を実行。Cursor ではワンクリック deeplink か ~/.cursor/mcp.json に { "mcpServers": { "gitlab": { "url": "https://gitlab.com/api/v4/mcp" } } } を追加します。初回呼び出し時に OAuth 2.1 の認可画面が自動で開きます。
接続時に 401 が返る/キーを要求される場合は?
401 は OAuth 2.1 による正常なチャレンジです。クライアントが RFC 9728 メタデータに従って自動的に認可を行います。認可が途中で止まる場合は OAuth 2.1 Debugger で PRM / DCR / CORS の設定を確認してください。
ローカル stdio MCP とリモート MCP の違いは?
ローカル MCP は npx / uvx で起動する stdio 子プロセスで、ローカルランタイムが必要で API キーを平文で設定ファイルに書きます。リモート MCP は GitLab がホストする HTTPS エンドポイントで、インストール不要・OAuth 2.1 対応・同一 URL をデスクトップとモバイルで共用できます。詳しくは ローカル vs リモート MCP 比較 をご覧ください。