
How to add an MCP server to VS Code
Add MCP servers to VS Code with the MCP: Add Server command or a config file, then use them from Copilot agents in chat.
- Local servers
- Yes
- runs stdio servers
- Hosted servers
- Yes
- connects by URL
- Config
- JSON
- how servers are added
- Picks
- 5
- ranked
Run MCP: Add Server from the Command Palette, pick Command (stdio) for a local server or HTTP for a hosted one, and choose where to store it. VS Code reads two file formats. The VS Code format uses a servers object in .vscode/mcp.json, and the portable Copilot format uses mcpServers in .mcp.json or ~/.copilot/mcp-config.json. Pick the format that matches your agent harness before you copy a config between them.
Good for
- Developers using Copilot agents in VS Code who need more tools
- Teams sharing servers through .vscode/mcp.json or a workspace .mcp.json
- People moving servers over from Claude Desktop, Cursor or Windsurf
- Admins who restrict MCP servers with an enterprise allowlist
Install VS Code (GitHub Copilot)
VS Code (Copilot)
- 1
Open the Command Palette (Shift+Cmd+P on macOS, Ctrl+Shift+P on Windows and Linux) and run MCP: Add Server.
- 2
Choose HTTP for a server URL or Command (stdio) for a launch command.
- 3
Enter a server ID that is not already used.
- 4
Choose Global, then Copilot Global, for a personal setup.
- 5
Accept the trust and sign-in prompts you understand.
Copilot harness sessions read the portable format. VS Code forwards servers from .vscode/mcp.json to them, except servers that need ${input:...} prompts. Docs updated 10/28/2026.
From the vendor's docs. Source.
At a glance
- Add a server
- Command Palette: MCP: Add Server
- Tool limit
- 128 tools per chat request
- Resources and prompts
- Both supported; prompts run as /<server>.<prompt>
- Check servers
- MCP: List Servers; Show Output for logs
- Command line
- code --add-mcp '{...}'
- Admin control
- Enterprise MCP allowlist; chat.mcp.access setting
Add an MCP server to VS Code
- 1
Run MCP: Add Server
Open the Command Palette and run MCP: Add Server. Choose HTTP if you have a URL, or Command (stdio) if you have a launch command. Enter a server ID such as
playwright. - 2
Choose where to store it
Pick Global, then Copilot Global, to keep it out of your project (it writes
$COPILOT_HOME/mcp-config.json, or~/.copilot/mcp-config.jsonwhenCOPILOT_HOMEis unset). For a team, use the workspace-root.mcp.json; the guided flow offers it only when the experimentalchat.mcp.workspaceRootConfig.enabledsetting is on. The older.vscode/mcp.json(or the user-profilemcp.json) stays available for input variables and sandboxing. - 3
Or edit the file by hand
In
.vscode/mcp.json:{ "servers": { "playwright": { "type": "stdio", "command": "npx", "args": ["-y", "@playwright/mcp@latest"] }, "context7": { "type": "http", "url": "https://mcp.context7.com/mcp" } } }In a portable file, use
mcpServersand leave outtypefor local servers.Uses Context7
- 4
Check it loaded
Run MCP: List Servers to start, stop or restart a server and open Show Output. Open Chat: Open Customizations, then MCP Servers, to see each server and its toggle.
- 5
Use it in a prompt
Expand the tool call in the conversation and confirm it came from the server you added and returned real output.
PromptUse the Context7 MCP tools to look up the React documentation for useState. Summarize the basic usage and cite the documentation returned by the tool. Do not change files.Uses Context7
- 6
If it does not work
Run MCP: List Servers, pick the server, and choose Show Output. A stdio server needs its runtime (for example Node.js) on the machine that runs it. In a remote window or dev container, configure the server there.
Best MCP servers for VS Code (GitHub Copilot)
Official servers with an approved PlugWiki page that run in VS Code over stdio or HTTP; ordered by GitHub stars, then name. Derived from data we hold.
- 1
Context7OfficialHosted or LocalAPI keyGives VS Code current library docs while it writes code.
64,001 GitHub stars - 2
Playwright MCPOfficialLocalLets VS Code drive and test your app in a real browser.
38,887 GitHub stars - 3
GitHub MCP ServerOfficialHosted or LocalOAuthPull requests, issues and code search beyond what git can do.
34,115 GitHub stars - 4
sentry-mcpOfficialHosted or LocalOAuthPulls Sentry errors into VS Code so it can find the cause.
952 GitHub stars - 5
Notion MCPOfficialHostedOAuthRead and edit specs and notes in Notion through its hosted server.
MCP servers that work in VS Code (GitHub Copilot)
40 · official first, then servers with a page, then by stars
Scrapling MCP ServerOfficialLocalNo sign-inWeb scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
90.6K GitHub stars
Context7OfficialHosted or LocalAPI keyUp-to-date docs for AI agents
64K GitHub stars
Chrome DevTools MCPOfficialLocalMCP server for Chrome DevTools
54.5K GitHub stars
Playwright MCPOfficialLocalPlaywright MCP server
38.9K GitHub stars
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's official MCP server. Lets an AI assistant read code, manage issues and pull requests, check Actions runs and security alerts. Hosted at api.githubcopilot.com/mcp or run locally with Docker or a Go binary.
34.1K GitHub stars
OpenWork MCP GatewayOfficialHostedOAuthYour OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.
24.3K GitHub stars
MCP Toolbox for DatabasesOfficialLocaltoken in envMCP Toolbox for Databases enables your agent to connect to your database.
16.8K GitHub stars
apify-mcp-serverOfficialHosted or LocalOAuthExtract data from any website with thousands of scrapers, crawlers, and automations on Apify Store ⚡
14K GitHub stars
SeleniumBase MCPOfficialLocalNo sign-inStealthy browser automation, testing, and web-scraping via CDP Mode.
13.2K GitHub stars
AutoClipOfficialLocalNo sign-inClip long videos into short clips with covers and captions. Local CLI and MCP.
9.9K GitHub stars
Firecrawl MCP ServerOfficialHosted or LocalAPI keyFirecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
7.7K GitHub stars
firecrawl-mcp-serverOfficialLocalAPI keyOfficial Firecrawl MCP server, the context API for AI agents: search, scrape, and interact with the web, plus parse, crawl, map, Agent and Monitor, from any MCP client.
7.7K GitHub stars
MobileBuildMCPOfficialLocalBuild, run and test iOS and macOS apps, drive the simulator and debug with LLDB from your AI assistant. Formerly XcodeBuildMCP.
6.5K GitHub stars
magic-mcpOfficialLocalAPI keyIt's like v0, but in your Cursor / Claude Code / Windsurf: search 10,000+ React/Tailwind components, generate new UI with AI, and publish your own — right from your editor. Magic MCP is now the 21st MCP; this package keeps old configs working. Setup: 21st.dev/mcp
6.3K GitHub stars- Excalidraw MCPOfficialHosted or LocalNo sign-in
Official Excalidraw MCP App server: streams hand-drawn diagrams into the chat with interactive fullscreen editing. Hosted or local.
5.6K GitHub stars
Exa MCP ServerOfficialHosted or LocalOAuthConnect AI agents to Exa for web search, content fetching, and multi-step research.
5.2K GitHub stars
notion-mcp-serverOfficialLocaltoken in envOfficial Notion MCP Server
4.7K GitHub stars
mcp-grafanaOfficialHosted or LocalAn MCP server giving access to Grafana dashboards, data and more.
3.6K GitHub stars- Google Analytics MCP ServerOfficialLocaltoken in env
Google's official Google Analytics MCP server: runs locally and queries GA4 reports and property settings with your Google credentials. Read-only unless you add the --allow-write flag.
3.6K GitHub stars
SupabaseOfficialHosted or LocalOAuthMCP server for interacting with the Supabase platform
3K GitHub stars
Show all 40Show fewer
brightdata-mcpOfficialLocaltoken in envA powerful Model Context Protocol (MCP) server that provides an all-in-one solution for public web access.
2.7K GitHub stars
Perplexity MCP ServerOfficialHosted or LocalOAuthConnector for Perplexity API, to enable real-time, web-wide research.
2.6K GitHub stars
tavily-mcpOfficialLocalProduction ready MCP server with real-time search, extract, map & crawl.
2.5K GitHub stars
Solana MCP by VybeOfficialHostedOAuthSolana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.
2.2K GitHub stars
Azure DevOps (ADO)OfficialHostedOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
Azure DevOps Local MCP ServerOfficialLocalOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
anysearch-mcp-serverOfficialHostedAPI keyUnified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.
2.1K GitHub stars
Microsoft Learn MCPOfficialHostedNo sign-inOfficial Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.
2K GitHub stars- WordPress MCP AdapterOfficialLocal
The official WordPress plugin that turns a self-hosted site into an MCP server, exposing Abilities API actions from core, plugins and themes over STDIO (WP-CLI) or HTTP.
1.9K GitHub stars
MeiGen-AI-Design-MCPOfficialHosted or LocalOAuthDiscover inspiration and create images and videos with the latest AI models. Works with ChatGPT, Claude, Cursor, and other MCP clients.
1.8K GitHub stars
MATLAB MCP ServerOfficialLocalNo sign-inConnect AI coding agents to MATLAB. Run code, tests, and analysis via MCP.
1.7K GitHub stars
datagouv-mcpOfficialHostedNo sign-inOfficial data.gouv.fr Model Context Protocol (MCP) server that allows AI chatbots to search, explore, and analyze datasets from the French national Open Data platform, directly through conversation.
1.6K GitHub stars
MiniMax-MCPOfficialLocalAPI keyOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
1.6K GitHub stars
mcp-server-qdrantOfficialLocalAPI keyAn official Qdrant Model Context Protocol (MCP) server implementation
1.6K GitHub stars
TerraformOfficialHosted or LocalAPI keyGenerate more accurate Terraform and automate workflows for HCP Terraform and Terraform Enterprise
1.6K GitHub stars
@brave/brave-search-mcp-serverOfficialLocalBrave Search MCP Server: web results, images, videos, rich results, AI summaries, and more.
1.5K GitHub stars
IDA MCPOfficialLocalNo sign-inOfficial Hex-Rays MCP server that lets AI agents open, decompile and annotate binaries in IDA, alongside you in the IDA GUI or headless.
1.5K GitHub stars- X MCP (X API)OfficialHosted or LocalOAuth
X's hosted MCP server for the X API at api.x.com/mcp: AI clients search posts, read users, trends and news, manage bookmarks and publish Articles through your X developer app, directly or via the xurl mcp bridge.
1.4K GitHub stars
Power BI Authoring MCP Server (Local)OfficialLocalOAuthThe Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.
1.3K GitHub stars
ref-tools-mcpOfficialLocalAPI keyToken efficient search for coding agents over public and private documentation.
1.2K GitHub stars
Common errors and fixes
Cannot have more than 128 tools per request
Cause: A chat request can have at most 128 tools enabled.
Fix: Deselect tools or whole MCP servers in the tools picker, or enable virtual tools with github.copilot.chat.virtualTools.threshold.
vs-code Source
A server does not appear or changes do not show up
Cause: The selected agent harness, workspace or config format may not match the file you edited.
Fix: Check which harness is selected and which config source you changed, and compare servers against mcpServers in the format table.
vs-code Source
A stdio server fails to start
Cause: The command, arguments, runtime or PATH is wrong in the place the server runs. A command installed locally can be missing in a remote window.
Fix: Check the command, then run MCP: List Servers and choose Show Output.
vs-code Source
A Docker stdio server exits or does not connect
Cause: Detached mode (-d) breaks the stdio connection.
Fix: Remove -d so the container runs in the foreground.
vs-code Source
Server blocked from starting
Cause: Restricted mode in Workspace Trust prevents workspace servers from starting, or an enterprise allowlist blocks it.
Fix: Trust the workspace only after reviewing it, or ask your administrator about the enterprise MCP allowlist.
vs-code Source
Server with ${input:...} is missing in Copilot sessions
Cause: Servers that need interactive input variables are not forwarded to Copilot harness sessions.
Fix: Use ${NAME} environment variables in a portable config or OAuth instead.
vs-code Source
Verdict
VS Code gives you a guided MCP: Add Server flow, stdio, HTTP and OAuth, and a server gallery. The main limit is two config formats, so check which one your agent harness reads before copying a file.
VS Code gives you a guided MCP: Add Server flow, stdio, HTTP and OAuth, and a server gallery. The main limit is two config formats, so check which one your agent harness reads before copying a file.
Best for
- Developers already using Copilot agents in VS Code
- Teams that share servers in a committed config file
Skip it if
- You want one JSON shape that works the same in every app
- You need more than 128 tools active in one request
Questions
Where is the VS Code MCP config file?
.vscode/mcp.json in your workspace, or mcp.json in your user profile (run MCP: Open User Configuration). The portable Copilot format uses .mcp.json in the workspace root or ~/.copilot/mcp-config.json.
What is the difference between servers and mcpServers?
servers is the VS Code format in .vscode/mcp.json. mcpServers is the portable format in .mcp.json and mcp-config.json. Check the capability table in the docs before you copy a config between them.
Does VS Code support remote (HTTP) MCP servers?
Yes. Use "type": "http" with a url. VS Code tries streamable HTTP first and falls back to SSE.
Does VS Code support OAuth for MCP servers?
Yes. VS Code opens a browser window for sign-in on first connect. You can set oauth.clientId, and a client secret is kept in VS Code secret storage rather than in mcp.json.
How many MCP tools can VS Code use at once?
A chat request can have at most 128 tools enabled. If you hit the error, deselect tools or servers in the tools picker, or turn on virtual tools with github.copilot.chat.virtualTools.threshold.
How do I disable an MCP server in VS Code?
Open Chat: Open Customizations, choose MCP Servers, and use the server's toggle. A disabled server does not start, and its tools are unavailable.
How do I add an MCP server from the command line?
Use code --add-mcp with a JSON object that has a name and the server config, as in the install box. It writes to your user-profile configuration.
Can VS Code reuse MCP servers from Claude Desktop or Cursor?
Yes. Turn on chat.mcp.discovery.enabled and pick the sources. Copilot CLI discovery is on by default, and the other sources are off.
Do MCP servers run in a dev container or remote workspace?
Yes, but configure them there. Use MCP: Open Remote User Configuration or add customizations.vscode.mcp to devcontainer.json, and install the runtime where the command runs.
Information
updated Nov 2, 2026
- Transports
- stdio, SSE, Streamable HTTP
- Config file (all)
.vscode/mcp.json (workspace) or user settings- MCP docs
- code.visualstudio.com
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- Add MCP servers in VS Code · code.visualstudio.com
- MCP configuration reference · code.visualstudio.com
- Manage and troubleshoot MCP servers · code.visualstudio.com
- Use tools with agents · code.visualstudio.com