Jsonaut

MCP serverAI & models

jsonaut repairs malformed JSON that AI models produce, so broken output becomes valid JSON you can actually use. It can also reshape that JSON to match a JSON Schema if you provide one. A free version is available alongside a paid option.

Use Jsonaut in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Jsonaut and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the repair json tool from Jsonaut

Details

Available today. Use it from your connected AI after setup.

After adding jsonaut, run your model's JSON output through it whenever it comes back malformed. If you have a JSON Schema, supply it so the repaired output also matches the structure you need.

JsonautStart free

What your AI can do with it

  • Repair malformed JSON from AI model output
  • Turn broken output into valid, usable JSON
  • Reshape JSON to match a JSON Schema you provide
  • Keep steps that rely on JSON from breaking on bad output

Install Jsonaut

The server’s own address, for the clients that take one directly. Or connect Ahel once and every client you use reads it from one address, with the account kept on Ahel rather than in each client’s config.

  • Claude Code

    claude mcp add --transport http --scope user jsonaut 'https://jsonaut.jsonaut-shaurya.workers.dev/mcp'

    Run it once in your project, then open /mcp to approve any sign-in the server asks for.

  • Claude Desktop

    https://jsonaut.jsonaut-shaurya.workers.dev/mcp

    Add a custom connector in Settings, paste this address, and approve the sign-in.

  • Cursor

    cursor://anysphere.cursor-deeplink/mcp/install?name=jsonaut&config=eyJ1cmwiOiJodHRwczovL2pzb25hdXQuanNvbmF1dC1zaGF1cnlhLndvcmtlcnMuZGV2L21jcCJ9

    Open the link and Cursor adds the server at that address.

  • ChatGPT

    https://jsonaut.jsonaut-shaurya.workers.dev/mcp

    In Settings, enable Developer mode, create an MCP app, and paste this address. Your plan and workspace must allow custom apps.

  • Codex

    codex mcp add jsonaut --url 'https://jsonaut.jsonaut-shaurya.workers.dev/mcp'

    Run it once, then sign in with codex mcp login jsonaut if the server asks for an account.

From the project's README

As published by shoggi211/jsonaut in README.md.

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 endpoint

Try 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"]
}

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)

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

Or 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)

  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)

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 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 entry
src/dev.ts     Node dev entry
test/          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).

Tools it offers (4)

What this server listed when Ahel dialed its public endpoint in Oct 2026, with no key and no account of yours. The names are the server’s own.

  • repair_json
  • validate_json
  • extract_json
  • infer_schema

Signals

GitHub stars
1
Last commit
Jul 2026
Advanced
Delivery
jsonaut MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
Item type
mcp-server
Key
io-github-shoggi211-jsonaut
Source
github.com/shoggi211/jsonaut
Hosted endpoint
https://jsonaut.jsonaut-shaurya.workers.dev/mcp