GitLab リモートMCPを VS Code にMCP接続する方法(設定手順)

GitLab のリモートMCPサーバーを VS Code に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。

🛡️ Official✓ VerifiedStreamable HTTPOAuth 2.1🛡️ A+~659 tok22 tools
Streamable HTTPhttps://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"
    }
  }
}

接続手順

  1. MCP 設定を開く — vscode: deeplink でワンクリックインストールするか、プロジェクトルートに .vscode/mcp.json を作成します。
  2. サーバーを追加 — { "servers": { "gitlab": { "type": "http", "url": https://gitlab.com/api/v4/mcp } } } と記述します。
  3. 認証を完了 — 初回呼び出し時に GitLab の OAuth 認可画面が開きます。許可するとツールが有効になります。
  4. 検証 — Copilot Chat を再起動して Agent モードでツールを確認します。オンライン Inspector に https://gitlab.com/api/v4/mcp を貼り付け、initialize と tools/list を実行して接続を確認します。

🧰 ツール一覧(22)

ToolSafetyDescriptionParameters
mcp_search
~34 tok
🟢 ReadSearch GitLab projects, issues and merge requests.—
get_project
~30 tok
🟢 ReadGet details of a GitLab project.—
list_projects
~28 tok
🟢 ReadList GitLab projects.—
get_file_contents
~31 tok
🟢 ReadRead a file from a repository.—
get_issue
~26 tok
🟢 ReadGet a GitLab issue.—
list_issues
~28 tok
🟢 ReadList issues of a project.—
create_issue
~28 tok
🟠 WriteCreate a GitLab issue.—
create_issue_note
~29 tok
🟠 WriteAdd a note to an issue.—
get_merge_request
~29 tok
🟢 ReadGet a merge request.—
list_merge_requests
~32 tok
🟢 ReadList merge requests of a project.—
create_merge_request
~30 tok
🟠 WriteCreate a merge request.—
create_merge_request_note
~33 tok
🟠 WriteAdd a note to a merge request.—
get_pipeline
~28 tok
🟢 ReadGet a CI/CD pipeline.—
list_pipelines
~30 tok
🟢 ReadList pipelines of a project.—
get_job
~26 tok
🟢 ReadGet a pipeline job.—
get_milestone
~29 tok
🟢 ReadGet a project milestone.—
list_milestones
~29 tok
🟢 ReadList project milestones.—
get_commit
~25 tok
🟢 ReadGet a commit.—
list_branches
~29 tok
🟢 ReadList repository branches.—
create_branch
~29 tok
🟠 WriteCreate a repository branch.—
list_tags
~27 tok
🟢 ReadList repository tags.—
run_pipeline
~29 tok
🟠 WriteTrigger a CI/CD pipeline.—

その他の接続ガイド