# How to add MCP servers to VS Code

VS Code reads MCP servers from ~/.copilot/mcp-config.json (for you) or .mcp.json (for one project), under the "mcpServers" key. A local server’s entry is a command with args; a remote server’s entry is its URL in "url".

Last checked 25 Nov 2026. Page: https://ai-powered.com/clients/vscode

## Quick facts

- Local servers: Yes (stdio)
- Remote servers: Streamable HTTP: Yes · SSE: Yes (URL field: url)
- Sign-in: OAuth: Yes · Headers: Yes (OAuth works through dynamic client registration or a pre-registered client (oauthClientId); tokens can go in headers.)
- Resources: Partly
- Prompts: No
- Tool approval: Yes
- Platforms: macOS, Windows and Linux

## VS Code config files

| Scope | System | Path |
| --- | --- | --- |
| For you | All systems | `~/.copilot/mcp-config.json` |
| For one project | All systems | `.mcp.json` |

## Servers that work in VS Code

- [REA](https://ai-powered.com/mcp/rea): CLI and MCP server that lets coding agents reverse engineer apps and binaries
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser agents and cloud browsers for AI, with an MCP server for web tasks
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): MCP server for AI clients to scrape sites with HTTP and stealth browser sessions
- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): Hosted MCP connector for creating and rendering videos from HTML through AI chat
- [Context7](https://ai-powered.com/mcp/context7): Version-specific library docs and code examples piped into coding agents via MCP
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): MCP server and CLI that let coding agents drive and inspect a live Chrome browser
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Local MCP server that builds a code knowledge graph for AI coding agents
- [GitHub](https://ai-powered.com/mcp/github): Official MCP server connecting AI assistants to GitHub repos, issues and workflows
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): MCP toolkit giving coding agents symbol-level code retrieval and editing
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): Local FFmpeg video and audio editing tools for coding agents over MCP
- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): MCP server for managing and automating Home Assistant from AI assistants
- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Open-source analytics app where an AI agent builds charts and dashboards from your data

## Troubleshooting

- A guide tells you to use .vscode/mcp.json with a "servers" key: That is the older editor-managed format, which VS Code says will be removed in February 2027. Use "mcpServers" in ~/.copilot/mcp-config.json or a workspace .mcp.json instead.
- A workspace server doesn’t start: Workspace servers follow Workspace Trust. Trust the folder; restricted mode blocks them.
- A local server works on your machine but not in a dev container or remote window: The command runs in the remote environment. Check that the runtime is installed there and on its PATH.
- A Docker server connects and then stops: Don’t start the container with -d. The client needs the container’s stdin and stdout.
- ${env:NAME} or ${input:...} isn’t replaced: Those variables belong to the older format. The portable format uses ${NAME} or ${NAME:-default} and has no input prompts.
- A local server fails with “npx” (or uvx, docker) not found: Apps started from a dock or menu may not see your terminal’s PATH. Use the full path of the command (run which npx in a terminal to find it), then restart VS Code.
- You can’t tell whether the server or VS Code is at fault: Test the server on its own with the MCP Inspector (npx @modelcontextprotocol/inspector). If it lists tools there, check the VS Code setup.

## Safety

- Local servers can run code on your machine. Check the publisher and the command before you start one.
- Approve only tool calls you understand; trusting a server doesn’t approve its tools.
- Keep secrets in environment variables and reference them with ${NAME} rather than writing them into a shared .mcp.json.
- A local server runs on your computer with your access to files and the network. Add only servers whose source you trust.

## Questions

### Which MCP config file should I use in VS Code?
VS Code now recommends the portable format: "mcpServers" in ~/.copilot/mcp-config.json for you, or .mcp.json at the workspace root for a project. The older .vscode/mcp.json with "servers" still works but is deprecated and due to be removed in February 2027.

### Can I install an MCP server in VS Code with one click?
Yes. A vscode:mcp/install link opens the server details so you can review it before installing. We only offer it when the server has no values to fill in.

### Does VS Code support MCP prompts?
Not in Copilot sessions. The /mcp.<server>.<prompt> commands only belonged to the older editor harness.

### Can I limit which tools a server exposes?
Yes. In the portable format, set "tools" to the list of tools you want (["*"] for all). Tool approvals still apply.

### Can I use local MCP servers in VS Code?
Yes. VS Code starts a local server as a command on your computer (stdio).

### Does VS Code support remote MCP servers?
Yes. VS Code connects over Streamable HTTP and the older SSE transport. The URL goes in the "url" field.

### Where is the VS Code MCP config file?
For you: ~/.copilot/mcp-config.json. For one project: .mcp.json.

### Can VS Code sign in to MCP servers with OAuth?
Yes. OAuth works through dynamic client registration or a pre-registered client (oauthClientId); tokens can go in headers.

## Sources

- [VS Code docs: MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)
- [VS Code docs: add and manage MCP servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)
- [VS Code docs: manage MCP servers](https://code.visualstudio.com/docs/agents/run/manage-mcp-servers)
- [VS Code API: MCP developer guide](https://code.visualstudio.com/api/extension-guides/ai/mcp)