The Model Context Protocol (MCP) acts as a standard connector between AI coding agents and live external capabilities—documentation indexes, Playwright headless browsers, databases, and GitHub repositories. Setting up a valid mcp.json takes two minutes once you know each client's expected file path and JSON schema.
Open MCP Config (mcp.json) Generator
Toggle Playwright, Context7, GitHub & Postgres presets and export valid JSON per editor
MCP Configuration Paths by Editor
| Client / Editor | Config Path | Root Key |
|---|---|---|
| Cursor | .cursor/mcp.json | mcpServers |
| Claude Code | .mcp.json | mcpServers |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | mcpServers |
| VS Code | .vscode/mcp.json | servers |
Starter mcp.json Template (Stdio + HTTP)
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
},
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
},
"cloudflare": {
"url": "https://docs.mcp.cloudflare.com/mcp"
}
}
}
Security & Context Hygiene Tips
- Never hardcode tokens: Use
${ENV_VAR}placeholders and store secrets outside version control. - Enable only active servers: Loading 15 unused MCP tools bloats the agent's system prompt and degrades tool selection accuracy.
- Combine with concise rules: Pair MCP servers with a clean
CLAUDE.mdor modularSKILL.mdworkflows using our AI Rules Generator and Agent SKILL.md Hub.
Frequently Asked Questions
Where do I place mcp.json in Cursor and Claude Code?
Cursor reads .cursor/mcp.json in your repo or ~/.cursor/mcp.json globally. Claude Code reads .mcp.json at repo root.
Why does VS Code reject my Cursor mcp.json?
VS Code uses "servers" instead of "mcpServers" and expects an explicit "type": "stdio" or "http" property.