MCP Config Cheat Sheet: File Paths and JSON for Every Client
Checked against MCP clients (Claude Desktop, Claude Code, Cursor, VS Code Copilot, Devin Desktop) Claude Code 2.1.332; VS Code MCP reference dated 25 Nov 2026; Cursor, Devin and modelcontextprotocol.io docs read 28 Nov 2026 on 28 November 2026. Each section links to the official docs it was checked against.
This sheet is for anyone who has pasted an MCP server snippet into one client and watched it fail in another. It lists the config file, root key, transport fields and secret syntax for Claude Desktop, Claude Code, Cursor, VS Code with Copilot and Devin Desktop (the editor formerly called Windsurf), as documented on 28 November 2026. Every path and key below comes from each vendor's own docs, linked per section.
When to use what
Start with where the server runs. A local process that talks over stdin and stdout (an npx or uvx package) is a stdio server and needs command plus args. A hosted server is a URL, and today that means Streamable HTTP; SSE still works in most clients but every vendor now calls it legacy, so only pick it when the server offers nothing else.
Then pick the scope. Put a server in the project file (.mcp.json, .cursor/mcp.json, .devin/mcp_config.json) when the whole team needs it and the file holds no secrets. Put it in your user file when it is personal or carries a token. In Claude Code the default local scope is the private choice and project is the shared one.
For secrets, never paste the token into a committed file. Each client has its own placeholder syntax, and that is the part people get wrong when they copy configs between tools: Claude Code and the portable Copilot format use ${VAR}, Cursor and Devin use ${env:VAR}, and the older VS Code .vscode/mcp.json format uses ${input:id} prompts or ${env:VAR}. Claude Desktop's JSON has no placeholder syntax at all, so you put the value in the env block of a file that lives outside any repo. If you are writing one config to share across clients, keep it in the mcpServers shape and change only the placeholder lines. Our MCP config generator writes the right shape for each client, and the validator catches a wrong root key before you restart anything.
Claude Desktop paths are from modelcontextprotocol.io; the other rows link to each vendor in the sections below. Claude Desktop reads its file only at launch, so quit it fully (not just close the window) after an edit.
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop config on macOS; Settings > Developer > Edit Config opens or creates it
%APPDATA%\Claude\claude_desktop_config.jsonClaude Desktop config on Windows
~/.config/Claude/claude_desktop_config.jsonClaude Desktop config on Linux
.mcp.json (project) / ~/.claude.json (local and user scope)Claude Code: the shared project file, and the private file where local and user scope servers are stored
.cursor/mcp.json / ~/.cursor/mcp.jsonCursor project config and global config
.mcp.json / ~/.copilot/mcp-config.jsonVS Code with Copilot, current portable format: workspace root file and user file ($COPILOT_HOME/mcp-config.json when that variable is set)
.vscode/mcp.jsonVS Code editor-managed workspace file with the servers key; tied to the Local harness that is due for removal in February 2027
~/.config/devin/mcp_config.json / .devin/mcp_config.jsonDevin Desktop (formerly Windsurf) user and project files; %APPDATA%\devin\mcp_config.json on Windows
Everyone except the old VS Code format uses mcpServers. A file with the wrong root key usually loads with no error and no servers, which is why it is the first thing to check. Paste the file into the MCP config validator to check it.
{ "mcpServers": { "name": { ... } } }Root shape for Claude Desktop, Claude Code, Cursor, Devin and the portable Copilot files
{ "servers": { ... }, "inputs": [ ... ] }Root shape for VS Code's editor-managed .vscode/mcp.json and profile mcp.json, with optional prompt definitions in inputs
"command": "npx", "args": ["-y", "pkg"]Start a local stdio server; the command must be on PATH or given as a full path
"type": "http", "url": "https://host/mcp"Point Claude Code or VS Code at a Streamable HTTP server
"url": "https://host/mcp", "transport": "sse"Devin Desktop: URL servers default to Streamable HTTP; set transport to sse only for a legacy endpoint
"headers": { "Authorization": "Bearer ..." }Send a static auth header to a remote server (Claude Code, Cursor, VS Code, Devin)
"envFile": "${workspaceFolder}/.env"Cursor stdio servers only: load variables from a dotenv file instead of listing them
In Claude Code an unset variable with no default is left as the literal ${VAR} text with a warning, and a variable set to an empty string counts as set, so :-default does not kick in. Our env validator helps check a .env file before you point envFile at it.
"Authorization": "Bearer ${API_KEY}"Claude Code .mcp.json: expand a shell variable in command, args, env, url or headers
"url": "${API_BASE_URL:-https://api.example.com}/mcp"Claude Code: fall back to a default when the variable is unset; the portable Copilot format accepts the same two forms
"env": { "TOKEN": "${env:GITHUB_TOKEN}" }Cursor: read a variable from your environment; also works in command, args, url and headers
${userHome} ${workspaceFolder} ${/}Cursor path variables for home folder, project root and the OS path separator
"${input:api-key}" + "inputs": [{"type": "promptString", "id": "api-key", "password": true}]VS Code editor-managed files: prompt for a secret once instead of storing it; not supported in the portable files
${env:VAR} ${file:/path/to/secret}Devin Desktop: read a secret from an environment variable or from a file
claude mcp add --env KEY=value ...Claude Code CLI: store an env pair with the server (lands in ~/.claude.json for local or user scope)
Claude Desktop's JSON file covers local stdio servers. For a hosted server in Claude Desktop or claude.ai, add it under Settings > Connectors > Add custom connector, per the remote-server guide on modelcontextprotocol.io.
claude mcp add --transport http notion https://mcp.notion.com/mcpClaude Code: register a remote HTTP server under the name notion in local scope
claude mcp add -e KEY=val -s project name -- npx -y pkgClaude Code: add a stdio server to the shared .mcp.json; everything after -- is the server command
claude mcp add-json name '{"command":"npx","args":["-y","pkg"]}'Claude Code: paste a server block written for another client
claude mcp list / get <name> / remove <name>Claude Code: show every server, inspect one, or delete one
/mcp reconnect allInside Claude Code: retry every failed or unauthenticated server (2.1.284 or later)
MCP: Add ServerVS Code command palette: guided setup; choose Copilot Global for the user file
MCP: List ServersVS Code command palette: start, stop and inspect configured servers
Most failures are a missing runtime (no Node on the PATH the app sees), a relative path in args, or a server that writes logs to stdout and corrupts the JSON-RPC stream. To see what the server actually sends, paste its messages into the JSON-RPC inspector.
tail -n 20 -f ~/Library/Logs/Claude/mcp*.logFollow Claude Desktop's MCP logs on macOS; mcp-server-NAME.log holds that server's stderr
tail -n 20 -f ~/.config/Claude/logs/mcp*.logThe same Claude Desktop logs on Linux
npx -y @modelcontextprotocol/server-filesystem ~/DesktopRun the server command by hand to see its startup error outside the client
{"jsonrpc":"2.0","id":1,"method":"tools/list"}The request a client sends to list tools; use it to check a server's reply by hand
/mcpClaude Code: see each server's status (connected, needs authentication, failed) and toggle it
Worked example: One GitHub server, set up for three clients
Say your team wants the GitHub MCP server in Claude Code and Cursor through the repo, and you also want it in Claude Desktop. GitHub hosts it at https://api.githubcopilot.com/mcp/ (check the server's own README for the current URL), and it needs a personal access token.
- Shared Claude Code file, committed as
.mcp.json:
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${GITHUB_PAT}" }
}
}
}
- Cursor file, committed as
.cursor/mcp.json. Same shape, different placeholder:
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${env:GITHUB_PAT}" }
}
}
}
- Each developer runs
export GITHUB_PAT=...in the shell profile that launches the editor, then starts Claude Code and runs/mcp.
What you should see: Claude Code asks once whether to trust the project servers from .mcp.json, then lists github as connected. If it shows as failed, the usual cause is that the variable was missing when Claude Code started, so it sent the literal text ${GITHUB_PAT} and GitHub rejected it. Cursor resolves ${env:GITHUB_PAT} the same way, but only if the editor was launched from an environment that has it, which is not the case when you open it from the Dock on macOS.
Claude Desktop is the odd one out. Its JSON runs local stdio servers, so for a hosted server like this one you add a custom connector under Settings > Connectors instead of editing claude_desktop_config.json. We parsed both JSON files above with JSON.parse in Node to make sure they are valid; the client behaviour described is from the vendors' docs.
Common mistakes
Copying a Claude Desktop block into
.vscode/mcp.jsonunchanged.That file wants
serversas the root key, notmcpServers. Better still, put new Copilot servers in the workspace.mcp.json, which does usemcpServersand outlives the Local harness.Using
${env:TOKEN}in Claude Code's.mcp.json.Claude Code expands
${TOKEN}and${TOKEN:-default}. Theenv:prefix is Cursor, Devin and VS Code editor-managed syntax, and Claude Code will pass the text through untouched.Committing a real API key in a project-scoped config file.
Keep the placeholder in the committed file and the value in your shell or a gitignored file such as
.devin/mcp_config.local.json. Rotate any key that has already reached git history.Giving relative paths in
args, such as./data.Desktop apps start servers from their own working directory, so relative paths resolve somewhere unexpected. Use absolute paths, or Cursor's
${workspaceFolder}variable.Editing
claude_desktop_config.jsonand only closing the window.Quit Claude Desktop fully from the menu and reopen it; the file is read at launch. Then check
mcp.logif the server still does not appear.Choosing SSE for a new server because an old tutorial did.
Use Streamable HTTP (
type: httpin Claude Code and VS Code). Claude Code's docs mark SSE as deprecated and keep it only for servers that offer nothing newer.
Related cheat sheets
Sources
- https://modelcontextprotocol.io/docs/develop/connect-local-servers
- https://modelcontextprotocol.io/docs/develop/connect-remote-servers
- https://code.claude.com/docs/en/mcp
- https://cursor.com/docs/context/mcp
- https://code.visualstudio.com/docs/agents/reference/mcp-configuration
- https://docs.devin.ai/desktop/cascade/mcp
- https://docs.devin.ai/cli/extensibility/mcp/configuration.md
- https://github.com/anthropics/claude-code/releases
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.