All MCP setup guides
MCPVS Code

How to Add a Remote MCP Server to VS Code

VS Code's root config key is servers, not mcpServers — paste the wrong one and it is silently ignored. Plus the Copilot org policy that hides MCP entirely, and why tools only appear in agent mode.

Last verified August 8, 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, and name it. OAuth runs automatically on first connect. Two things then commonly go wrong, and both are silent rather than loud: VS Code's config root key is servers, not mcpServers, and MCP tools only appear in Chat's agent mode. 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 July 2026, on Copilot Business or Enterprise seats your organization's "MCP servers in Copilot" policy must be enabled — and it is off by default, so an admin may need to turn it on. Free, Pro, and Pro+ personal plans are not policy-gated.

If the MCP commands are missing entirely rather than failing, one of those two is why.

Adding the server

From the Command Palette

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Run MCP: Add Server
  3. Choose HTTP as the server type
  4. Paste the URL
  5. Name it, and choose workspace or global scope

By editing the config

For a workspace-level server, create .vscode/mcp.json:

{
  "servers": {
    "my-server": {
      "type": "http",
      "url": "https://mcp.example.com/mcp"
    }
  }
}

For a user-level config covering every workspace, run MCP: Open User Configuration from the Command Palette and add the same block.

There is also a shell one-liner:

code --add-mcp '{"name":"my-server","type":"http","url":"https://mcp.example.com/mcp"}'

The key that makes configs vanish

VS Code's root key is servers. Not mcpServers.

Nearly every other client — Cursor, JetBrains, Kiro, Claude Code, LM Studio — uses mcpServers. VS Code does not, and if you paste a config using mcpServers, VS Code silently ignores it. No error, no warning, no entry in the server list. The file is valid JSON, so nothing complains.

The branded VS Code documentation names this as the most common cause of a config being ignored — and it is an easy one to hit when copying a working config from another editor.

Authorization

OAuth is automatic. When VS Code first connects, a browser tab opens to the server's consent screen; sign in and approve.

Back in the editor, an Auth CodeLens appears above the server entry in mcp.json. Click it any time to re-authenticate — or to start the OAuth flow manually if it never triggered on its own.

Using the tools

MCP tools appear in agent mode in the Chat view. Open Chat, switch the mode picker to Agent, and check the tools picker.

This catches people who connected successfully: the server is live, the tools exist, and they are invisible because Chat is in ask or edit mode. Agent mode 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:

{
  "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:

{
  "servers": {
    "tempreon": {
      "type": "http",
      "url": "https://api.tempreon.com/functions/v1/tempreon-mcp/mcp"
    }
  }
}

Save, approve the browser prompt, switch Chat to agent mode, 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.

Frequently asked questions

I added an MCP server to VS Code but my config seems to be ignored. Why?
The most common cause is the config's root key. VS Code uses servers, not mcpServers like most other clients — if you paste a config with mcpServers, VS Code silently ignores it. Open your mcp.json and confirm the top-level key reads servers. This is VS Code's one naming quirk, and it is easy to miss because nothing errors.
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, name it, and choose whether to save it for the workspace or globally. To edit config directly, use .vscode/mcp.json for one workspace or MCP: Open User Configuration for all of them.
The server connected but its tools don't appear in Chat. What's missing?
MCP tools only surface in agent mode, not in ask or edit modes. Open the Chat view, switch the mode picker to Agent, and check the tools picker. If they are still absent, restart the server from the CodeLens above its entry in mcp.json.