MCP config generator
Describe an MCP server once and get the exact config, file path and install command for Claude Desktop, Claude Code, Codex, VS Code and Cursor. It runs in your browser, needs no signup and stores nothing.
Write secrets as ${NAME}, or leave a value blank. The output reads them from your environment in each client's own syntax. Nothing you type leaves this page.
- Notedesktop apps do not load your shell PATH. If you see "spawn npx ENOENT", use the full path from `which npx`.
- Project (shared in git)
- .mcp.json
- User and local
- ~/.claude.json (written by claude mcp add)
claude mcp add --scope user --transport stdio playwright -- npx -y @playwright/mcp@latest{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}- Run the command, or put the JSON in .mcp.json at the root of your repo to share it with your team. Check it with /mcp inside Claude Code.
- On native Windows, wrap npx: claude mcp add ... -- cmd /c npx -y package.
How to use it
- 1
Describe the server
Pick a preset, or enter a name and either the command that starts a local server or the URL of a remote one. Write secrets as ${NAME} and they stay out of the file.
- 2
Copy it into your client
Pick your client. Copy or download the block and save it at the path shown, or run the command, or click the install link.
- 3
Restart and check
Quit the client fully and open it again. Then check the server list: /mcp in Claude Code, codex mcp list in Codex, MCP: List Servers in VS Code, the MCP settings in Cursor.
Questions
Where is the Claude Desktop MCP config file?
On macOS it is ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is %APPDATA%\Claude\claude_desktop_config.json. Open it from Claude Desktop with Settings, Developer, Edit Config. Local servers go under the mcpServers key, and you must quit and reopen Claude after each change. Remote servers do not go in this file: add them under Customize, Connectors, Add custom connector.
How do I add an MCP server to Claude Code globally?
Run claude mcp add with --scope user, for example: claude mcp add --scope user --transport http sentry https://mcp.sentry.dev/mcp. The default scope is local (this project, only you). --scope project writes .mcp.json at the repo root so your team gets the server too.
What is the difference between mcp.json in VS Code and in Cursor?
VS Code's .vscode/mcp.json puts servers under the key servers and needs a type (stdio or http) on each one. Cursor's .cursor/mcp.json and ~/.cursor/mcp.json use mcpServers. A file copied from one to the other loads no servers and shows no error.
How do I add an MCP server to Codex?
Codex reads TOML from ~/.codex/config.toml, or .codex/config.toml in a trusted project. Each server is a [mcp_servers.name] table with command and args, or url for a remote server. You can also run codex mcp add name -- command args. There is no type field: url means HTTP, command means stdio.
How do I keep API keys out of my MCP config?
Reference an environment variable instead of pasting the key. Claude Code reads ${NAME} in .mcp.json. Cursor reads ${env:NAME}. VS Code can prompt once with ${input:id} and store the value. Codex forwards variables listed in env_vars and reads bearer tokens with bearer_token_env_var. Claude Desktop does not expand variables, so its file holds the value itself.
Why does my MCP server fail with spawn npx ENOENT?
The client cannot find npx. Desktop apps start without your shell PATH, so a command that works in your terminal can fail there. Run which npx and put that full path in command. On native Windows, Claude Code needs cmd /c in front of npx.
My config looks right, so why do no MCP servers load?
Usually the JSON does not parse. One trailing comma or curly quote makes the client skip every server in the file. Paste the file into the checker on this page. The other common causes are the wrong top-level key for the client and not quitting the app fully before you test.
Sources
Every path, key and command comes from the vendor docs below. We checked them on 2026-10-30.
- Connect to local MCP servers (Claude Desktop)
- Custom connectors with remote MCP (Claude Help Center)
- Connect to remote MCP servers (Claude)
- Connect Claude Code to tools via MCP
- Codex: Model Context Protocol
- VS Code: MCP configuration reference
- VS Code: MCP install links (developer guide)
- Cursor: Model Context Protocol
- Cursor: MCP install links
Related playbooks
- Test your local web app in a real browser and fix console errors in one loop
- Triage a production error from Sentry or logs into a tested fix pull request
- Move pages that rank on page two of Google onto page one with Search Console data
- Run a weekly SEO agent that checks your site and opens fixes for you to review
- Build a small internal automation with n8n's AI builder and test it before it goes live
- Do a literature review with an agent that finds, screens and summarises real papers
More free tools
- AGENTS.md GeneratorWrite a lean AGENTS.md for Codex, Cursor, Copilot and Claude Code, or check the one you have.
- CLAUDE.md GeneratorWrite a CLAUDE.md for Claude Code, share it with AGENTS.md, or check the one you have.
- SKILL.md ValidatorCheck a SKILL.md against the Agent Skills spec and get each fix, with the source for every rule.
- Claude Code Permissions BuilderBuild the permissions block of Claude Code's settings.json, with presets, plain rules and risk checks.
- Claude Code Cost CalculatorCompare Claude Code on the API with Pro, Max 5x and Max 20x, from your real token counts or an estimate.
- AI Agent FinderType a job and see which AI agents our sourced playbooks use for it, ranked by evidence.