适合谁?
适合想在 VS Code 中使用 MCP 扩展编码、文档、GitHub、数据库或浏览器自动化的用户。
配置路径和示例
VS Code MCP configuration JSON
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "./"]
}
}
}安装步骤
Pick a VS Code-compatible server
Start from servers tagged coding, filesystem, GitHub, docs, or developer.
Generate JSON config
Use the config generator or copy a trusted listing configuration.
Paste into VS Code MCP config
Keep command and args split correctly.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "./"]
}
}
}Restart VS Code
Reload the window or restart VS Code so the MCP server is detected.
Check the tools list
If it does not appear, test the command in a terminal and check extension logs.
常见问题
Wrong config location
Confirm the extension or client is reading the file you edited.
Runtime missing
Install Node.js, uv, Docker, Python, or the runtime required by the command.
FAQ
Can I reuse Cursor MCP JSON for VS Code?
Often yes, if the VS Code MCP client expects an mcpServers JSON object.
Should I restart VS Code?
Yes. Reload or restart after changing MCP config.