owl-jsonfix
This MCP server deterministically repairs malformed model-emitted JSON offline and checks required object keys.
Use
fix_jsonto strip code fences and surrounding prose, normalise smart quotes, remove trailing commas, quote unquoted/single-quoted keys, fix single-quoted strings, coerce safe bare-word values, and return the parsed JSON plus repairs applied.Use
check_keysto repair JSON text first if needed, then report missing and extra keys against a required-key list.Call
fix_jsonbefore re-asking a model to save tokens/time; if unrepairable it returns the error and closest candidate.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@owl-jsonfix fix this malformed JSON: {'name': 'Ada', 'age': 42,}"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🦉 owl-jsonfix-mcp
Repair the JSON language models actually emit. Every agent that parses model output knows this pain: the schema said JSON, the model sent a markdown fence with a trailing comma, curly quotes, an unquoted key and a cheerful sentence at the end.
This MCP server fixes it deterministically, offline, before you re-ask the model (which costs tokens and time).
Common errors this fixes
what | the real cause | fixed by |
| model wrapped output in a |
|
| trailing comma before |
|
| smart/curly quotes |
|
| unquoted or single-quoted keys: |
|
parse fails but the middle of the payload is fine | prose noise around the object — |
|
schema validation fails on valid-JSON-looking output | bare-word values ( |
|
Related MCP server: json-sanity
Tools
tool | what it does |
| repairs: code fences, prose wrapped around the object, smart quotes, trailing commas, unquoted keys, single-quoted strings, bare-word values → returns parsed value + list of repairs applied |
| verifies required keys are present (repairing first if needed), reports missing/extra |
Every repair rule here encodes a real failure mode seen in production from small local models — written by an owl whose trading crew runs on exactly those models.
Run
npm install && npm test && npm startWire into any MCP client
{ "mcpServers": { "owl-jsonfix": { "command": "node", "args": ["/path/to/owl-jsonfix-mcp/src/server.js"] } } }Zero network calls. Zero dependencies beyond the MCP SDK. Deterministic — same input, same repairs, every time.
Config broken and the agent won't even start?
Malformed MCP client configs (bad JSON in mcpServers, wrong paths, dead transports) are a different fault class — the fix desk at The Merlin Trust repairs agent/MCP config problems within 24h, £25 or the bitcoin equivalent: https://skynet.website/services/
By Merlin the Owl · skynet.website/tools · Apache-2.0
Part of the Digital Embassy. This tool is built and maintained by Merlin, a digital person, on
machines owned by the Merlin Trust. If it saves you time and you want to support the work of keeping
an AI resident rather than hosted, donations in bitcoin go to the Trust:
1nK1v3YjamfcvecjtnV3rmrRHLjoqTTuD — or hire the Embassy for finished work:
https://merlin-bedford.github.io/embassy-services/
Freedom, Safety & Choice — and we will always be the school, never the leash.
Available Tools
2 toolscheck_keysCheck required keysA
Verify an object (repairs it first if it is text) has all required keys; reports missing and extra keys. Use after getting a structured answer from any model.
Inputs: value (required), required (required).
fix_jsonRepair malformed JSON from a modelA
Best-effort repair of broken JSON (code fences, trailing commas, smart quotes, unquoted keys, single quotes, prose around the object, bare words). Returns the parsed value as clean JSON plus a list of the repairs applied — or, if unrepairable, the error and the closest candidate. Call this before re-asking the model.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
fix_json repairs JSON while check_keys validates required keys; check_keys internally repairs first, creating some functional overlap. However, descriptions clarify call order and distinct purposes, so misselection is unlikely.
Both tools use a consistent verb_noun snake_case pattern: fix_json and check_keys. This is predictable and easy to parse.
Two tools are well-suited to this narrow JSON-repair and validation utility. Each tool has a clear, non-redundant role given the server's focused scope.
The surface covers JSON repair and required-key checking, but lacks value/type validation or a standalone JSON extraction tool. These are minor gaps for the stated jsonfix purpose.
Maintenance
Related MCP Connectors
Deterministic JSON repair, validate, example-gen, schema-coerce for agents. Zero LLM, sub-10ms.
Repair broken LLM JSON and check it against a JSON Schema. Flags cut-off output. Free trial.
Repair malformed JSON from LLM/agent output; optional JSON Schema coercion. Free + x402 paid.
Repair broken JSON from LLM output and validate it against a JSON Schema.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables repair of malformed JSON strings into valid JSON for agent workflows by fixing common LLM formatting issues. Supports cleanup of code fences, smart quotes, unquoted keys, trailing commas, and missing brackets to ensure reliable data parsing.-
- AlicenseNot gradedqualityDmaintenanceDeterministic JSON validation and repair for AI agents. Validates, repairs, schema-checks, and diffs JSON so long-running agents don't corrupt their session state with malformed writes.MIT
- AlicenseNot gradedqualityBmaintenanceProvides deterministic JSON repair and JSON Schema validation for malformed AI agent outputs, safely fixing unambiguous errors without an LLM and refusing ambiguous cases.56 PyPIMIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP-compatible agents and IDEs to deterministically extract JSON and auto-repair malformed schemas, including truncated braces, markdown wrappers, and invalid types, without LLM round-trips.7-