What MCP is, in one paragraph
The Model Context Protocol (MCP) is an open standard that lets AI applications talk to outside tools and data — files, databases, browsers, APIs — through a common interface. An MCP server exposes capabilities (tools, resources, prompts); an MCP client like Claude Desktop or Claude Code connects to it and lets the model call those capabilities mid-conversation. The config JSON this page generates is the wiring: it tells the client which servers exist, how to start or reach them, and what credentials they need. That’s the whole job — one JSON object, and Claude can suddenly read your repo, query your database, or drive a browser.
Where the config file lives
Claude Desktop
One file, one scope — everything global:
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
|---|---|
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
The file doesn’t exist until you create it. The reliable path: Claude Desktop → Settings → Developer → Edit Config, which creates the file and opens its folder. Paste your config, save, then quit Claude Desktop completely and reopen it — closing the window isn’t enough; the app keeps running in the menu bar/tray and won’t reread the file.
Claude Code
Three scopes, from most private to most shared:
| local | Default for claude mcp add. Stored per-project in ~/.claude.json — just you, just this project. |
|---|---|
| project | .mcp.json at the repo root, checked into git — the whole team gets the server. This is the file to paste the generated JSON into. |
| user | claude mcp add --scope user — you, in every project on this machine. |
Manage servers with claude mcp list, claude mcp get <name>,
and claude mcp remove <name>, or check connection health from inside a
session with the /mcp command.
The JSON shape
Every MCP config is one mcpServers object. Each key is a server name you
choose; each value says how to run or reach that server. A stdio entry:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/Documents"],
"env": { "AN_EXAMPLE_TOKEN": "value" }
}
}
}
command— the executable only."command": "npx -y foo"is the classic mistake: the client tries to launch a program literally namednpx -y fooand fails.args— an array of strings, one element per argument. Spaces inside an element are fine; that’s the point of the array.env— a flat object of environment variables handed to the server process. Optional; omit it when empty.
A remote entry (Claude Code) swaps command/args for a transport and URL:
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ghp_your-token" }
}
}
}
In Claude Code’s .mcp.json you can also reference environment variables
instead of hardcoding secrets: "Authorization": "Bearer ${GITHUB_TOKEN}", with
${VAR:-default} for fallbacks. That expansion is a Claude Code feature —
Claude Desktop does not expand ${VAR}; it passes the literal string through.
stdio vs remote servers
stdio servers are processes the client launches on your machine and talks to over stdin/stdout. They’re the right choice for anything touching local state — your files, your git repos, a local database. Cost: the client must be able to find and run the command, which is where most setup failures happen (see gotchas).
Remote servers are hosted services you connect to over HTTPS. No local
install, credentials via headers or OAuth, always up to date — the right choice for SaaS
integrations like GitHub, Sentry, or Linear. Two transports exist: streamable
HTTP ("type": "http", the current standard) and SSE
("type": "sse", deprecated — use it only when a server offers nothing newer).
Client support differs, and this trips people up: Claude Code speaks both
natively. Claude Desktop’s config file only launches stdio servers; its
native remote connections are the Connectors directory (Settings → Connectors). To pin a
specific remote server in Desktop’s config file anyway, bridge it with
mcp-remote — a stdio proxy that forwards to the URL. The generator above does
this automatically when you pick Claude Desktop + a remote type.
Common gotchas
- Invalid JSON kills the whole file. No comments, no trailing commas, straight quotes only (beware editors that autocorrect
"to“). One bad character and every server in the file fails to load. Paste-validate before you save. - Changes need a real restart. Claude Desktop must be fully quit (macOS: Cmd+Q; Windows: quit from the tray) — not just closed. Claude Code picks up
.mcp.jsonon the next session start. - “npx: command not found” in Desktop. GUI apps don’t get your shell’s PATH, so node installed via nvm is invisible to Claude Desktop. Fix: use the absolute path from
which npxas the command, or install node system-wide. - Windows often needs a
cmdwrapper. If an npx server won’t start, use"command": "cmd"with"args": ["/c", "npx", "-y", "…"]. - Your shell’s exports don’t reach servers. An API key in
.zshrcis not seen by a server launched by Claude Desktop. Put it in the entry’senvblock. ${VAR}only expands in Claude Code. In Desktop’s config it’s passed through literally — hardcode the value or use a wrapper script.- Every server costs context. Each connected server’s tool definitions are loaded into the model’s context window. A dozen servers can eat a meaningful chunk before you type a word. Connect what you use.
- When it still won’t connect, read the logs. Claude Code:
claude mcp listshows per-server status, andclaude --debugshows startup errors. Claude Desktop:~/Library/Logs/Claude/mcp*.logon macOS,%APPDATA%\Claude\logson Windows.
Trust note
An MCP server runs with your permissions and its tools act on your behalf. Install servers the way you’d install a shell extension: from sources you trust, with tokens scoped as narrowly as the service allows. This page generates config locally in your browser — nothing you type here is sent anywhere.