---
title: "VS Code (GitHub Copilot)のMCP設定：ファイルパス、キー、例 · DotsAgent"
description: "MicrosoftのMCPサーバーをVS Code (GitHub Copilot)に追加する方法を紹介します。設定ファイルの場所、トップレベルキーと形式、リモートサーバーのOAuth対応、設定例を確認できます。"
url: https://dotsagent.io/ja/mcp/clients/vscode-copilot
---

Microsoft

# VS Code (GitHub Copilot)にMCPサーバーを追加

VS Code は、ワークスペース内の .vscode/mcp.json、ユーザープロファイルの mcp.json、または新しいポータブル形式の .mcp.json ファイルを読み込みます。

- **macOS**: `User profile mcp.json (open via 'MCP: Open User Configuration'); portable: ~/.copilot/mcp-config.json`
- **Windows**: `User profile mcp.json (open via 'MCP: Open User Configuration'); portable: ~/.copilot/mcp-config.json`
- **Linux**: `User profile mcp.json (open via 'MCP: Open User Configuration'); portable: ~/.copilot/mcp-config.json`
- **プロジェクトファイル**: `.vscode/mcp.json (key 'servers') or portable .mcp.json (key 'mcpServers')`
- **トップレベルキー**: `servers`
- **形式**: json
- **リモートサーバーのOAuth**: 

## 設定例

この例では、GitHub のホスト型サーバーと Playwright のローカルサーバーを、このクライアントが想定する形式で追加します。

`.vscode/mcp.json`

```
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    },
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

`shell`

```
code --add-mcp '{"name":"github","type":"http","url":"https://api.githubcopilot.com/mcp/"}'
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
```

## 注意点と仕様

- .vscode/mcp.json では servers キーを使用します。ポータブル形式の .mcp.json と ~/.copilot/mcp-config.json では mcpServers を使用します。
- トップレベルの inputs 配列を使うとシークレットの入力を求められるため、キーをファイルに記載せずに済みます。
- ガイド付きのサーバー追加フローでは、.vscode/mcp.json とユーザープロファイルのファイルは非推奨と表示され、ポータブル形式が推奨されます。どちらも引き続き使用できます。
- VS Code は、Claude Desktop、Copilot CLI、Cursor、Windsurf 用にすでに設定されたサーバーも検出します。
- code --add-mcp は、JSON 文字列からサーバーを追加します。

[VS Code (GitHub Copilot)の設定を作成 →](https://dotsagent.io/ja/mcp/config#client=vscode-copilot)

## その他のクライアント

[Claude Desktop](https://dotsagent.io/ja/mcp/clients/claude-desktop)

[Claude Code](https://dotsagent.io/ja/mcp/clients/claude-code)

[Cursor](https://dotsagent.io/ja/mcp/clients/cursor)

[Windsurf / Devin Desktop](https://dotsagent.io/ja/mcp/clients/windsurf)

[Zed](https://dotsagent.io/ja/mcp/clients/zed)

[OpenAI Codex CLI](https://dotsagent.io/ja/mcp/clients/codex-cli)

[Gemini CLI](https://dotsagent.io/ja/mcp/clients/gemini-cli)

[ChatGPT](https://dotsagent.io/ja/mcp/clients/chatgpt)

[OpenClaw](https://dotsagent.io/ja/mcp/clients/openclaw)

[Cline](https://dotsagent.io/ja/mcp/clients/cline)

[Continue](https://dotsagent.io/ja/mcp/clients/continue)

[JetBrains AI Assistant](https://dotsagent.io/ja/mcp/clients/jetbrains-ai)

## 情報源

1. [code.visualstudio.com](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration)/docs/copilot/reference/mcp-configuration
2. [code.visualstudio.com](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)/docs/copilot/customization/mcp-servers

AIエージェント開発者向けの独立したリファレンスです。ここに記載されているいずれのベンダーとも提携していません。

© 2026 DotsAgent · 確認日: 2026年10月1日
