mcpservers

Setup guide

How to add an MCP server to VS Code

VS Code (with GitHub Copilot agent mode) supports MCP servers via a workspace .vscode/mcp.json file or your user settings.

Workspace: .vscode/mcp.json · or user settings.json

Steps

  1. 1

    Create the config

    Add a .vscode/mcp.json file in your workspace (or run "MCP: Add Server" from the Command Palette).

  2. 2

    Add the server

    Add a named entry under "servers" with the command and args. Use input variables for secrets so keys aren’t committed.

  3. 3

    Start the server

    Open the file — VS Code shows a "Start" code lens above each server. Click it (or it starts on demand in agent mode).

  4. 4

    Use in Copilot Chat

    Switch Copilot Chat to Agent mode; the MCP tools appear in the tools picker.

Example

{
  "servers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    }
  }
}

FAQ

How do I add an MCP server to VS Code?

Create .vscode/mcp.json in your workspace with the server under "servers", or run "MCP: Add Server" from the Command Palette. MCP tools are used by Copilot Chat in Agent mode.

Do I need GitHub Copilot for MCP in VS Code?

MCP tool use runs through Copilot Chat’s agent mode, so an active Copilot setup is the supported path today.

How do I keep API keys out of the committed config?

Use the "inputs" mechanism in mcp.json so VS Code prompts for secrets at runtime instead of storing them in the file.

Now pick a server to add

Browse verified MCP servers with copy-paste config for VS Code and other clients.

Browse connectors

Other clients