Skip to content

Set up MCP servers in Visual Studio Code

Which configuration file format Visual Studio Code reads, what it is called and where it belongs – from the vendor’s own documentation, with source and collection date.

File format
File formatJSON in VS Code format with the root key "servers".
File namemcp.json

The builder generates the VS Code format at .vscode/mcp.json with servers. Current vendor documentation recommends the portable .mcp.json at the project root with mcpServers for new servers. Match the file location to its root key. This guide and format checker refer to the file generated here.

Location

Location
all systems.vscode/mcp.json

Source: code.visualstudio.com/docs/agent-customization/mcp-servers, retrieved on 2026-10-01

In three steps

  1. Create the file mcp.json – for Visual Studio Code it lives at .vscode/mcp.json. The full table per operating system is above.
  2. Put the server block under the key servers. That key is what tells the clients apart.

    Example from today’s directory, produced by the setup builder of this site. Entry: io.github.transloadit/mcp-server

    {
      "servers": {
        "io-github-transloadit-mcp-server": {
          "command": "npx",
          "args": [
            "-y",
            "@transloadit/mcp-server"
          ],
          "env": {
            "TRANSLOADIT_SECRET": ""
          }
        }
      }
    }

    download as mcp.json

    To the entry behind this example

  3. Visual Studio Code restarts the server to discover the tools it provides. With the setting chat.mcp.autostart this happens by itself when the configuration changes. This is what the source named above states.
  4. Check that the file stays valid and that you fill in the values of the secret variables yourself: the registry does not know them and writes only their names.

The root key

A file with the wrong root key is read and does nothing – without an error message. That is why the format is stated here next to the location.

Other clients read a different format: Claude Desktop, Claude Code, Cursor, Windsurf, Codex CLI. All clients side by side

Build a configuration for Visual Studio Code

The builder forms the block from the registry data of a chosen server and prints it in exactly the format Visual Studio Code reads.

Build a configuration for Visual Studio Code

What the builder can produce a file for

16,884 of the 47,245 published entries carry a package coordinate from which a published start template forms a block. The remaining 30,361 name no package or a source without a published template; for those the builder produces nothing and says why.

When it does not work

When it does not work
The client reads the file and does nothingCheck the file location and root key together. The file generated here for Visual Studio Code uses servers. Valid JSON alone does not establish that its format matches the chosen location.
The server starts and reports missing credentialsThe generated variables carry their name and an empty value. Which values belong there is stated by the vendor – the registry does not collect them.
No block is produced for an entry at allThen the registry entry carries no package, its package registry has no disclosed template here, or its identifier does not look like a package name. The builder names the reason; nothing is invented.

Setup and connections

All posts

What is NOT stated here

This registry holds no statement about which server works with which client. No manifest declares a client list, and the registry invents none. What is stated here is the file format and its location according to the client’s own documentation – not a claim about a server.

Client knowledge version: 1

tracevero · https://tracevero.com/klient/vscode