Skip to content

Menu

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.json

Claude Desktop config on macOS; Settings > Developer > Edit Config opens or creates it

From the docs, not run by us
%APPDATA%\Claude\claude_desktop_config.json

Claude Desktop config on Windows

From the docs, not run by us
~/.config/Claude/claude_desktop_config.json

Claude Desktop config on Linux

From the docs, not run by us
.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

From the docs, not run by us
.cursor/mcp.json / ~/.cursor/mcp.json

Cursor project config and global config

From the docs, not run by us
.mcp.json / ~/.copilot/mcp-config.json

VS Code with Copilot, current portable format: workspace root file and user file ($COPILOT_HOME/mcp-config.json when that variable is set)

From the docs, not run by us
.vscode/mcp.json

VS Code editor-managed workspace file with the servers key; tied to the Local harness that is due for removal in February 2027

From the docs, not run by us
~/.config/devin/mcp_config.json / .devin/mcp_config.json

Devin Desktop (formerly Windsurf) user and project files; %APPDATA%\devin\mcp_config.json on Windows

From the docs, not run by us

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

From the docs, not run by us
"type": "http", "url": "https://host/mcp"

Point Claude Code or VS Code at a Streamable HTTP server

From the docs, not run by us
"url": "https://host/mcp", "transport": "sse"

Devin Desktop: URL servers default to Streamable HTTP; set transport to sse only for a legacy endpoint

From the docs, not run by us
"headers": { "Authorization": "Bearer ..." }

Send a static auth header to a remote server (Claude Code, Cursor, VS Code, Devin)

From the docs, not run by us
"envFile": "${workspaceFolder}/.env"

Cursor stdio servers only: load variables from a dotenv file instead of listing them

From the docs, not run by us

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

From the docs, not run by us
"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

From the docs, not run by us
"env": { "TOKEN": "${env:GITHUB_TOKEN}" }

Cursor: read a variable from your environment; also works in command, args, url and headers

From the docs, not run by us
${userHome} ${workspaceFolder} ${/}

Cursor path variables for home folder, project root and the OS path separator

From the docs, not run by us
"${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

From the docs, not run by us
${env:VAR} ${file:/path/to/secret}

Devin Desktop: read a secret from an environment variable or from a file

From the docs, not run by us
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)

From the docs, not run by us

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/mcp

Claude Code: register a remote HTTP server under the name notion in local scope

From the docs, not run by us
claude mcp add -e KEY=val -s project name -- npx -y pkg

Claude Code: add a stdio server to the shared .mcp.json; everything after -- is the server command

From the docs, not run by us
claude mcp add-json name '{"command":"npx","args":["-y","pkg"]}'

Claude Code: paste a server block written for another client

From the docs, not run by us
claude mcp list / get <name> / remove <name>

Claude Code: show every server, inspect one, or delete one

From the docs, not run by us
/mcp reconnect all

Inside Claude Code: retry every failed or unauthenticated server (2.1.284 or later)

From the docs, not run by us
MCP: Add Server

VS Code command palette: guided setup; choose Copilot Global for the user file

From the docs, not run by us
MCP: List Servers

VS Code command palette: start, stop and inspect configured servers

From the docs, not run by us

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*.log

Follow Claude Desktop's MCP logs on macOS; mcp-server-NAME.log holds that server's stderr

From the docs, not run by us
tail -n 20 -f ~/.config/Claude/logs/mcp*.log

The same Claude Desktop logs on Linux

From the docs, not run by us
npx -y @modelcontextprotocol/server-filesystem ~/Desktop

Run the server command by hand to see its startup error outside the client

From the docs, not run by us
{"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

/mcp

Claude Code: see each server's status (connected, needs authentication, failed) and toggle it

From the docs, not run by us

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.

  1. Shared Claude Code file, committed as .mcp.json:
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": { "Authorization": "Bearer ${GITHUB_PAT}" }
    }
  }
}
  1. 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}" }
    }
  }
}
  1. 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.json unchanged.

    That file wants servers as the root key, not mcpServers. Better still, put new Copilot servers in the workspace .mcp.json, which does use mcpServers and outlives the Local harness.

  • Using ${env:TOKEN} in Claude Code's .mcp.json.

    Claude Code expands ${TOKEN} and ${TOKEN:-default}. The env: 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.json and only closing the window.

    Quit Claude Desktop fully from the menu and reopen it; the file is read at launch. Then check mcp.log if the server still does not appear.

  • Choosing SSE for a new server because an old tutorial did.

    Use Streamable HTTP (type: http in Claude Code and VS Code). Claude Code's docs mark SSE as deprecated and keep it only for servers that offer nothing newer.