Jsonaut

io.github.shoggi211Published by GitHub account shoggi211v0.1.0Updated Oct 25, 2026

Repair malformed JSON from LLM/agent output; optional JSON Schema coercion. Free + x402 paid.

VerifiedStreamable HTTPWeb executableDeveloper ToolsData & Analytics

Overview

AI-generated overview

A remote MCP server that repairs, validates and extracts malformed JSON from LLM or agent output, with optional JSON Schema coercion and a paid LLM fallback.

What you can do
Repair broken JSON (trailing commas, single quotes, truncation, markdown fences, comments, Python literals) and optionally validate or coerce it against a JSON Schema, with a list of changes made. Validate a JSON string against a JSON Schema and get validity plus violations. Extract JSON embedded in prose, chat messages, logs or emails, then repair and validate it. Infer a JSON Schema (draft 2020-12) from an example value, optionally merging an array of same-shape samples.
When to use it
Useful when an assistant handles JSON from LLM tool calls, other agents or flaky upstreams and needs it parsed, schema-checked or turned into a reusable schema. The free deterministic tier covers most repair and validation needs.
Requirements
A remote Streamable HTTP endpoint; no accounts or API keys. The paid LLM fallback requires x402 payment in USDC on Base via the X-PAYMENT header. Free tier is rate-limited per IP (default 100 calls per day).
Before you install
The paid LLM fallback spends real money (default $0.01 per call, charged only on success) and requires an x402 payment header. Inputs, including text passed for extraction, are sent to the remote service and, on the paid tier, to an LLM provider. Free-tier rate limiting is approximate under high concurrency.

Installation

In SourceWeft

  1. Open Jsonaut in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.shoggi211%2Fjsonaut/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "jsonaut": {
      "type": "http",
      "url": "https://jsonaut.jsonaut-shaurya.workers.dev/mcp"
    }
  }
}

README

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

bash
npm installnpm test          # 27 tests: repair battery, schema coercion, HTTP API, MCP protocolnpm run dev       # http://localhost:8787 — demo page + API + MCP endpoint

Try it:

bash
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\"}}}}"
json
{  "valid": true,  "repaired": { "name": "alice", "count": 42 },  "method": "deterministic-repair",  "changes": ["repaired JSON syntax (jsonrepair)", "$.count: coerced string \"42\" to number"]}

API

RouteWhat it does
POST /v1/repairRepair + optional schema validation/coercion. Body: {input, schema?, allow_llm_fallback?}
POST /v1/validateValidate only, no repair. Body: {input, schema}
POST /mcpMCP server (Streamable HTTP, stateless). Tools: repair_json, validate_json
GET /Interactive demo page
GET /llms.txtAgent-readable capability + pricing description
GET /openapi.yamlOpenAPI 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)

bash
claude mcp add --transport http jsonaut https://YOUR-DEPLOYMENT/mcp

Or in any MCP client config:

json
{ "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)

  1. Agent calls /v1/repair with allow_llm_fallback: true; deterministic repair fails.
  2. Server responds 402 with an x402 accepts array (USDC on Base, amount = PRICE_USD).
  3. Agent pays and retries with the X-PAYMENT header; server verifies via the facilitator, runs the LLM repair, and settles only if the repair succeeds.

Configuration

Env varPurposeRequired for
OPENROUTER_API_KEYEnables the paid LLM-fallback tier (via OpenRouter; free model by default)Paid tier
OPENROUTER_MODELOverride the model (default meta-llama/llama-3.3-70b-instruct:free)—
X402_PAY_TOWallet address on Base receiving USDCx402 rail
X402_NETWORKbase or base-sepolia (default base)x402 rail
FACILITATOR_URLx402 facilitator for verify/settlex402 rail
FREE_DAILY_LIMITFree calls per IP per day (default 100)—
PRICE_USDPaid-tier price (default 0.01)—
DEV_ALLOW_FREE_LLMtrue opens the paid tier for local dev only—

Local dev secrets go in a .dev.vars file (git-ignored) or your shell env.

Deployment (Cloudflare Workers)

bash
npx wrangler loginnpx wrangler kv namespace create KV      # then paste the id into wrangler.tomlnpx wrangler secret put OPENROUTER_API_KEYnpx wrangler deploy

The 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 entrysrc/dev.ts     Node dev entrytest/          full battery: broken-JSON cases, coercion, HTTP, MCP protocol

Known limitations (MVP)

  • Schema coercion does not resolve $ref or oneOf/anyOf branches.
  • 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).

Source: README.md at commit 654c2c6

Tools

4

repair_json

Repair malformed JSON (trailing commas, single quotes, truncation, markdown fences, comments, python literals) and optionally validate/coerce it against a JSON Schema. Deterministic repair is free. If it fails and allow_llm_fallback is true, a paid LLM repair is attempted (requires x402 payment; charged only on success).

Parametersinputrequiredschemaallow_llm_fallback

validate_json

Validate a JSON string against a JSON Schema. Free. Returns validity and a list of violations.

Parametersinputrequiredschemarequired

extract_json

Extract JSON embedded in arbitrary text — LLM prose, chat messages, logs, emails — then repair and validate it. Deterministic extraction is free. If no JSON can be located and allow_llm_fallback is true, a paid LLM extracts structured data from the text (requires x402 payment; charged only on success). Pass a JSON Schema to shape the output.

Parametersinputrequiredschemaallow_llm_fallback

infer_schema

Infer a JSON Schema (draft 2020-12) from an example JSON value. Free and deterministic. Set as_samples=true when the input is an array of example objects of the same shape to merge them into one schema. Turns sample agent/tool output into a reusable schema.

Parametersinputrequiredas_samples

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.