MagicTools
Back

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.

Server 1

.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 config-file mistakes: 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). Error messages from the clients rarely say any of this clearly. This tool encodes those rules: it generates configs that are correct by construction for each client, and its validator names the exact mistake and the fix instead of a generic parse error. Everything runs locally in your browser, which matters because MCP configs routinely contain API keys and tokens.

FAQ

Which file does each client read the MCP config from?
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.
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 your config into Validate mode and the exact line is pointed out.
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.
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.