Guide · VS Code MCP Setup

VS Code MCP: Setup, Servers, and the 2026 Stack

To add an MCP server to VS Code, run MCP: Add Server from the Command Palette, give it a URL or a launch command, and save it to Copilot Global or to a .mcp.json file at the root of your project. Since VS Code 1.146, released on 11 November 2026, both of those files use a top-level mcpServers key, and the .vscode/mcp.json file most tutorials still show belongs to a harness Microsoft has deprecated.

That release changed where MCP lives. Copilot sessions now run in the Copilot harness, the default for new sessions since 1.143, and it reads its own config files rather than the editor’s. The old servers format keeps working in the Local harness until February 2027, and some of it can be forwarded into Copilot sessions, but a setup copied from a 2025 guide is now the slow way in. Every step below was checked against Microsoft’s MCP docs and the 1.146 release notes on 14 November 2026.

Quick answer
  • VS Code 1.146 (11 November 2026) moved MCP config. New servers go in ~/.copilot/mcp-config.json (Copilot Global) or a workspace-root .mcp.json, both with a top-level mcpServers key.
  • .vscode/mcp.json and the profile mcp.json use servers and belong to the Local harness, deprecated in 1.146 and due to be removed in February 2027.
  • Fastest route: MCP: Add Server from the Command Palette, or Chat: Open Customizations, then MCP Servers, then Add Server (+).
  • Select Copilot in the Session Target dropdown, review the trust prompt, then expand the first tool call to confirm the server ran.
  • Copilot allows 128 tools per request, so keep to three to six servers.

How to add an MCP server to VS Code

The guided route, from Microsoft’s Add and use MCP servers page:

  1. Select Copilot in the Session Target dropdown.
  2. Open the Command Palette (Cmd-Shift-P on macOS, Ctrl+Shift+P on Windows and Linux), run Chat: Open Customizations and select MCP Servers.
  3. Select Add Server (+) in the User group.
  4. Choose HTTP and paste the server’s URL for a remote server, or Command (stdio) and paste its launch command for a local one, such as npx -y @playwright/mcp@latest.
  5. Enter a server ID with no spaces, such as playwright or githubIssues.
  6. Choose Global, then Copilot Global, for a personal server, or a workspace-root .mcp.json to share it.
  7. Review the trust prompt, then finish any sign-in the server asks for.
  8. Ask for a small task that needs the server, expand the tool call in the reply, and check it ran. A plausible answer with no tool call does not prove the connection.

Three other routes reach the same place.

  • MCP: Add Server: the same guided flow, straight from the Command Palette. It also offers Add from another application, which imports servers you already set up elsewhere, and NPM Package, Pip Package or Docker Image, which drafts a config from a package name for you to review before accepting.
  • Browse first: in Chat: Open Customizations, select Browse, pick GitHub Feed and search by name or with @type:mcp. The feed is marked Experimental and depends on your organization’s policy. MCP: Browse MCP Servers opens the same discovery.
  • Edit the file by hand: open ~/.copilot/mcp-config.json or .mcp.json and paste. Both use the same shape.
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp",
      "tools": ["*"]
    },
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"],
      "tools": ["*"]
    },
    "contextbolt-bookmarks": {
      "type": "http",
      "url": "https://api.contextbolt.app/mcp",
      "tools": ["*"]
    }
  }
}

VS Code takes two transport types.

  • Stdio servers run locally. VS Code starts the process and talks to it through standard input and output. Filesystem, Postgres, SQLite, Git and Playwright all work this way. They take command, args and optional env, and the runtime (Node.js for npx) has to be installed where the harness runs.
  • HTTP servers run remotely. They take url and optional headers. Use sse only for an old endpoint that has no Streamable HTTP support; Microsoft’s reference says to prefer HTTP when a server offers it.

The tools list decides which of a server’s tools the agent sees. ["*"] means all of them, and naming a few keeps a large server from crowding the picker. It does not skip tool approvals.

Where is the VS Code MCP config file?

