What MCP is, briefly
Model Context Protocol is Anthropic's open standard for letting LLM clients (Claude Desktop, Claude Code, Cursor, etc.) connect to external tools and data sources. An MCP server is a separate process that the client launches; it exposes tools over a JSON-RPC channel. The config block tells the client what to launch.
Servers are typically tiny CLIs invoked via npx (Node-based) or uvx (Python). The args spell out connection details (paths, URLs); env vars carry secrets (API keys, tokens). Don\'t check secrets into version control — keep them in env.
FAQ
- Where exactly does Claude Desktop's config live?
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json. Windows:%APPDATA%\Claude\claude_desktop_config.json. Linux:~/.config/Claude/claude_desktop_config.json. - Difference between global and project-local config?
- Global config (
claude_desktop_config.json) applies to every conversation. Project-local.mcp.jsononly applies when Claude Code is opened in that project. Use project-local for repo-specific servers (e.g., a Postgres MCP pointing at the project DB). - How do I find a server's exact command?
- Most published MCP servers ship as npm or uv packages. Their READMEs show the exact
command+argsshape. Search "MCP server" + your tool of interest, or browse the official servers repo. - Why aren't my env vars showing up?
- Empty key strings are skipped silently. Make sure each row has both KEY and value. Some servers also need flags via args, not env (check the server's docs).
Common pitfalls
- Restarting fails to pick up new server. Quit Claude Desktop fully (right-click → Quit, not just close window).
- Using relative paths in args. Use absolute paths or env-var references.
- Forgetting trailing punctuation in JSON when editing manually. Let this tool produce it.
- Putting secrets in args (visible in process list) instead of env.