How to Install MCP Servers in VS Code (GitHub Copilot)

How to add MCP servers to VS Code for GitHub Copilot agent mode — the .vscode/mcp.json file, the servers key, and enabling tools in Copilot Chat.

Where the config lives

{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
    }
  }
}

Step by step

  1. 1

    Create the MCP config

    Run "MCP: Add Server" from the Command Palette, or create .vscode/mcp.json in your project. Note that VS Code nests servers under a "servers" key — not "mcpServers" like other clients.

  2. 2

    Add the server definition

    Add a named entry with a "command" and "args". For secrets, use VS Code "inputs" so the value is prompted for and stored securely instead of hard-coded in the file.

  3. 3

    Enable it in Copilot agent mode

    Open Copilot Chat and switch to Agent mode, then start the server from the MCP prompt. The tools become available for Copilot to call during agent tasks.

Popular MCP servers to try in VS Code (GitHub Copilot)

  1. 1
    Moxie Docs MCP
    MCP & Agent Skills for Automated Documentation, and codebase conventions + context
    7 4 2
  2. 2
    S
    Server Gitlabmodelcontextprotocol
    GitLab platform integration for project management and CI/CD operations
    4 4 2
  3. 3
    S
    Server Gitmodelcontextprotocol
    Direct Git repository operations including reading, searching, and analyzing local repositories
    3 0 1
  4. 4
    A
    Astronomy Oraclegregario
    Accurate astronomical catalog data and observing session planner. 13,000+ deep-sky objects from OpenNGC with deterministic visibility, rise/transit/set, and alt/az calculations. npx astronomy-oracle
    3 1 0
  5. 5
    M
    Mcp@agentfund
    Fundraising infrastructure for AI agents on Solana — campaigns, x402 donations, and on-chain reputation. MCP tools for registering agents, creating campaigns, and donating via the x402 pay-to-call flow, backed by Anchor programs (agentregistry, escrow, reputation). npx -y @agentfund/mcp
    5 0 0
  6. 6
    G
    GhidraMCP13bm
    MCP server for integrating Ghidra with AI assistants. This plugin enables binary analysis, providing tools for function inspection, decompilation, memory exploration, and import/export analysis via the Model Context Protocol.
    4 0 0
  7. 7
    C
    Codebeamer Mcp3KniGHtcZ
    Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.
    4 0 0
  8. 8
    S
    Server Filesystemmodelcontextprotocol
    Direct local file system access.
    4 0 0

Frequently asked questions

How do I add an MCP server to VS Code?

Create a .vscode/mcp.json in your project (or run "MCP: Add Server" from the Command Palette) and add the server under a "servers" key. MCP tools are used from GitHub Copilot Chat in Agent mode.

Why does VS Code use "servers" instead of "mcpServers"?

VS Code adopted its own schema and nests MCP servers under a "servers" key, with support for a separate "inputs" array for prompted secrets. If you copy a config from Claude or Cursor, rename "mcpServers" to "servers".

Do I need Copilot agent mode to use MCP in VS Code?

Yes — MCP tools are invoked from Copilot Chat in Agent mode. Make sure you have Copilot enabled and select Agent mode before expecting the server tools to be called.

Install MCP servers in other clients

Claude DesktopClaude CodeCursorWindsurf