Jsonaut
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Jsonaut
JSON repair & validation built for AI agents as the customer. Send possibly-malformed JSON (LLM tool-call output, another agent's message, a flaky upstream), get back parsed, schema-valid JSON.
Free tier: deterministic repair — trailing commas, single quotes, truncation, markdown code fences, comments, Python literals — plus JSON Schema validation with type coercion (string→number, defaults, stripping hallucinated fields). Rate-limited per IP.
Paid tier: LLM-fallback repair for inputs the deterministic pass can't fix. $0.01/call, charged only on success, paid autonomously per-call via x402 (USDC on Base) — no accounts, no signup.
Business context, market research, and the full 3-day plan live in IDEA.md and PLAN.md.
Quickstart
npm install
npm test # 27 tests: repair battery, schema coercion, HTTP API, MCP protocol
npm run dev # http://localhost:8787 — demo page + API + MCP endpointTry it:
curl -s -X POST http://localhost:8787/v1/repair \
-H "content-type: application/json" \
-d "{\"input\": \"{'name': 'alice', 'count': '42',}\", \"schema\": {\"type\":\"object\",\"properties\":{\"count\":{\"type\":\"number\"}}}}"{
"valid": true,
"repaired": { "name": "alice", "count": 42 },
"method": "deterministic-repair",
"changes": ["repaired JSON syntax (jsonrepair)", "$.count: coerced string \"42\" to number"]
}Related MCP server: json-sanity
API
Route | What it does |
| Repair + optional schema validation/coercion. Body: |
| Validate only, no repair. Body: |
| MCP server (Streamable HTTP, stateless). Tools: |
| Interactive demo page |
| Agent-readable capability + pricing description |
| OpenAPI 3.1 spec |
Response method values: direct (was already valid), deterministic-repair (free fix), llm-repair (paid fix), failed. changes[] lists every modification so callers can audit what was done to their data.
Using it from an agent (MCP)
claude mcp add --transport http jsonaut https://YOUR-DEPLOYMENT/mcpOr in any MCP client config:
{ "mcpServers": { "jsonaut": { "type": "http", "url": "https://YOUR-DEPLOYMENT/mcp" } } }For the paid tier, clients pay via x402 and retry with the X-PAYMENT header (the payment receipt). No accounts or API keys — agents pay per call.
Payment flow (x402)
Agent calls
/v1/repairwithallow_llm_fallback: true; deterministic repair fails.Server responds
402with an x402acceptsarray (USDC on Base, amount =PRICE_USD).Agent pays and retries with the
X-PAYMENTheader; server verifies via the facilitator, runs the LLM repair, and settles only if the repair succeeds.
Configuration
Env var | Purpose | Required for |
| Enables the paid LLM-fallback tier (via OpenRouter; free model by default) | Paid tier |
| Override the model (default | — |
| Wallet address on Base receiving USDC | x402 rail |
|
| x402 rail |
| x402 facilitator for verify/settle | x402 rail |
| Free calls per IP per day (default 100) | — |
| Paid-tier price (default 0.01) | — |
|
| — |
Local dev secrets go in a .dev.vars file (git-ignored) or your shell env.
Deployment (Cloudflare Workers)
npx wrangler login
npx wrangler kv namespace create KV # then paste the id into wrangler.toml
npx wrangler secret put OPENROUTER_API_KEY
npx wrangler deployThe same codebase runs on Node for local dev (npm run dev) and on Workers in production — storage falls back to in-memory when no KV binding exists.
Project structure
src/core/ pipeline.ts (repair engine) · coerce.ts (schema coercion) · llm.ts (paid tier)
src/http/ app.ts (routes) · payment.ts (x402 rail) · ratelimit.ts · demo.ts · billing.ts (parked, unused)
src/mcp/ server.ts (stateless Streamable HTTP MCP server)
src/worker.ts Cloudflare Workers entry
src/dev.ts Node dev entry
test/ full battery: broken-JSON cases, coercion, HTTP, MCP protocolKnown limitations (MVP)
Schema coercion does not resolve
$reforoneOf/anyOfbranches.x402 verification requires an external facilitator (
FACILITATOR_URL); there is no on-chain verification built in.Free-tier rate limiting is approximate under high concurrency (KV read-modify-write).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
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.
Remote MCP: JSON repair, JSON Schema validation, JSON to TypeScript, CSV to JSON and JSON to CSV.
Free, no-key MCP server: token estimates, JSON Schema conversion, MCP configs, tool search.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceDeterministic JSON repair, validation, example-generation, and schema-coercion for AI agents — zero LLM calls, sub-10ms, $0.0005 per call.-
- 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
- AlicenseAqualityDmaintenanceMCP server that gives AI assistants the ability to parse partial, messy, or truncated JSON.353 npmMIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables agents and MCP clients to deterministically extract and repair JSON/schema issues such as truncated braces, markdown wrappers, and invalid types without LLM round-trips.-