MCP config JSON validator
Save on GoogleFree online MCP config checker. Paste your claude_desktop_config.json, .cursor/mcp.json or .mcp.json and see JSON errors and server problems with line numbers. Everything runs in your browser. Nothing is uploaded.
Inputs
Paste your MCP config
Output
Results
What does an MCP config validator check?
MCP (Model Context Protocol) clients read a JSON file that lists the servers they should start or connect to. A small mistake, such as a trailing comma, a number in env, or a full command line in command, usually makes a server silently fail. This validator catches those mistakes with line numbers before you restart your client. Clients differ in details, so treat the results as guidance and check your client’s documentation.
MCP config reference: 60 rules and settings
Severity is a recommended level. The validator above checks JSON syntax and server settings. Location and client rows are reference only, and rows marked Unverified are items I could not confirm, so check your client’s documentation.
| Rule / Setting / Query | Specification & Fix | Severity Level | Scope / Category |
|---|---|---|---|
| What is an MCP config file? | A JSON file that an MCP client reads to learn which servers to start or connect to. Each client defines its own file name and location. | Reference | File & Location |
| Claude Desktop config file | claude_desktop_config.json. On macOS it sits in ~/Library/Application Support/Claude/, and on Windows in %APPDATA%\Claude\. | Reference | File & Location |
| Cursor MCP config location | .cursor/mcp.json inside a project, or ~/.cursor/mcp.json for all projects. | Reference | File & Location |
| Claude Code MCP config | A .mcp.json file in the project root holds shared servers. You can also add servers with the claude mcp add command. | Reference | File & Location |
| VS Code MCP config | .vscode/mcp.json, with a top-level servers key instead of mcpServers. | Reference | File & Location |
| Windsurf MCP config location | As far as I know it is ~/.codeium/windsurf/mcp_config.json. Check Windsurf’s documentation for the current path. | Unverified | File & Location |
| Cline MCP settings file | Cline keeps servers in cline_mcp_settings.json, which you open from its MCP Servers panel. Check Cline’s documentation to confirm. | Unverified | File & Location |
| mcpServers vs servers key | Most clients use mcpServers. VS Code uses servers. This validator accepts either and warns if both exist. | Reference | File & Location |
| Top-level value must be an object | The file must start with {. An array or a string at the top level is invalid. | Fatal Error | File & Location |
| Trailing comma error | A comma after the last item, such as "a": 1,}, is invalid. Fix: remove the last comma. | Fatal Error | JSON Syntax |
| Comments in JSON | // and /* */ comments are not allowed. Fix: delete them, or keep notes in a separate file. | Fatal Error | JSON Syntax |
| Single quotes error | Use double quotes: "command", not 'command'. | Fatal Error | JSON Syntax |
| Curly quotes from copy-paste | Quotes copied from a web page or a document can be curly (“ ”). Fix: replace them with straight " quotes. | Fatal Error | JSON Syntax |
| Missing comma between servers | Every server entry except the last needs a comma after its closing brace. The error line is usually the one after the missing comma. | Fatal Error | JSON Syntax |
| Unclosed bracket or brace | Each { needs a } and each [ needs a ]. Format the file in an editor to find the mismatch. | Fatal Error | JSON Syntax |
| Windows path backslashes | Write "C:\\Users\\me" with doubled backslashes, or use forward slashes: "C:/Users/me". | Fatal Error | JSON Syntax |
| Duplicate server names | If two servers share a name, JSON keeps only the last one. Fix: give each server a unique name. | Fatal Error | JSON Syntax |
| BOM at the start of the file | A byte order mark can break strict parsers. Fix: save as UTF-8 without BOM. | Warning | JSON Syntax |
| Unquoted keys | Keys must be in double quotes. {command: "npx"} is JavaScript, not JSON. | Fatal Error | JSON Syntax |
| The command field | The program to run for a local server, for example "command": "npx". | Fatal Error | Local Servers |
| The args field | An array of strings, one item per argument: "args": ["-y", "package-name"]. | Fatal Error | Local Servers |
| Full command line in command | "command": "npx -y pkg" is wrong. Fix: "command": "npx", "args": ["-y", "pkg"]. | Warning | Local Servers |
| Flag and value in one arg | "--port 3000" is one argument. Fix: "--port", "3000" as two items. | Warning | Local Servers |
| Numbers in args | Every item in args must be a string. Write "3000", not 3000. | Fatal Error | Local Servers |
| npx needs -y | Add "-y" to args so npx does not stop to ask before installing a package. This validator shows it as a tip. | Best Practice | Local Servers |
| Python servers with uvx | Many Python servers run with "command": "uvx" and the package name in args, for example ["mcp-server-git"]. | Reference | Local Servers |
| Docker-based servers | Use "command": "docker" with "args": ["run", "-i", "--rm", "image-name"]. The -i keeps stdin open for the server. | Reference | Local Servers |
| Node scripts with absolute path | For your own server, use an absolute path: "args": ["/full/path/to/server.js"]. Relative paths depend on the client’s working directory. | Best Practice | Local Servers |
| Program not found (PATH) | Apps started from a menu or dock may not inherit your shell PATH, so tools from nvm or pyenv are missed. Fix: use the full path to the executable. | Warning | Local Servers |
| The cwd field | Some clients support "cwd" to set the working directory. Check your client’s documentation before relying on it. | Unverified | Local Servers |
| Logs on stdout break stdio servers | A stdio server must write only protocol messages to stdout. Send logs to stderr. | Warning | Local Servers |
| The url field | Remote servers use "url": "https://example.com/mcp". It must be an absolute URL. | Fatal Error | Remote Servers |
| The type field | Most clients accept "type": "stdio", "http" or "sse". This validator warns about other values. | Warning | Remote Servers |
| type stdio with a url | "type": "stdio" needs command. Fix: remove the type or switch to http or sse. | Fatal Error | Remote Servers |
| type http or sse with a command | "type": "http" or "sse" needs url. Fix: add a url or set the type to stdio. | Fatal Error | Remote Servers |
| Both command and url | Use command for a local server or url for a remote one, not both. | Fatal Error | Remote Servers |
| Streamable HTTP vs SSE | Newer MCP specification revisions replace the older HTTP+SSE transport with Streamable HTTP. Check which one your server and client support. | Reference | Remote Servers |
| http instead of https | Use https:// for remote servers. This validator allows http:// only for localhost. | Warning | Remote Servers |
| The headers field | An object of string values, for example "headers": {"Authorization": "Bearer ..."}. | Fatal Error | Remote Servers |
| The serverUrl key | Some clients use serverUrl instead of url. This validator accepts it and shows a tip. | Reference | Remote Servers |
| OAuth sign-in for remote servers | Some clients handle OAuth in their own interface instead of in the JSON file. Check your client’s documentation. | Unverified | Remote Servers |
| Local HTTP servers | http://localhost:3000/mcp is fine for development. The https warning does not apply to localhost. | Reference | Remote Servers |
| The env field | An object of string values: "env": {"API_KEY": "value"}. | Fatal Error | Secrets & Security |
| Booleans and numbers in env | "DEBUG": true is invalid for env. Fix: "DEBUG": "true". | Fatal Error | Secrets & Security |
| Hard-coded secrets | Tokens and API keys written in the file can leak. This validator warns about secret-looking values in env and headers. | Warning | Secrets & Security |
| Committing .mcp.json to Git | Project config files are often committed. Keep secrets out of them, or add the file to .gitignore. | Warning | Secrets & Security |
| Environment variable expansion | Some clients can read values from environment variables, with different syntax. Check your client’s documentation before using ${VAR}. | Unverified | Secrets & Security |
| VS Code inputs for secrets | VS Code’s mcp.json supports an inputs section that prompts for a secret instead of storing it in the file. | Reference | Secrets & Security |
| Limit filesystem server paths | Give a filesystem server only the folders it needs. Avoid / or your whole home folder. | Best Practice | Secrets & Security |
| Only install trusted servers | A local MCP server runs code with your user permissions. Install servers only from sources you trust. | Best Practice | Secrets & Security |
| Changes not picked up | Many clients read the file only at startup. Fully quit and reopen the client after editing it. | Warning | Troubleshooting |
| Where to find Claude Desktop logs | Claude Desktop writes MCP logs to a Logs folder, for example ~/Library/Logs/Claude on macOS. Check its documentation for your system. | Unverified | Troubleshooting |
| Test a server with MCP Inspector | Run npx @modelcontextprotocol/inspector to try a server outside any client and see its tools. | Reference | Troubleshooting |
| Server name rules | Use short names with letters, numbers, - and _. This validator shows a tip for spaces or special characters. | Best Practice | Troubleshooting |
| Too many servers or tools | Many servers add many tools and slow startup. Enable only what you need. | Best Practice | Troubleshooting |
| Disabling a server | Some clients support "disabled": true. Others need you to delete the entry. Check your client’s documentation. | Unverified | Troubleshooting |
| Global vs project config | A global file applies to every project. A project file applies only there. Put personal servers in the global file. | Reference | Troubleshooting |
| Pin package versions | Use package@1.2.3 in args so an update does not change behavior unexpectedly. | Best Practice | Troubleshooting |
| Validate the config in CI | Run node -e "JSON.parse(require('fs').readFileSync('.mcp.json','utf8'))" in a check to catch syntax errors before merging. | Best Practice | Troubleshooting |
| Share a config safely | Remove API keys and tokens first. The Share link button puts your text in the URL. | Best Practice | Troubleshooting |
FAQ
| Question | Answer |
|---|---|
| How do I validate an MCP config JSON file? | Paste the file into the validator above. It first checks that the JSON is valid and shows the line and column of any syntax error. Then it checks the server settings: command or url, args, env, headers and type. Results appear as you type. |
| What is the difference between mcpServers and servers? | As far as I know, Claude Desktop, Cursor, Claude Code, Windsurf and Cline use a top-level mcpServers key, while VS Code’s mcp.json uses servers. Check your client’s documentation, because each client defines its own format. |
| Where is the MCP config file located? | It depends on the client. Claude Desktop uses claude_desktop_config.json, Cursor uses .cursor/mcp.json, Claude Code uses .mcp.json in a project, and VS Code uses .vscode/mcp.json. Check your client’s documentation for the exact path on your system. |
| Why does my MCP server fail to start? | Common causes are invalid JSON, a full command line placed in the command field, missing -y when using npx, a program that is not on the PATH of the app, and env values that are not strings. This validator flags all of these except a missing PATH program. |
| Can an MCP config have comments or trailing commas? | No. The file must be strict JSON, so comments, trailing commas and single quotes cause errors. Remove them, or use the Format JSON button on a valid file to tidy it. |
| Is it safe to paste my MCP config here? | The check runs in your browser and nothing is uploaded. Still, remove API keys and tokens first. The Share link button puts your text in the URL, so never share a link that contains secrets. |