Read and write local files with configurable access controls.
MCP Servers for VS Code
VS Code supports MCP through its agent-mode tooling — configured in either a workspace .vscode/mcp.json file or via the user settings.json. The same servers that run in Claude Desktop or Cursor drop straight in.
Set up MCP in VS Code
Four steps to connect your first MCP server.
- 1
Create .vscode/mcp.json
Add the file at the root of your workspace. VS Code picks it up automatically.
- 2
Add servers under "servers"
Same command + args format as Claude Desktop. You can reference ${workspaceFolder} to scope filesystem access to the open project.
- 3
Enable the server
Open the Command Palette → "MCP: List Servers" and toggle the server on. VS Code will launch the process and surface any errors inline.
- 4
Use it from Chat
Open the Chat view, switch to Agent mode, and the MCP tools appear under the Tools picker.
- Workspace-scoped
.vscode/mcp.jsonPreferred. Commit alongside the repo to share with your team. - User-wide
settings.json → "mcp.servers"Open with Cmd/Ctrl+Shift+P → "Preferences: Open User Settings (JSON)".
// .vscode/mcp.json
{
"servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"${workspaceFolder}"
]
},
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
}
}Top MCPs for VS Code
The curated starting stack — install these first.
Up-to-date library docs pulled directly into your AI context.
Query and inspect PostgreSQL databases via natural language.
Retrieve web pages and convert them to clean markdown.
All MCPs compatible with VS Code
15 servers verified to work with VS Code, ranked by popularity.
Read and write local files with configurable access controls.
Query and inspect PostgreSQL databases via natural language.
Real-time web search with privacy-focused results.
Persistent knowledge graph memory across AI conversations.
Up-to-date library docs pulled directly into your AI context.
Full Supabase access: database, auth, storage, and edge functions.
Local SQLite database access with full read/write support.
Retrieve web pages and convert them to clean markdown.
Full browser automation: navigate, click, screenshot, and scrape.
Structured step-by-step reasoning for complex problem solving.
Read and send Slack messages, manage channels and threads.
Secure cloud sandboxes for executing AI-generated code.
Manage Linear issues, projects, and cycles from AI context.
FAQ: MCP in VS Code
Do I need an extension to use MCP in VS Code?
Modern VS Code includes MCP support in its built-in chat/agent tooling. If you are on an older version, update to the latest VS Code release — MCP is part of the core agent features.
Can I use workspace variables in mcp.json?
Yes. VS Code expands variables like ${workspaceFolder} and ${userHome} inside args, which is the cleanest way to point a Filesystem MCP at the currently open project.
Where do I store API tokens safely?
Use the inputs feature: declare a password-type input in mcp.json, reference it in env, and VS Code prompts once and stores the value in its secure secret storage — never written to disk.
Can VS Code and Cursor share the same MCP config?
Not directly — Cursor reads .cursor/mcp.json and VS Code reads .vscode/mcp.json. The JSON shape is nearly identical, so copy-paste works. Commit both if your team uses both editors.
Browse every MCP server → top-mcps.com