Set up your app
Adding MCP servers to VS Code
By Sophie Filer · Updated 1 Nov 2026
VS Code gives MCP tools to GitHub Copilot in agent mode. You add a server from the Command Palette or by editing mcp.json, and the one thing that trips everyone up is the key name: VS Code's own file uses "servers", not "mcpServers".
The short version
- Open the Command Palette (Cmd/Ctrl + Shift + P) and run MCP: Add Server.
- Choose Command (stdio) for a server that runs on your machine, or HTTP for a URL.
- Enter the command, such as
npx -y @playwright/mcp@latest, or the URL. - Give it a short ID, such as playwright, and choose where to save it: your user settings for every project, or the workspace to share it.
- Accept the trust prompt, then ask Copilot in agent mode to do something with it, naming the server.
Every server page on MCP Shelf has a VS Code tab with the mcp.json block to paste.
The mcp.json format
The workspace file is .vscode/mcp.json. MCP: Open User Configuration opens the one in your user profile. Both list servers under "servers", and each entry says its type:
{
"servers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
},
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}Newer versions of VS Code also read a portable format shared with other Copilot tools: .mcp.json at the root of the workspace, or ~/.copilot/mcp-config.json for your user. That one uses "mcpServers", like Claude and Cursor. Check which file you are editing before you paste.
| VS Code format | Portable Copilot format | |
|---|---|---|
| Files | .vscode/mcp.json, or mcp.json in your user profile | .mcp.json in the workspace root, or ~/.copilot/mcp-config.json |
| Top-level key | servers | mcpServers |
| Environment variables | ${env:NAME} | ${NAME} or ${NAME:-default} |
Prompts for keys (${input:...}) | Yes | No |
| envFile | Yes | No |
API keys without putting them in the file
In the VS Code format, an "inputs" entry makes VS Code ask for the key the first time the server starts and store it securely. Refer to it with ${input:id}:
{
"inputs": [
{ "type": "promptString", "id": "firecrawl-key", "description": "Firecrawl API key", "password": true }
],
"servers": {
"firecrawl": {
"type": "stdio",
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": { "FIRECRAWL_API_KEY": "${input:firecrawl-key}" }
}
}
}This keeps .vscode/mcp.json safe to commit. Copilot sessions that read the portable format cannot prompt, so a server that relies on ${input:...} is not passed to them; use an environment variable there instead.
Copying a config from Claude or Cursor
- Rename "mcpServers" to "servers".
- Add
"type": "stdio"to entries with a command, and"type": "http"to entries with a url. - Change
${env:NAME}placeholders only if you move the entry to the portable format, which uses${NAME}.
VS Code can also pick up servers you already set up elsewhere. MCP: Add Server has an Add from another application option, and the chat.mcp.discovery.enabled setting can read Claude Desktop, Cursor and Windsurf configs; all but the Copilot CLI are off by default.
From the command line
The code command adds a server to your user profile in one line, which is handy for setup scripts:
code --add-mcp '{"name":"playwright","type":"stdio","command":"npx","args":["-y","@playwright/mcp@latest"]}'When it does not work
- Run MCP: List Servers, pick the server and choose Show Output. Start-up errors and crashes show there.
- Pasted a Claude or Cursor block and nothing happened? Check the top-level key says "servers" in .vscode/mcp.json.
- A server whose tools changed still shows the old list: run MCP: Reset Cached Tools.
- Tools exist but Copilot never calls them: make sure you are in agent mode, check the server is ticked in the tools picker, and name the server in your prompt.
- At work, an organisation policy can limit which servers may run.
For the error messages themselves, see Fixing MCP server errors.
Popular servers to try in VS Code
| Server | What it gives your assistant | You need |
|---|---|---|
| Sequential Thinking | A numbered scratchpad the model fills in, revises and branches while it works. | Node.js 24 or newer (the package asks for it) |
| Context7 | Pulls current, version-specific library docs into the conversation. | Node.js 22.13 or newer for the ctx7 setup command, or Node.js 18 or newer for the local server alone |
| Playwright MCP | Microsoft's browser automation server: navigate, click, type, read. | Node.js 18 or newer |
| GitHub | GitHub's own server for repos, issues, pull requests and Actions. | A GitHub account |
| Blender MCP | Prompt-driven modelling in a running copy of Blender. | Blender 3.0 or newer |
| Serena | IDE-style "find symbol" and "edit symbol" for an agent, backed by language servers. | uv, which installs Serena and the Python 3.13 it runs on |
| MCP Toolbox for Databases | Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases. | Node.js 18 or newer |
| Framelink Figma MCP | Feeds Figma layout and styling to coding agents so the UI matches the design. | A Figma personal access token |
Questions
Why does VS Code use "servers" instead of "mcpServers"?
Its mcp.json is its own format, with room for "inputs" and other VS Code features next to the servers. The portable .mcp.json and ~/.copilot/mcp-config.json files use "mcpServers", like Claude and Cursor.
Do I need GitHub Copilot to use MCP servers in VS Code?
MCP tools are used by the AI chat in VS Code, which is GitHub Copilot, in agent mode. Without AI features turned on, there is nothing to call the tools.
Can VS Code limit what a local server can reach?
On macOS and Linux, yes: set "sandboxEnabled": true on a server in the VS Code format and list the folders it may write to and the domains it may reach.
For bots & AI agents
Machine-readable versions of this guide and MCP Shelf. Fetch these instead of parsing this page.
This guide (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs