How VS Code’s format differs
Most MCP clients store definitions under mcpServers. VS Code instead uses a top-level servers object and expects a transport type. For local processes, the type is stdio; for current remote endpoints, it is usually http.
{
"servers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"${workspaceFolder}"
]
}
}
}
Generate .vscode/mcp.json →
Convert from another AI client
Select Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Windsurf or Cline as the source. MCP Config Lab normalizes common URL aliases, infers the transport, changes the wrapper to servers, and produces readable JSON.
Project paths and environment variables
VS Code understands workspace variables such as ${workspaceFolder}. They are useful for project-scoped servers but may not work after converting the same file to a different client. Keep real tokens outside the JSON and reference environment variables rather than pasting secret values.
Common VS Code MCP mistakes
- Using
mcpServersinstead of the VS Codeserverswrapper - Omitting the transport
type - Putting the entire command line in
commandinstead of separatingargs - Using an unencrypted HTTP URL for a non-local remote server
- Committing access tokens directly in request headers