If you use Claude, Cursor, or any AI client that supports the Model Context Protocol (MCP), you can now format and repair JSON straight from the conversation — JSONGuy has an MCP server.
What it does
It's the same engine that powers the web tool, exposed as three tools an AI can call:
- format_json — turns JSON, JSON5, JavaScript objects, or Python dicts into strict, pretty-printed JSON. Handles single quotes, unquoted keys, comments, trailing commas, None/True/False, and tuples.
- validate_json — returns whether the input is valid, and if not, the exact line and column of the error.
- repair_json — fixes broken JSON: missing quotes, missing commas, unclosed brackets.
The repair tool is the one that matters most for AI work — models generate malformed JSON all the time, and now they can fix their own output instead of sending you the error back.
How to connect it
The server is a single HTTP endpoint, no API key, no install:
https://jsonguy.airankone.com/mcp
Claude Desktop — add this to your config:
{
"mcpServers": {
"jsonguy": {
"type": "http",
"url": "https://jsonguy.airankone.com/mcp"
}
}
}Cursor, Cline, or any client that supports remote MCP servers works the same way: point it at that URL and the three tools show up.
What it looks like in use
Ask an AI client to fix some broken JSON and it can now call repair_json on the spot. Same for pasting a Python dict and wanting clean JSON — format_json handles it without any manual cleanup.
Everything runs server-side through the same parser as the JSONGuy web formatter, so the output is consistent wherever you use it.
Real examples
Here's the actual output each tool returns, copied straight from a connected client.
format_json — a Python dict goes in:
{'name': 'John Doe', 'active': True, 'tags': ('python', 'json', 'mcp'),}Strict JSON comes out:
{
"name": "John Doe",
"active": true,
"tags": [
"python",
"json",
"mcp"
]
}repair_json — missing quotes, a missing comma, and an unclosed bracket:
{name: John, city: New York, tags: ['a', 'b'Repaired:
{
"name": "John",
"city": "New York",
"tags": [
"a",
"b"
]
}validate_json — a truncated object is caught with the exact location:
{"valid": false, "message": "invalid end of input", "line": 1, "column": 18}Try it
If you're already using an MCP-capable client, add the endpoint above and try asking it to format or repair some JSON. Feedback on what tools would be useful next is welcome.