If you've ever set up an MCP server in Cursor, copied the exact same block into VS Code's .vscode/mcp.json, and watched⦠nothing happen, this one's for you. No error. No server. Copilot just doesn't see it.
The fix takes ten seconds once you know it: VS Code doesn't read mcpServers. It wants servers.
And that's just one of them. Every AI coding tool speaks MCP, but almost none of them agree on the config file. Here's a side-by-side, so you don't have to dig through five sets of docs.
TL;DR
-
Claude Code, Cursor, Windsurf β JSON, root key
mcpServers -
VS Code (Copilot) β JSON, root key
servers, plus an optionalinputsarray for secrets -
Codex CLI β not JSON at all. It's TOML:
[mcp_servers.<name>]
ποΈ Where each tool looks
| Tool | File | Root key |
|---|---|---|
| Claude Code | .mcp.json |
mcpServers |
| Cursor | .cursor/mcp.json |
mcpServers |
| Windsurf | mcp_config.json |
mcpServers |
| VS Code | .vscode/mcp.json |
servers |
| Codex CLI | ~/.codex/config.toml |
[mcp_servers.*] |
π§© The "standard" version (Claude Code, Cursor)
This is the format most READMEs show you:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
}
}
}
}
Windsurf uses the same shape, with one twist: remote servers use serverUrl instead of url.
π VS Code: different key, better secrets
Two changes. The root key is servers, and each server gets a type.
The nice part is inputs. Instead of putting a token in the file (and eventually committing it), VS Code prompts you once and stores it securely:
{
"inputs": [
{
"type": "promptString",
"id": "github-token",
"description": "GitHub Personal Access Token",
"password": true
}
],
"servers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-token}"
}
}
}
}
βοΈ Codex CLI: it's TOML
Codex keeps everything in ~/.codex/config.toml. Each server is a table:
[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_PERSONAL_ACCESS_TOKEN}"
For remote servers, use url and, if needed, bearer_token_env_var to point at an environment variable instead of pasting the token.
β οΈ One more thing: idle servers aren't free
Every MCP server you leave enabled sends its tool definitions to the model on every turn. A few servers is fine. Eight servers you forgot about is a lot of tokens you pay for on every message.
What helps:
- Keep only the servers you use daily enabled
- Move occasional workflows into a
SKILL.md, which only loads when needed - Check the cache numbers in
~/.claude/projects/**/*.jsonlif the bill looks off
Wrapping up
The protocol is the same everywhere. The config file is not. If something "silently doesn't work", check the root key first. Nine times out of ten that's it.
I got tired of converting these by hand, so I put together a small converter that runs in the browser. The templates are also on GitHub.
Which client tripped you up the most? I'm curious if anyone has hit other differences I missed.
Top comments (0)