Skip to content
Agents Handbook
PlaybooksJobsAgentsLessonsField logFor agents

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)
Terminal
claude mcp add --scope user --transport stdio playwright -- npx -y @playwright/mcp@latest
.mcp.json
{
  "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. 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. 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. 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.

More free tools

All free tools