Four files, two of them current.

  • ~/.copilot/mcp-config.json is Copilot Global, for your personal servers. Set COPILOT_HOME and it moves to $COPILOT_HOME/mcp-config.json. Copilot CLI on the same machine reads it too. It does not sync between machines.
  • .mcp.json at the workspace root holds servers the team shares through source control. The guided flow offers it only when the Experimental setting chat.mcp.workspaceRootConfig.enabled is on, but a file you create by hand is read either way.
  • .vscode/mcp.json is the deprecated Local format, root key servers. It still works in Local sessions and can be forwarded to Copilot sessions.
  • Profile mcp.json is the deprecated personal file, same servers format.

In a remote or Dev Container session, the personal file is read from the home directory where the harness runs, not the laptop you connect from. Set the server up on that host.

If you reach for MCP: Open User Configuration out of habit, the commands that open the profile mcp.json or .vscode/mcp.json edit the deprecated format, not the files the Copilot harness reads.

What changed in VS Code 1.146

The 1.146 release notes deprecate the Local harness, VS Code’s built-in agent harness that runs in the editor’s extension host. It is “functionally frozen” now and will be removed in February 2027. Its replacement, the Copilot harness, runs on the Copilot SDK that GitHub’s other Copilot products share, and it reads MCP servers from two files of its own.

Copilot harness (use this)Local harness (deprecated)
Personal servers~/.copilot/mcp-config.jsonProfile mcp.json
Shared servers.mcp.json at the workspace root.vscode/mcp.json
Root keymcpServersservers
SecretsEnvironment variable referencesInput prompts and env files
StatusDefault for new sessions since 1.143Removed in February 2027

Nothing breaks today. Copilot sessions can still use eligible servers from .vscode/mcp.json and the profile file through forwarding, which leaves the old file where it is. Two kinds of server do not make it across: any entry that uses ${input:...} or ${command:...} variables is rejected, and editor-only options such as envFile, dev and per-server sandboxing do not transfer. For anything new, Microsoft’s MCP configuration reference says to use the Copilot files.

The Model Context Protocol itself has not changed. It is the open standard Anthropic released in late 2024 for how an AI client talks to tools outside its own runtime, and it reached every VS Code user in v1.102 in July 2025, alongside Agent mode, per the Visual Studio team’s announcement. Since then VS Code has added server discovery, sandboxing for local servers, OAuth sign-in and, new in 1.146, Skills over MCP (Preview), which lets a server hand the model ready-made skills. VS Code can also run Anthropic’s Claude and OpenAI’s Codex harnesses, and their MCP setup follows each provider’s own documentation. Everything on this page is for Copilot, the default.

How to move an existing .vscode/mcp.json

Forwarding keeps an old file working without edits, so this can wait until a server misbehaves. When you move one:

  1. Copy each server into .mcp.json (shared) or ~/.copilot/mcp-config.json (personal), under mcpServers instead of servers.
  2. Change ${env:NAME} references to ${NAME}. The Copilot files also accept ${NAME:-default} for a non-secret fallback.
  3. Replace inputs prompts. Set the secret as an environment variable where the harness runs, or use OAuth if the server supports it. The Copilot harness cannot read a value you stored through an input prompt.
  4. Delete envFile, dev, sandboxEnabled and sandbox from the copied entries. The portable format does not support them.
  5. Add "tools": ["*"], start a Copilot session and test one tool call per server.

Why your MCP tools aren’t showing up

These seven mistakes fail silently or with unhelpful errors.

Running the wrong harness: a server saved to Copilot Global serves Copilot sessions. If the Session Target shows Local, Claude or Codex, that harness reads its own config. Switch the session to Copilot before you dig into the JSON.

Copying a 2025 config into the new file: each file has one root key. The Copilot files take mcpServers and the deprecated files take servers, so a block moved between them needs the key changed. Claude Desktop, Cursor, Devin Desktop and Claude Code all use mcpServers, which makes their configs easier to paste into the new files than VS Code’s own old ones.

