VS Code with Copilot: wrong root key in mcp.json
The MCP config for VS Code Copilot uses `servers`, not `mcpServers` like Cursor and Claude Desktop. Where the file lives, the right shape, and why nothing appears in agent mode.
The symptom
You copy-pasted an MCP config from a Cursor or Claude Desktop walkthrough into VS Code's mcp.json. The file parses cleanly. Copilot Chat in agent mode acts like the server is not there.
The fix: it is servers, not mcpServers
VS Code uses a different root key from Cursor and Claude Desktop. Same shape under the hood, different word.
VS Code (correct):
{
"servers": {
"hjarni": {
"type": "http",
"url": "https://hjarni.com/mcp"
}
}
}
Cursor and Claude Desktop (the shape VS Code ignores):
{
"mcpServers": {
"hjarni": { "url": "https://hjarni.com/mcp" }
}
}
Same content. Wrong key for VS Code. The file parses, but Copilot registers zero servers.
Where the file lives
- Per-project:
.vscode/mcp.jsoninside the repo. Commit it if your team should share the server. - User-wide: Command Palette → "MCP: Open User Configuration". VS Code opens the user-level
mcp.jsonfor you. Editing it by hand is brittle because the path varies by OS and VS Code build.
Where the tools appear
MCP tools surface in Copilot Chat agent mode. They do not show up in inline completions or in ask/edit modes. Switch the chat to agent mode (icon at the top of the Chat panel) and then check the tools picker.
If you are on Copilot Business or Enterprise, an admin policy may restrict which MCP servers your account may use. Ask your admin to allow-list the server.
Check the Output panel
Open View → Output and pick MCP in the dropdown. The handshake log shows whether the file was parsed, which servers were registered, and any error a server returned during startup. A bad root key prints 0 servers registered even though there are no JSON parse errors.