About json5-mcp
json5-mcp is an MCP server for parsing JSON5 and converting it to strict JSON, useful for configuration files and model-generated JSON-like text. It also serializes values back to JSON5 for human-edited configuration.
Key features
- 01Parse JSON5 into values
- 02Serialize values as JSON5
- 03Convert JSON5 text to strict JSON
- 04Support comments, trailing commas, and unquoted keys
Use cases
- 01Parse commented configuration files
- 02Convert model-generated JSON5 to strict JSON
- 03Format values for human-edited configuration
MCP support
It exposes `parse_json5`, `to_json5`, and `to_strict_json` tools to MCP clients for parsing and serializing JSON5 and strict JSON.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes |
Details
From the project README@mukundakatta/json5-mcp
MCP server for JSON5: parse JSON-with-comments, trailing commas, unquoted keys, hex / NaN / Infinity. Round-trip to strict JSON when downstream tools require it.
Tools
parse_json5(text)— loose parse to a real valueto_json5(value, indent?)— serialize for human-edited configto_strict_json(text, indent?)— JSON5 in, strict JSON out
Why this exists
LLMs frequently emit JSON-with-comments thinking it's JSON. They also see config files (tsconfig, .babelrc, mcp.json) that are JSON5 in disguise. This server is the loose-parse + strict-emit round trip — feed it whatever the LLM produced, get back something JSON.parse accepts.
Install — Claude Desktop
{
"mcpServers": {
"json5": { "command": "npx", "args": ["-y", "@mukundakatta/json5-mcp"] }
}
}
Same shape for Cursor / Cline / Windsurf / Zed.
License
MIT OR Apache-2.0.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.