MCP Config Generator — Claude, Cursor, VS Code, Windsurf & Codex

Define an MCP server once and get the exact config file or command for Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and Codex.

Add a popular server
Only the executable: npx, uvx, docker, node, or a full path.
KEY=value per line. Write ${VAR} to reference a variable from your shell.
Each line becomes one array item. Paths with spaces are fine.
Leave headers empty for servers that use OAuth sign-in.
Name: value per line.
claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects"
      ]
    },
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.githubcopilot.com/mcp/",
        "--header",
        "Authorization:${MCP_HEADER_1}"
      ],
      "env": {
        "MCP_HEADER_1": "Bearer ${GITHUB_PAT}"
      }
    }
  }
}
  • File: macOS ~/Library/Application Support/Claude/claude_desktop_config.json, Windows %APPDATA%\Claude\claude_desktop_config.json (open it from Settings > Developer > Edit Config). Fully quit and reopen Claude after saving.
  • Remote servers are bridged with mcp-remote (needs Node.js). On paid plans you can instead add the URL under Settings > Connectors, which handles OAuth for you.
  • Claude Desktop does not expand ${VAR} in this file; replace those placeholders with real values.

Runs entirely in your browser. Configs often contain API tokens, so nothing you type or paste is uploaded or stored. Browse all free tools.

Found a problem, or something that could be better? We read every message and we fix things quickly.

This MCP config generator writes the Model Context Protocol server settings for every major AI client from one form. Each client wants a slightly different file: Claude Desktop and Cursor use an "mcpServers" object, VS Code uses "servers" with a required "type", Windsurf calls the remote URL "serverUrl", Claude Code needs "type" on remote entries, and Codex uses TOML tables. Enter the command or URL once and copy the right version for the tool you use.

The validator does the reverse: paste a config that is not loading and it points at the JSON error, the missing field or the key the client does not read, then loads the servers into the form so you can convert them. It checks structure, not whether the server package exists or the token is valid; if a server still fails, check the client's MCP log.

How to use

  1. Click a preset such as Filesystem or GitHub, or add a blank server.
  2. For a local server, set the command (npx, uvx, docker) and put each argument on its own line. For a remote server, set the URL and any headers.
  3. Optionally tick the option that keeps secrets out of the file and replaces values with ${VAR} references.
  4. Pick your client, then copy or download the output and save it at the path shown under it.
  5. Restart the client (fully quit Claude Desktop) so it reloads the config. To fix an existing file, paste it in Validate & convert.

Frequently asked questions

Where is claude_desktop_config.json?

On macOS it is ~/Library/Application Support/Claude/claude_desktop_config.json and on Windows %APPDATA%\Claude\claude_desktop_config.json. The easiest way to open it is Claude Desktop's Settings > Developer > Edit Config. Fully quit and reopen Claude after saving, because the file is only read at startup.

What is the difference between Claude Code's .mcp.json and claude mcp add?

claude mcp add registers a server from the terminal. With the default local scope it is stored in ~/.claude.json for you and the current project only; --scope user makes it available in all your projects; --scope project writes it to .mcp.json in the project root so the team shares it through version control. Each entry in .mcp.json should carry a "type" (stdio, http or sse); an entry with a url but no type is read as stdio and fails.

Why does VS Code ignore my mcpServers config?

VS Code reads .vscode/mcp.json with a top-level "servers" key, not "mcpServers", and each server needs "type": "stdio", "http" or "sse". A file copied from a Claude or Cursor README therefore loads nothing. Paste it into the validator and convert it to the VS Code format.

How do I keep API keys out of my MCP config?

Reference environment variables instead of pasting values. Claude Code expands ${VAR} and ${VAR:-default}; Cursor and Windsurf use ${env:VAR}; VS Code supports ${env:VAR} and ${input:id} prompts that store the secret securely; Codex forwards variables with env_vars, env_http_headers and bearer_token_env_var. Claude Desktop does not expand variables in its config, so values there must be literal.

How do I add a remote MCP server to Claude Desktop?

Claude Desktop's config file only launches local commands. On paid plans you can add a remote server URL under Settings > Connectors, which also handles OAuth sign-in. Otherwise, bridge it with mcp-remote: the command is npx with arguments -y, mcp-remote and the server URL, plus --header options for authentication. The generator writes that bridge for you when you pick Claude Desktop.

What is the difference between stdio, HTTP and SSE transports?

stdio servers run as a local process that the client starts and talks to over standard input and output, which suits tools that read files or run on your machine. Streamable HTTP servers run remotely at a URL and are the current standard for hosted servers. SSE is the older remote transport; Claude Code marks it deprecated and Codex supports only streamable HTTP, so prefer HTTP when a server offers both.

MCP config file locations and formats

• Claude Desktop: claude_desktop_config.json in ~/Library/Application Support/Claude (macOS) or %APPDATA%\Claude (Windows). Top-level "mcpServers"; entries have command, args and env.

• Claude Code: .mcp.json in the project root (project scope) or ~/.claude.json (local and user scope, managed by claude mcp add). Top-level "mcpServers" with "type" on each entry.

• Cursor: .cursor/mcp.json in the project or ~/.cursor/mcp.json globally. "mcpServers"; remote entries use "url" and "headers".

• VS Code: .vscode/mcp.json in the workspace, or the user-level file opened with "MCP: Open User Configuration". Top-level "servers" plus optional "inputs".

• Windsurf: ~/.codeium/windsurf/mcp_config.json. Windsurf's docs now live under Devin Desktop, which uses ~/.config/devin/mcp_config.json (macOS/Linux) or %APPDATA%\devin\mcp_config.json. Remote entries use "serverUrl".

• Codex: ~/.codex/config.toml, or .codex/config.toml in a trusted project. One [mcp_servers.<name>] table per server, with command/args/env or url plus bearer_token_env_var and http_headers.

Common reasons an MCP server does not load

• The whole command is in "command" ("npx -y @scope/server"). The client looks for an executable with that full name. Put npx in command and the rest in args, one item each.

• A trailing comma or a // comment in the JSON. Only VS Code's mcp.json accepts comments; the other clients need strict JSON.

• npx or uvx not found. GUI apps on macOS do not always inherit your shell PATH; use the full path from `which npx` as the command.

• The wrong top-level key: "servers" in a Claude or Cursor file, or "mcpServers" in VS Code.

• A remote entry without "type" in Claude Code's .mcp.json, which is then treated as a local command.

• The client was not restarted. Claude Desktop reads the file at startup only; Cursor and VS Code show server status in their MCP settings panels.

Security notes before you add a server

An MCP server runs with your permissions: a filesystem server can read and change every folder you list, and a database server can run queries with the credentials you give it. Grant the narrowest scope that works, such as one project folder, a read-only database user or a fine-grained GitHub token limited to the repositories you need.

Install servers from their official publisher, pin versions for anything that touches production, and prefer remote servers with OAuth over long-lived tokens pasted into a file. Treat tool output as untrusted input: a web page or issue fetched by a server can contain instructions aimed at the model.

Related free tools

  • JSON Formatter — Pretty-print, minify and validate JSON, with parse errors located by line and column. In your browser, no upload.
  • Prompt Template Builder — Write a prompt with {{variables}}, fill it from a form or a CSV, and export one prompt per row as text, CSV, or OpenAI and Anthropic batch files.
  • LLM API Cost Calculator — Compare the cost of your workload across 40+ models, with caching, batch discounts, long-context tiers and reasoning tokens. Prices sourced and dated.
  • llms.txt Generator — Create a spec-compliant llms.txt from a form, a URL list or your sitemap, validate an existing one, and generate robots.txt rules for AI crawlers.