MCP Servers for VS Code — Complete Setup Guide (2026)
Last updated April 2026. Tested on VS Code 1.115+ with GitHub Copilot extension on macOS 15 and Windows 11.
What MCP servers do in VS Code
MCP servers extend GitHub Copilot's capabilities in VS Code. Without them, Copilot can only work with the files in your project and its training data. With MCP servers, Copilot can search the web, read documentation, query databases, call APIs — anything the server provides.
When you configure an MCP server, VS Code discovers its tools automatically through the MCP protocol's tools/list handshake. You don't need to manually tell Copilot which tool to use — it reads the tool descriptions and calls the right one based on your prompt.
Important: MCP tools in VS Code only work in Agent mode — not Ask mode. If Copilot Chat is set to Ask mode (the default), your tools won't appear even if correctly configured. Switch to Agent mode first.
Method 1: One-command install (recommended)
The fastest way to add an MCP server to VS Code:
bash# Install the AgenticMarket CLI (once) npm install -g agenticmarket # Authenticate (once) agenticmarket auth am_live_your_key # Install any server — VS Code gets configured automatically agenticmarket install agenticmarket/web-reader
The CLI detects VS Code, writes the correct config to .vscode/mcp.json, and the server appears in VS Code's MCP settings immediately. No JSON editing needed.
Why this is better than manual setup: The CLI handles the config key name (servers for VS Code — different from Cursor's mcpServers), file paths, and auth headers automatically.
Method 2: Manual JSON setup
VS Code reads MCP configuration from mcp.json in two locations:
| Scope | Path | Use case |
|---|---|---|
| Workspace | .vscode/mcp.json | Project-specific servers (version-controllable) |
| User | Command Palette → MCP: Open User Configuration | Global servers available in all projects |
Critical difference from Cursor: VS Code uses
serversas the root key. Cursor, Claude Desktop, and most other tools usemcpServers. Using the wrong key silently breaks everything — no error, the server just doesn't appear. See our complete troubleshooting guide for more on this.
Remote HTTP server
json{ "servers": { "web-reader": { "type": "http", "url": "https://your-server-url/mcp" } } }
Note: The "type": "http" field is required for remote servers in VS Code. Omitting it causes VS Code to default to stdio and try to launch the URL as a subprocess command — it fails immediately with a confusing error.
Local stdio server
json{ "servers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "./data"] } } }
With authentication
json{ "servers": { "my-server": { "type": "http", "url": "https://your-server-url/mcp", "headers": { "Authorization": "Bearer your-token-here" } } } }
Using input variables (secure credential prompts)
VS Code supports runtime credential prompts via the inputs field — you never have to hardcode API keys:
json{ "inputs": [ { "id": "github-token", "type": "promptString", "description": "GitHub Personal Access Token", "password": true } ], "servers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "${input:github-token}" } } } }
Enabling Agent mode
MCP tools are only available in Agent mode. This catches many people:
- Open GitHub Copilot Chat (Ctrl+Shift+I or Cmd+Shift+I)
- Look at the mode selector near the chat input — it defaults to Ask
- Switch it to Agent
- The tools icon (wrench) appears — click it to see available MCP tools
If your tools still don't appear after switching to Agent mode, see the troubleshooting section below.
Verifying the server is active
- Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
- Run
MCP: List Servers— shows all configured servers and their status - Or search
@mcpin the Extensions view to see installed servers
You can also check the Output panel:
- Open Output (Ctrl+Shift+U)
- Select GitHub Copilot or MCP from the dropdown
- Look for
Starting new stdio processor connection messages
VS Code-specific features
Dev mode (hot reload)
VS Code supports watching for file changes during MCP server development:
json{ "servers": { "my-dev-server": { "command": "node", "args": ["./src/server.js"], "dev": { "watch": "src/**/*.js" } } } }
Changes to matching files automatically restart the server — no manual reload needed.
Sandboxing (macOS/Linux)
For local stdio servers, you can restrict file system and network access:
json{ "servers": { "sandboxed-server": { "command": "npx", "args": ["-y", "some-mcp-package"], "sandboxEnabled": true } } }
Recommended MCP servers for VS Code
| Server | What it does | Install command |
|---|---|---|
| web-reader | Read and extract content from any URL | agenticmarket install agenticmarket/web-reader |
| duckduckgo | Web search without API keys | agenticmarket install agenticmarket/duckduckgo |
| wikipedia | Browse Wikipedia articles | agenticmarket install agenticmarket/wikipedia |
| rss-reader | Parse RSS/Atom feeds | agenticmarket install agenticmarket/rss-reader |
Browse all available servers at agenticmarket.dev/servers or explore community servers at agenticmarket.dev/explore.
Troubleshooting VS Code MCP issues
Server doesn't appear in Agent mode
- Confirm the root key is
servers(notmcpServers— that's for Cursor) - Verify the JSON is valid — VS Code provides IntelliSense for
mcp.json - Run
Developer: Reload Windowfrom the Command Palette - Check the Output panel for error messages
Tools appear but Copilot doesn't use them
- Make sure you're in Agent mode, not Ask mode
- Try explicit prompting: "Use the [tool-name] tool to..." instead of natural language
- If you have many servers, the total tool count may exceed Copilot's context budget — disable unused servers
Remote server returns error
- Ensure
"type": "http"is present in the server config - Check the auth header format — a single extra space in
Bearer tokenbreaks auth silently - For servers behind auth, see our Authentication docs
npx server fails to start
- Check if
npxis on VS Code's PATH — usewhich npxin your terminal and paste the absolute path - Always include the
-yflag:"args": ["-y", "package-name"] - If using nvm, VS Code may not inherit your shell's PATH — see the PATH problem section in our troubleshooting guide
Still stuck? See our complete MCP troubleshooting guide for every error code and fix, or validate your endpoint in the MCP Playground.
Next steps
- MCP Servers for Cursor — Setup Guide — if you also use Cursor
- MCP Servers for Claude Desktop — Setup Guide — for Claude Desktop users
- MCP Servers for Windsurf — Setup Guide — for Windsurf users
- What is MCP? — understand the protocol from the ground up
- How to Install MCP Servers Without JSON — full multi-IDE guide
- MCP Server Not Working? — troubleshooting every error
This guide is updated when VS Code changes its MCP handling. Last reviewed April 2026 on VS Code 1.115+ with GitHub Copilot.
AgenticMarket