MCP Config Generator and Validator
Build a working MCP config file for Claude Desktop, Cursor, VS Code, Claude Code or Windsurf, or paste the one you have and see exactly why it does not load.
The generator writes claude_desktop_config.json, mcp.json or .mcp.json with correctly escaped absolute paths. The validator reports the line and column of each problem and can rewrite the file for another host. Everything runs in your browser.
Generate an MCP config file
Validate and fix an MCP config
Where each host keeps its MCP config
The five hosts agree on the idea (a name, a command and its arguments) but not on the details. These are the differences the generator handles for you:
| Host | File | Top-level key | Remote server |
|---|---|---|---|
| Claude Desktop | claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) | mcpServers | Not in this file: use Settings > Connectors, or npx mcp-remote |
| Cursor | ~/.cursor/mcp.json or .cursor/mcp.json | mcpServers | "url" plus optional "headers" |
| VS Code | .vscode/mcp.json or the user profile | servers | "type": "http" and "url" |
| Claude Code | .mcp.json in the project root | mcpServers | "type": "http" and "url" (a url without type is skipped) |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | mcpServers | "serverUrl" ("url" also accepted) |
VS Code also accepts comments and trailing commas in its file. The other hosts read strict JSON, so a file that works in VS Code can fail when you copy it to Cursor. Use Fix & convert to move a config between hosts.
What the validator checks
- JSON syntax with line and column: trailing commas, comments, curly quotes, missing commas or braces, and single backslashes in Windows paths. It also catches
"C:\new", which is valid JSON but turns\ninto a line break. - Duplicate server names.
JSON.parsekeeps the last one without a warning, so an earlier server disappears. - Structure for the chosen host:
mcpServersversusservers, a bare server entry with no wrapper, a missingcommandorurl, and an unknowntype. - Launch problems: a whole shell line in
command,argswritten as a string,npxwithout-y, a barepythonthat may lack themcppackage,npm startbanners on stdout, relative script paths and~. - Values: non-string env values, empty or placeholder values such as
<your key>, and tokens that look real in files that usually get committed.
A clean result means the file is well formed and every entry can be launched as written. It cannot tell whether the program at that path exists on your machine. For that, run the server under the MCP Inspector first; the testing guide shows how.
How we tested the output
On 2026-10-19 we generated one TypeScript and one Python server with the MCP Server Generator, installed both, and produced configs for all five hosts with this page's code. Each config parsed with JSON.parse, passed the validator with zero errors, and launched its server from the exact command and args it contains; an MCP client then listed the tools and called them. We also ran 23 deliberately broken configs through the validator and each problem was reported; Fix & convert turned the broken example on this page into a file with zero errors for all five hosts.
Need a server to put in the config?
Describe your tools in a form and download a TypeScript or Python MCP server with typed parameters and a README. Free, no account, no OpenAPI.
FAQ
How do I write a Windows path in claude_desktop_config.json or mcp.json?
Double every backslash: C:\\Users\\me\\weather\\.venv\\Scripts\\python.exe. A single backslash either breaks the JSON or, in sequences such as \n and \t, silently becomes a line break or tab. Pick Windows in the generator and paste the folder as Explorer shows it; the output is escaped for you. Forward slashes (C:/Users/me/...) also work for most commands.
What is the difference between Cursor mcp.json and VS Code mcp.json?
Both are named mcp.json, but Cursor lists servers under mcpServers (in ~/.cursor/mcp.json or .cursor/mcp.json), while VS Code's .vscode/mcp.json uses a top-level servers object and a type on each entry. Copying one into the other is the most common reason a server silently does not load. The validator flags it and the converter rewrites it.
Why does my MCP config say invalid JSON?
The usual causes are a trailing comma after the last entry, a comment, curly quotes pasted from a document, or a Windows path with single backslashes such as C:\Users\me. JSON needs each backslash written as \\. Paste the file into the validator: it shows the line and column, and Fix & convert repairs all four.
Can I add a remote MCP server URL to Claude Desktop's config file?
claude_desktop_config.json launches local commands. Add remote servers in Claude Desktop under Settings > Connectors, or bridge the URL through a local command: npx -y mcp-remote https://example.com/mcp. The generator writes that bridge entry for you when you pick Claude Desktop and a remote URL.
Should I put API keys in mcp.json?
Only in files that stay on your machine. Project files such as .cursor/mcp.json, .vscode/mcp.json and .mcp.json are often committed to git. Reference an environment variable instead, for example ${env:API_TOKEN} in Cursor and VS Code or ${API_TOKEN} in Claude Code. The validator warns when a value looks like a real token.
Is anything I paste uploaded?
No. The generator and validator run as JavaScript in your browser. Nothing you paste is sent to a server, and there is no account or API key.