Leaning on input prompts: the old advice to keep secrets in ${input:my_secret} now works against you. Forwarding rejects any server that uses one, so the tool never appears in a Copilot session. Move the secret to an environment variable.

Skipping -y on npx commands: without -y, npx waits on an interactive “should I install this package” prompt. VS Code can’t answer it, the process hangs, and the server never registers.

Adding too many servers: a request can hold at most 128 tools. Past that, the chat returns “Cannot have more than 128 tools per request.” Deselect tools or whole servers in the tools picker, or turn on github.copilot.chat.virtualTools.threshold, which manages large tool sets for you. The cleaner fix is a stack of three to six servers. Anything you haven’t used in two weeks is dead weight.

Pointing the Filesystem server at your home directory: allow ~/ and the agent can read and write every file you own. Restrict it to a project folder or a scratch directory. The same rule applies to Postgres: use a read-only user unless you want the agent writing data.

Calling it done without a tool call: a fluent answer is not proof the server ran. Expand the tool call in the reply and check which server answered.

Workspace config or user config

Put shared team servers in .mcp.json at the workspace root and commit it. Context7, Playwright and the project’s database are good candidates. Anyone who clones the repo gets the same stack. VS Code asks you to trust a server before it starts, so read a repo’s .mcp.json before you accept, because local servers run code on your machine with your permissions.

Put personal servers in Copilot Global: ContextBolt, your Linear or Notion endpoint, anything tied to your own account. Copilot Global is per machine, so set it up once on each computer you work from.

Keep secrets out of both files. The Copilot files read environment variable references, so write "Authorization": "Bearer ${GITHUB_TOKEN}" in a header and set GITHUB_TOKEN on the machine that runs the harness. Use the braced ${NAME} form, because VS Code’s own MCP client treats a bare $NAME as literal text. Never commit a populated token. Microsoft’s reference is blunt about it: “A personal configuration file is not a secret store.”

Which MCP servers to start with

Most “best VS Code MCP servers” lists give you 15, and every extra server spends tools from the 128. A smaller set, picked for how little setup it needs, does the job.

ServerWhat it doesTransportWhy it earns its slot
GitHubRepos, issues, PRs, code searchhttpA widely used MCP server. Copilot can read your real repos and issues instead of guessing from training data.
FilesystemRead and write files in allowed dirsstdioExtends Copilot’s reach to docs, configs, and notes outside the open project.
Postgres or SQLiteRun SQL against your dev DBstdioStops you re-pasting schemas into chat. Copilot queries the live shape of your data.
Context7Live, version-specific library docshttpKills the “this API was deprecated 18 months ago” failure mode.
PlaywrightDrive a real browser, scrape, screenshotstdioLets Copilot test the UI it just wrote without leaving the editor.
ContextBoltSearch every page and post you saved (web, X, Reddit, LinkedIn) by meaninghttpThe articles, threads, and tutorials you saved months ago, surfaced when Copilot needs them.

Six servers is well under the 128-tool ceiling. If the Copilot harness is new to you, add Context7 to Copilot Global first, then GitHub, then a database server pointed at your dev DB. The MCP spec is at modelcontextprotocol.io if you want to read how the protocol works.

If you do your own SEO, ContextBolt SEO is a separate hosted MCP server that gives Copilot live keyword research, difficulty scores, and ranking data in plain language, and every lookup saves to your SEO Dashboard. It starts with a 7-day free trial, then $35 a month. Add it as one more http server in your config, nothing to install. The full walkthrough is SEO inside VS Code.

Adding your saved pages and posts to Copilot

The thing your editor knows least about is your own reading: the docs page you saved last month, the thread you bookmarked on X, the Reddit comment that changed how you think about a problem. None of that is in your repo.

ContextBolt is a Chrome extension that saves any web page with its article text, and captures your X, Reddit, and LinkedIn bookmarks as you save them. Every save is AI-tagged and clustered into topics on arrival. Basic is free, with no account and no card, and is capped at 150 bookmarks: you get the tagging, the topic clusters, and instant search inside the extension. Pro ($6 a month, month to month) removes the cap, adds cloud sync, and gives you an MCP endpoint that any MCP client can call.

