Guides › VS Code (GitHub Copilot)

How to add MCP servers to VS Code with GitHub Copilot

VS Code now runs Copilot chat on the Copilot harness. It reads MCP servers in the same mcpServers format most other apps use. The older .vscode/mcp.json file with a servers key belongs to the Local harness, which is deprecated and will be removed in February 2027.

Checked against the official docs on 2026-11-26. Apps change often; the sources are linked at the bottom.

Where the config file lives

Your servers, all workspaces (Copilot Global)~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json)
Shared with a workspace.mcp.json at the workspace root
Old format (deprecated Local harness).vscode/mcp.json or the profile mcp.json, with a "servers" key
Top-level keymcpServers

Add a remote server (a URL)

  1. Open the MCP servers list
    With Copilot selected in chat, run Chat: Open Customizations from the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and select MCP Servers. Select Add Server (+) in the User group.
  2. Choose HTTP and enter the URL
    For a first test, VS Code's docs suggest the free Microsoft Learn server: https://learn.microsoft.com/api/mcp. Enter a server ID such as microsoftLearn.
  3. Pick where to save it
    Choose Global → Copilot Global for yourself, or the workspace-root .mcp.json to share with a team (the guided flow offers it only while the experimental chat.mcp.workspaceRootConfig.enabled setting is on; you can always create the file yourself). Accept the trust prompt if you trust the server.
  4. Or edit the file yourself
    Remote servers use "type": "http".
    {
      "mcpServers": {
        "context7": {
          "type": "http",
          "url": "https://mcp.context7.com/mcp",
          "tools": ["*"]
        }
      }
    }

Add a local server (runs on your computer)

  1. Add a command (stdio) server
    In the same Add Server flow, choose Command (stdio) and enter the launch command, for example npx -y @playwright/mcp@latest. Or add it to the file:
    {
      "mcpServers": {
        "playwright": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@playwright/mcp@latest"],
          "tools": ["*"]
        }
      }
    }
  2. Pass secrets as environment variable references
    Use ${NAME} (or ${NAME:-default}) in env, args or headers, and set the variable on your computer. Don't paste real keys into shared files.
    "env": { "API_KEY": "${MY_API_KEY}" }

Tips

  • Test it: ask Copilot to use the server for a small task, then expand the tool call to confirm it really ran.
  • Editor-only fields such as inputs, envFile and sandboxEnabled belong to the old .vscode/mcp.json format, so don't copy them into mcpServers files.
  • Moving from .vscode/mcp.json: see "servers" vs "mcpServers".
  • Since VS Code 1.147 (November 18, 2026), Skills over MCP is on by default: a server can provide skills to the model. The first time you connect to such a server, VS Code asks before adding its skills to the model's context; they then appear on the Skills tab of the Agent Customizations editor. To opt out, turn off the chat.agentHost.mcpSkills.enabled setting.
  • Since VS Code 1.148 (November 25, 2026), MCP Apps have a fullscreen button that moves the app into the editor area (or the Secondary Side Bar in the Agents window).

Common problems in VS Code (GitHub Copilot)

Sources

Weekly MCP digest
New servers, breaking changes, and fresh fixes. One email a week.