VS Code (GitHub Copilot) MCP Setup: Connect MCP Servers to VS Code (GitHub Copilot)

MicrosoftProprietarystdioSSEStreamable HTTPOfficial site

What it is

Visual Studio Code with GitHub Copilot's agent mode, which can call MCP tools while editing across your workspace.

How MCP works in VS Code (GitHub Copilot)

Copilot agent mode in VS Code is an MCP client. It supports local stdio servers and remote HTTP/SSE servers, with input variables for prompting secrets at first run.

Unlike most clients, VS Code uses a servers key rather than mcpServers, and supports ${input:...} variables for API keys.

Config file location

.vscode/mcp.json in your workspace (or the user-profile mcp.json) uses a servers object — note the root key is servers, not mcpServers.

Add your first server

A good first server is Playwright MCP — Microsoft's browser automation server. It runs locally over stdio via npx, needs no API key, and gives the agent a real browser to drive. Here is the verified VS Code (GitHub Copilot) config:

{
  "servers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

Restart or reload VS Code (GitHub Copilot) after saving, then confirm the server's tools show up. Swap in any other server from the directory using the same structure.

Transports & platforms

Transportsstdio, SSE, Streamable HTTP
PlatformsmacOS, Windows, Linux
LicenseProprietary
VendorMicrosoft

FAQ

Does VS Code (GitHub Copilot) support MCP?

Yes. VS Code (GitHub Copilot) works as an MCP client over stdio, SSE, Streamable HTTP. Copilot agent mode in VS Code is an MCP client. It supports local stdio servers and remote HTTP/SSE servers, with input variables for prompting secrets at first run.

Where is the VS Code (GitHub Copilot) MCP config?

.vscode/mcp.json in your workspace (or the user-profile mcp.json) uses a servers object — note the root key is servers, not mcpServers. The verified example above shows the exact structure it expects.

Which MCP servers work with VS Code (GitHub Copilot)?

Any server that speaks a transport VS Code (GitHub Copilot) supports (stdio, SSE, Streamable HTTP). Browse the MCP server directory on this site to find databases, browser automation, API integrations, and dev tools, then add them using the config format above.

Keep exploring