How to add MCP servers to VS Code
VS Code runs MCP servers for GitHub Copilot's agent mode. Servers can be added per workspace or for your user, and the MCP: Add Server command walks you through it.
Add an MCP server to VS Code
- 1Create
.vscode/mcp.jsonin the workspace, or runMCP: Open User Configurationfor all workspaces. - 2Paste the server under
servers(VS Code usesservers, notmcpServers). - 3Use
inputswithpassword: truefor secrets so they are not stored in the file. - 4Open Copilot Chat in Agent mode and pick the server's tools from the tools menu.
Example: Codebase Memory
{
"servers": {
"codebase-memory-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"codebase-memory-mcp"
]
}
}
}Workspace, user and Copilot CLI
- Workspace configuration can be committed so the team shares the same servers.
- The personal Copilot Global configuration is shared across workspaces and with Copilot CLI on the same machine.
- Servers can also be added from the Customization Marketplace (preview).
- VS Code handles input requests (elicitation) from servers; MCP Apps are experimental.
Where VS Code keeps MCP servers
.vscode/mcp.jsonworkspaceuser mcp.jsonMCP: Open User Configuration
Check it loaded: MCP: List Servers
Limits and settings
- MCP tools are used from Copilot Chat in agent mode.
- VS Code supports input requests (elicitation) from servers; MCP Apps are experimental.
When a server does not work in VS Code
- Check that the server is in the scope you expect: workspace or user.
- Make sure the runtime the server needs, such as Node.js or Python, is installed.
- Read the server's output for start-up errors, and the chat debug view if no tool is called.
VS Code MCP questions
How do I add an MCP server to VS Code?
Run "MCP: Add Server" from the Command Palette, choose HTTP or Command (stdio), and pick workspace or user scope. HostedMCP server pages give the matching config.
Do I need GitHub Copilot?
Yes. MCP servers in VS Code are used by Copilot's chat in agent mode.
Can I share MCP servers with my team?
Yes. A workspace configuration can be committed to source control so everyone gets the same servers.
How do I see if a server works?
Ask Copilot to use it in agent mode and expand the tool call in the chat to see the request and result.
Popular MCP servers for VS Code
- 1
Provides a local knowledge graph that connects source code, documentation, and infrastructure to give AI agents structural context.
Config for VS Code
.vscode/mcp.json{ "servers": { "codebase-memory-mcp": { "type": "stdio", "command": "npx", "args": [ "-y", "codebase-memory-mcp" ] } } } - 2
Securely execute LLM-generated code in isolated containers or local Linux and Windows sandboxes across multiple programming languages.
Config for VS Code
.vscode/mcp.json{ "servers": { "llm-sandbox": { "type": "stdio", "command": "uvx", "args": [ "llm-sandbox" ] } } } - 3
Lets an AI client create, inspect, validate, and save editable 3D building scenes, including walls, rooms, doors, and furnishings.
Config for VS Code
.vscode/mcp.json{ "servers": { "editor": { "type": "stdio", "command": "npx", "args": [ "-y", "@pascal-app/mcp" ] } } } - 4
Lets AI agents search, run, and read results from thousands of web scraping and automation Actors on Apify Store.
Config for VS Code
.vscode/mcp.json{ "servers": { "apify-mcp-server": { "type": "http", "url": "https://mcp.apify.com/" } } } - 5
Provides AST-based semantic code search for local repositories using incremental re-indexing and natural language queries.
Config for VS Code
.vscode/mcp.json{ "servers": { "cocoindex-code": { "type": "stdio", "command": "uvx", "args": [ "cocoindex-code" ] } } } - 6
Lets an AI client read and change Google Ads, Reddit Ads and GA4 campaigns, with a preview shown before every change.
Config for VS Code
.vscode/mcp.json{ "servers": { "adloop": { "type": "stdio", "command": "uvx", "args": [ "adloop" ] } } } - 7
An agent meta-harness that provides Claude Code and Codex with specialized agent swarms, self-learning memory, and enterprise security guardrails.
Config for VS Code
.vscode/mcp.json{ "servers": { "claude-flow": { "type": "stdio", "command": "npx", "args": [ "-y", "claude-flow" ] } } } - 8
Enables LLMs to interact with web pages through structured accessibility snapshots using Playwright browser automation.
Config for VS Code
.vscode/mcp.json{ "servers": { "playwright-mcp": { "type": "stdio", "command": "npx", "args": [ "-y", "@playwright/mcp" ] } } } - 9
Allows an AI client to interact with Bitbucket Data Center repositories and code through the Model Context Protocol.
Config for VS Code
.vscode/mcp.json{ "servers": { "atlassian-dc-mcp": { "type": "stdio", "command": "npx", "args": [ "-y", "@atlassian-dc-mcp/bitbucket" ] } } } - 10
Lets an AI agent draw and edit draw.io diagrams on a live browser canvas that you can also edit by hand.
Config for VS Code
.vscode/mcp.json{ "servers": { "next-ai-drawio": { "type": "stdio", "command": "npx", "args": [ "-y", "@next-ai-drawio/mcp-server" ] } } } - 11
Packs a local or remote codebase into a single AI-friendly file with token counts so LLMs and coding agents can read or search it.
Config for VS Code
.vscode/mcp.json{ "servers": { "repomix": { "type": "stdio", "command": "npx", "args": [ "-y", "repomix" ] } } } - 12
Connects AI agents and IDEs to enterprise databases using prebuilt tools or a custom framework for secure, structured queries.
Config for VS Code
.vscode/mcp.json{ "servers": { "mcp-toolbox": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:1.17.0" ] } } }