VS Code MCP guide

Generate a VS Code
MCP configuration.

Convert an existing MCP setup into VS Code’s project-level .vscode/mcp.json format, with the correct wrapper and an explicit transport type.

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