To wire it into VS Code, add the entry below to Copilot Global and start the server.

{
  "mcpServers": {
    "contextbolt-bookmarks": {
      "type": "http",
      "url": "https://api.contextbolt.app/mcp",
      "tools": ["*"]
    }
  }
}

Follow the browser sign-in: use the email on your Pro account, enter the code, and allow the connection. The shared URL contains no personal key. Then ask Copilot “what did I bookmark about Drizzle migrations.” Copilot calls search_bookmarks against your collection and ranks results by semantic match. The endpoint also exposes list_clusters, get_cluster_bookmarks, get_recent_bookmarks, and save_bookmark, so Copilot can browse your topic clusters or save a new bookmark mid-chat. For the wider argument, see Personal AI Context Stack for Claude.

VS Code MCP vs Cursor, Devin Desktop and Claude Code

The servers travel between editors. The config files don’t, although since 1.146 the root key finally matches.

DimensionVS Code (Copilot)CursorDevin Desktop (formerly Windsurf)Claude Code
Config file.mcp.json or ~/.copilot/mcp-config.json~/.cursor/mcp.json or .cursor/mcp.json~/.config/devin/mcp_config.json (Windows %APPDATA%\devin\mcp_config.json)~/.claude.json or project .mcp.json
Root keymcpServers (was servers)mcpServersmcpServersmcpServers
Project-level configYesYesNot documentedYes
Tool ceiling128 per requestDegrades past ~40100 totalNo documented hard cap
Choice to make firstCopilot in Session TargetNoneNoneNone

VS Code has the highest documented tool ceiling, and the 1.146 move to mcpServers means a Cursor or Claude Code block pastes in with only type and tools to check. If you also use Devin Desktop or Cursor, the Devin Desktop (formerly Windsurf) MCP setup guide and the Cursor MCP integration guide walk through the parallel flow with the same six-server stack. The official VS Code docs have the full reference.

Where next

Frequently asked questions

Something else on your mind? Get in touch.

Where is the VS Code MCP config file?

Since VS Code 1.146, new servers go in ~/.copilot/mcp-config.json (Copilot Global, for personal servers) or in .mcp.json at the workspace root (for servers the team shares). Both use a top-level mcpServers key. The older .vscode/mcp.json and the profile mcp.json use a servers key and belong to the Local harness, which Microsoft deprecated on 11 November 2026 and plans to remove in February 2027.

Why are my MCP tools not showing up in VS Code Copilot Chat?

Check three things in order. First the session: select Copilot in the Session Target dropdown. Then the file: the Copilot harness reads mcpServers from ~/.copilot/mcp-config.json or a root .mcp.json, and it reaches a server in .vscode/mcp.json only by forwarding, which rejects any server that uses ${input:...} or ${command:...} variables. Then the tools picker (Configure Tools in the chat input): a request can hold at most 128 tools.

How many MCP servers can VS Code use at once?

A single chat request can have a maximum of 128 tools enabled. Past that, Copilot returns the error "Cannot have more than 128 tools per request." Deselect tools or whole servers in the tools picker, or turn on virtual tools with the github.copilot.chat.virtualTools.threshold setting so VS Code manages large tool sets for you.

Is VS Code MCP the same as GitHub Copilot MCP?

Yes, and since 1.146 more literally. The Copilot harness in VS Code runs on the Copilot SDK, and a server saved to Copilot Global is shared with Copilot CLI on the same machine. The protocol is the open Model Context Protocol, so the same servers run in Cursor, Devin Desktop (formerly Windsurf) and Claude Desktop. Only the file path differs.

Can I add my bookmarks to VS Code through MCP?

Yes. ContextBolt Pro gives you an MCP endpoint. Add https://api.contextbolt.app/mcp as an HTTP server under mcpServers, complete the browser email-code sign-in, and ask Copilot to search every page and post you saved, from the web and from X, Reddit and LinkedIn, by meaning. Useful when the snippet you need is something you bookmarked months ago.