How to Add a Remote MCP Server to VS Code
In .vscode/mcp.json the root key is servers, not mcpServers — paste the wrong one and it is silently ignored. Plus the portable .mcp.json and Copilot Global destinations the Copilot harness reads, the Copilot org policy that hides MCP entirely, and why tools only appear when Chat runs an agent.
Last verified November 4, 2026
How do I add a remote MCP server to VS Code?
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P), run MCP: Add Server, choose HTTP, paste the server's URL, name it, and pick Copilot Global as the destination. OAuth runs automatically on first connect. A few things then commonly go wrong, and all are silent rather than loud: in .vscode/mcp.json the root key is servers, not mcpServers; the entry needs both "type": "http" and url; and MCP tools only appear when Chat is running an agent. You need VS Code 1.101 or later.
Requirements, including the one an admin controls
- VS Code 1.101 or later. Earlier versions don't have full MCP support.
- A GitHub Copilot subscription. As of November 2026, on Copilot Business or Enterprise seats your organization's "MCP servers in Copilot" policy must be enabled — and it is disabled by default, so an admin may need to turn it on. GitHub's policy doc says Copilot Free, Pro, Pro+, and Max do not have their MCP access governed by this policy.
If the MCP commands are missing entirely rather than failing, one of those two is why.
Adding the server
From the Command Palette
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run MCP: Add Server
- Choose HTTP as the server type
- Paste the URL
- Name it, then choose where to save it. Copilot Global writes to
~/.copilot/mcp-config.json(or$COPILOT_HOME/mcp-config.json) and covers every workspace; VS Code recommends the portable destinations for new servers. A workspace-root .mcp.json destination is offered for team sharing — on some builds only after the experimentalchat.mcp.workspaceRootConfig.enabledsetting is on, so create the file by hand if it isn't listed. The flow still lists.vscode/mcp.jsonand your VS Code user profile, marked as deprecated destinations but still read.
You can also start the same guided flow from Chat: Open Customizations → MCP Servers → Add Server.
By editing the config
For a workspace-level server in the portable format, which other Copilot tools share, create .mcp.json at the project root:
{
"mcpServers": {
"my-server": {
"type": "http",
"url": "https://mcp.example.com/mcp"
}
}
}
The same mcpServers shape goes in ~/.copilot/mcp-config.json for every workspace.
For VS Code's own format, create .vscode/mcp.json with the servers root key:
{
"servers": {
"my-server": {
"type": "http",
"url": "https://mcp.example.com/mcp"
}
}
}
For a user-level config in VS Code's format, run MCP: Open User Configuration from the Command Palette and add the same servers block. There is also a shell one-liner:
code --add-mcp '{"name":"my-server","type":"http","url":"https://mcp.example.com/mcp"}'
In both formats, type and url are required for a remote server. VS Code tries Streamable HTTP first and falls back to SSE if the server doesn't support it.
The key that makes configs vanish
In .vscode/mcp.json, the root key is servers. Not mcpServers.
VS Code reads two formats: its own (.vscode/mcp.json and the user-profile mcp.json, root key servers) and a portable one (.mcp.json at the workspace root and ~/.copilot/mcp-config.json, root key mcpServers, shared with other Copilot tools). Paste an mcpServers block into .vscode/mcp.json and it is silently ignored — no error, no warning, no entry in the server list. The file is valid JSON, so nothing complains. VS Code's own docs say not to copy a configuration between the two formats without checking the format reference.
This is an easy one to hit when copying a working config from Cursor or Claude Code. The simplest fix is to save it as .mcp.json instead, where mcpServers is the right key.
Authorization
OAuth is automatic. VS Code's configuration reference says it handles the OAuth flow itself and opens a browser window for authorization on the first connection to the server; sign in and approve.
If the sign-in never appeared, restart the server so VS Code reconnects: run MCP: List Servers, pick the server, and choose Restart, or use the inline actions above the entry in .vscode/mcp.json. Servers in a trusted workspace's .vscode/mcp.json or .mcp.json start under Workspace Trust; servers from other sources show a trust dialog the first time they start, with a link to review the configuration before you allow it.
Using the tools
MCP tools appear when Chat is running an agent. Open Chat, pick the built-in Agent in the agent picker — VS Code renamed chat modes to agents in 2026, so older builds show the same thing as a mode picker with Ask, Edit, and Agent — and check the tools list.
Which list depends on the harness. New sessions in VS Code 1.143 and later use the Copilot harness by default; its built-in agents are Ask, Agent, and Plan, and its tools live under Chat: Open Customizations → Tools. A Local harness session uses Configure Tools in the chat input instead.
Copilot harness sessions read .mcp.json and ~/.copilot/mcp-config.json directly, and VS Code forwards servers from .vscode/mcp.json to them. VS Code documents one exception: servers that need interactive input (${input:...} or ${command:...} variables) are not forwarded, so a server that takes an API key through an input prompt is missing from a Copilot session. For an OAuth server, VS Code's migration guidance is to use the server's OAuth flow and authenticate when Copilot prompts you.
This catches people who connected successfully: the server is live, the tools exist, and they are invisible because Chat is not running an agent (on older builds: ask or edit mode). The agent is not optional here.
Visual Studio
Visual Studio (2022 17.14+ and Visual Studio 2026) supports the same servers through .mcp.json — global at %USERPROFILE%\.mcp.json, or per-solution in the solution directory. The root key is servers, same as VS Code's own format:
{
"servers": {
"my-server": {
"url": "https://mcp.example.com/mcp"
}
}
}
When Copilot Chat loads the server, click the "Authentication Required" CodeLens to run the browser OAuth flow. Note that Visual Studio disables MCP tools by default — enable them in the tool picker before use. The same Copilot org policy applies on Business and Enterprise seats.
A worked example
With a real server — Tempreon, a hosted MCP server that gives your AI a persistent memory of how you work — in the portable .mcp.json:
{
"mcpServers": {
"tempreon": {
"type": "http",
"url": "https://api.tempreon.com/functions/v1/tempreon-mcp/mcp"
}
}
}
Save, approve the browser prompt, make sure Chat is running the Agent, and the tools are there. The account-holder walkthrough, including the Visual Studio variant, is in the VS Code setup doc.
Sources
The dated claims on this page were checked against these vendor documents. Client UIs move constantly, so if one of these has changed since the date shown, trust the vendor over this page — and tell us.
- Add MCP servers in VS Code — read 2026-11-04
- MCP configuration reference — VS Code docs (VS Code and portable formats) — read 2026-11-04
- Choose an agent harness — VS Code docs — read 2026-11-04
- Migrate customizations to the Copilot harness — VS Code docs (MCP forwarding and OAuth) — read 2026-11-04
- Visual Studio Code 1.143 release notes (Copilot harness as the default) — read 2026-11-04
- Model Context Protocol (MCP) — GitHub Copilot docs — read 2026-11-04
Frequently asked questions
- I added an MCP server to VS Code but my config seems to be ignored. Why?
- The most common cause is a root key that doesn't match the file. In .vscode/mcp.json and the user-profile mcp.json, VS Code uses servers — paste a config with mcpServers there and it is silently ignored. The portable .mcp.json at the workspace root and ~/.copilot/mcp-config.json use mcpServers instead. Check which file you edited and match the key to it; nothing errors, so it is easy to miss.
- Where do I add an MCP server in VS Code?
- Open the Command Palette with Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows and Linux, run MCP: Add Server, choose HTTP, paste the server URL, and name it. Then choose Copilot Global to save it for every workspace, or a workspace destination for this project. To edit config directly, use .mcp.json at the workspace root or ~/.copilot/mcp-config.json (root key mcpServers), or .vscode/mcp.json (root key servers), or run MCP: Open User Configuration for VS Code's own user-level file.
- The server connected but its tools don't appear in Chat. What's missing?
- MCP tools only surface when Chat is running an agent. Pick the built-in Agent in the agent picker (older builds call this the mode picker, with Ask, Edit, and Agent). In a Copilot harness session, the default since VS Code 1.143, check the tools under Chat: Open Customizations, then Tools; in a Local harness session, use Configure Tools in the chat input. If the tools are still absent, run MCP: List Servers, pick the server, and choose Show Output to read the error.