1. Where Each Client Looks for MCP Config Files
The Model Context Protocol (MCP) standardizes how AI clients communicate with local tools via `stdio` (spawned subprocesses) or remote `http`/`sse` endpoints. Even though the JSON `mcpServers` object is nearly identical across clients, each application stores its configuration file in a different path:
- Claude Desktop (macOS): `~/Library/Application Support/Claude/claude_desktop_config.json`
- Claude Desktop (Windows): `%APPDATA%\Claude\claude_desktop_config.json`
- Cursor (Per-Project): `<repo>/.cursor/mcp.json`
- Cursor (Global): `~/.cursor/mcp.json`
- Windsurf: `~/.codeium/windsurf/mcp_config.json`
2. A Clean, Production-Ready mcp.json Example
Here is a minimal configuration combining the Official Filesystem MCP, Context7 (live documentation), and Playwright MCP. Notice the `-y` flag on `npx` so npm never hangs waiting for an interactive `[y/N]` prompt over stdio.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/dev/projects"]
},
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
},
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
}3. Troubleshooting the 4 Most Common MCP Pitfalls
If a server shows a red dot or fails silently on startup, check these four causes first before debugging the server itself:
- NVM / Homebrew PATH mismatch: GUI apps launched from Spotlight do not source `~/.zshrc`. Run `which npx` in your terminal and use the absolute path if `command: "npx"` fails with ENOENT.
- Stdout pollution: stdio MCP servers exchange JSON-RPC over stdout. Never configure a wrapper script that prints `console.log` banners to stdout—logs must go to stderr.
- Trailing commas in JSON: Standard `mcp.json` is strict JSON, not JSONC. Validate with our MCP Config Generator before saving.
- Over-scoped credentials: When enabling GitHub, Postgres, or Supabase MCPs, use read-only database users and fine-grained PATs scoped only to non-destructive repositories.