MCP Config Generator & Validator
Generate a correct MCP server config (mcp.json) for Claude Code, Claude Desktop, Cursor, or VS Code — or paste an existing config to find why it fails: trailing commas, comments, arguments inside command, wrong root key, and other common mistakes. Runs entirely in your browser; your config and secrets never leave it.
.mcp.json (project root)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/dir"
]
}
}
}Or add via CLI
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
Tip: keep secrets out of version control — Claude Code's .mcp.json supports ${VAR} environment-variable expansion.
How to use / Why use this tool / FAQ
How to use
Pick your client — Claude Code, Claude Desktop, Cursor, or VS Code — since each expects the config in a different file and shape. In Generate mode, add servers from the built-in templates (filesystem, GitHub, Postgres, Playwright, and more) or fill in the form: for stdio servers the executable goes in command and every argument in args; for remote servers just paste the URL. The correct JSON appears on the right with the exact file path to save it to, and for Claude Code you also get ready-to-run claude mcp add commands. In Validate mode, paste an existing config and get an instant lint report with every problem explained.
Why use this tool
Most MCP setup failures are not the server's fault — they are mistakes in the config file: a trailing comma after the last entry, comments left in strict JSON, the whole command line crammed into the command field instead of splitting it into args, or a root key that one client accepts and another silently ignores (mcpServers vs servers). Client error messages rarely say any of this clearly, and the shape of a Claude Code MCP server config is not the shape VS Code wants. This tool encodes those rules both ways: the generator produces configs that are correct by construction per client, and the MCP config validator names the exact mistake and the fix instead of throwing a generic parse error. Everything runs locally in your browser, which matters because mcp.json files routinely carry API keys and tokens.
FAQ
- Where is the mcp.json file located for each client?
- Claude Code reads .mcp.json at the project root (plus user-level config), Claude Desktop reads claude_desktop_config.json in its app-support folder, Cursor reads .cursor/mcp.json, and VS Code reads .vscode/mcp.json. Claude Code, Claude Desktop, and Cursor use a mcpServers root key; VS Code uses servers. The generator prints the right path next to the config it produces, so you never have to guess.
- How do I add an MCP server to Claude Code?
- Two ways, and this tool gives you both. Either save an .mcp.json at your project root with the server under the mcpServers key — checked into the repo, it works for everyone on the team — or run the generated claude mcp add command to register it from the terminal. Pick Claude Code as the client above and you get the JSON and the CLI command side by side.
- Why does my mcp.json fail to parse?
- The two most common causes are a trailing comma after the last item in an object or array, and // comments — both are legal in JavaScript but not in strict JSON. Paste the file into Validate mode and the validator points at the exact line.
- What is the difference between stdio and HTTP transport?
- stdio servers are local processes your client launches directly (command + args), best for tools that access local files or run locally. HTTP servers are remote endpoints you connect to by URL — the modern Streamable HTTP transport supersedes the older SSE transport.
- Why must arguments go in the args array instead of the command?
- Clients execute command directly rather than through a shell, so "command": "npx -y server" tries to find an executable literally named 'npx -y server' and fails. The executable belongs in command and each argument as a separate string in args — the most common stdio mistake, and one this validator checks explicitly.
- How do I avoid committing API keys inside .mcp.json?
- Claude Code supports ${VAR} environment-variable expansion inside .mcp.json values, so you can commit the config and keep secrets in the environment. For other clients, keep secret-bearing configs out of version control or inject values at deploy time.
- What does the MCP config validator check?
- Strict-JSON syntax with line numbers for trailing commas and comments, a root key that is missing or misspelled (mcpServers vs servers, and case mistakes like mcpservers), a command field holding arguments that belong in args, args that is not an array, and the deprecated SSE transport. Each finding says what is wrong and what to change it to.
- Is my config uploaded anywhere?
- No. Both the generator and the validator are pure client-side JavaScript — your config, including any tokens in it, never leaves the browser. There is no signup and no tracking of inputs.