GitLab リモートMCPを OpenAI Codex CLI にMCP接続する方法(設定手順)
GitLab のリモートMCPサーバーを OpenAI Codex CLI に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。
Streamable HTTPhttps://gitlab.com/api/v4/mcp
Install in Cursor →
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
Install in VS Code →
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"
}
}
}接続手順
- TOML を編集 —
~/.codex/config.tomlに[mcp_servers.gitlab]とurl = "https://gitlab.com/api/v4/mcp"を追記します。 - 資格情報を設定 — 初回呼び出し時に GitLab の OAuth 認可画面が開きます。許可するとツールが有効になります。
- 検証 — オンライン Inspector に
https://gitlab.com/api/v4/mcpを貼り付け、initialize と tools/list を実行して接続を確認します。
🧰 ツール一覧(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. | — |
その他の接続ガイド
GitHub MCP → OpenAI Codex CLI
接続先 OpenAI Codex CLI →
Notion MCP → OpenAI Codex CLI
接続先 OpenAI Codex CLI →
Linear MCP → OpenAI Codex CLI
接続先 OpenAI Codex CLI →
Figma Dev Mode MCP → OpenAI Codex CLI
接続先 OpenAI Codex CLI →
AWS Knowledge → OpenAI Codex CLI
接続先 OpenAI Codex CLI →
Stripe MCP → OpenAI Codex CLI
接続先 OpenAI Codex CLI →