mcpField
A
Agent JSON Reliability

Agent JSON Reliability

Local
github.com/toninovo4249-aiDeveloper Tools0Updated 5w ago

About Agent JSON Reliability

Agent JSON Reliability is a deterministic JSON inspection, repair, and schema-validation server for agent output. It fixes only unambiguous structural issues and refuses repairs that would require inventing values.

Key features

  1. 01Inspect JSON and diagnose errors
  2. 02Safely repair unambiguous syntax issues
  3. 03Validate against JSON Schema
  4. 04Return structured diagnostics
  5. 05Refuse ambiguous repairs

Use cases

  1. 01Repair malformed JSON from agent output
  2. 02Check generated JSON against a schema
  3. 03Diagnose why a JSON response is invalid

MCP support

It exposes reliable_json, validate_json, repair_json, and inspect_json as MCP tools. It supports local stdio use and a remote HTTP MCP endpoint at /mcp.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"toninovo4249-ai-agent-json-reliability": {
"command": "uvx",
"args": [
"agent-json-reliability"
]
}
}
}
Run commanduvx agent-json-reliability

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiagent-json-reliability0.1.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Agent JSON Reliability

Deterministic JSON repair + JSON Schema validation for AI agents.
No LLM. Safe refusal on ambiguity.

PyPI version Python MCP License: MIT

STATUS=BETA 0.1.0 · GitHub · PyPI · Official MCP Registry

Problem: agents emit malformed JSON (fences, trailing commas, single quotes). This tool inspects, safely repairs, and schema-validates that text. No LLM. No invented values.

PathCost
Local MCP (uvx agent-json-reliability)Free
Hosted POST /v1/json/inspect, /validate, /repair, /mcpFree
Hosted POST /v1/json/reliable0.003 USDC on Base via x402

Machine catalog: https://agent-json-reliability.onrender.com/v1/catalog
Skill: https://agent-json-reliability.onrender.com/skill.md

Quick start

uvx agent-json-reliability

MCP client config (stdio, published package):

{
  "mcpServers": {
    "agent-json-reliability": {
      "command": "uvx",
      "args": ["agent-json-reliability"]
    }
  }
}

AI agents and software frequently emit malformed JSON: markdown fences, trailing commas, single quotes, True/False/None, and extra prose around one object.

Agent JSON Reliability is a deterministic pipeline for that failure mode:

  1. inspect — diagnose whether the text is JSON and which failures are present
  2. safe repair — apply only structural, unambiguous fixes
  3. validate — optional JSON Schema check on the result
  4. structured diagnostics — valid_original, repaired, valid_final, schema_valid, unsafe_or_ambiguous, changes, errors

This is not a generic jsonschema wrapper. Missing semantic values are never invented. Ambiguous input is refused.

Primary HTTP endpoint (local/self-hosted): POST /v1/json/reliable

MCP tools (same core functions): reliable_json, validate_json, repair_json, inspect_json

Before / after (safe repair)

Malformed agent output:

{
  "text": "```json\n{\"name\":\"alice\",\"age\":30,}\n```"
}

Expected result (semantically equivalent valid JSON):

  • valid_original=false
  • repaired=true
  • valid_final=true
  • unsafe_or_ambiguous=false
  • json → {"name":"alice","age":30}

If a schema is supplied and satisfied: schema_valid=true.

Safe refusal (ambiguous)

Truncated input such as {"user": is JSON-intended but not deterministically repairable without inventing keys or values.

Expected:

  • HTTP 200 (documented safe response)
  • valid_final=false
  • unsafe_or_ambiguous=true or repaired=false

Do not treat a correct refusal as a product failure.

Run locally (no Hunter)

python -m pip install -r requirements.txt
python serve.py

Binds 127.0.0.1:8770 by default. Set PUBLIC_BASE_URL to an HTTPS origin only when you expose the process yourself. Do not commit a temporary tunnel hostname as the canonical URL.

Hosted API (x402)

Public origin: https://agent-json-reliability.onrender.com

Inspect / validate / repair / MCP stay free. POST /v1/json/reliable returns HTTP 402 until an x402 PAYMENT-SIGNATURE settles 3000 atomic USDC (0.003) on Base (eip155:8453) via PayAI.

curl -s -D - -o /tmp/ajr.json -X POST https://agent-json-reliability.onrender.com/v1/json/reliable \
  -H "content-type: application/json" \
  -d '{"text":"{'\''a'\'': 1}"}'
# Expect: HTTP/1.1 402  and a PAYMENT-REQUIRED header. Do not send a signature unless you intend to pay.

HTTP examples

See examples/curl.md, examples/python.py, examples/javascript.js.

Remote examples use https://agent-json-reliability.onrender.com. Local default is http://127.0.0.1:8770.

Share URLs (optional, unverified telemetry tags):

  • /?source=github
  • /?source=mcp-registry
  • /?source=api-directory

MCP (stdio — durable)

Package transport does not depend on a temporary public URL. Prefer uvx (above). From a checkout:

{
  "mcpServers": {
    "agent-json-reliability": {
      "command": "python",
      "args": ["-m", "products.gateway.mcp_stdio"]
    }
  }
}

Remote HTTP MCP (POST /mcp) is for a running instance.

Machine discovery

  • Hosted origin: https://agent-json-reliability.onrender.com
  • GET /.well-known/agent-services.json
  • GET /.well-known/agent.json
  • GET /.well-known/x402
  • GET /openapi.json
  • GET /llms.txt · GET /llms-full.txt · GET /AGENTS.md · GET /sitemap.xml · GET /robots.txt
  • POST /mcp JSON-RPC (tools/list, tools/call)

What this package does not include

No Hunter market database, no private reports, no Windows user paths, no collectors, no wallets in this package. Hosted /v1/json/reliable is x402-paid; local MCP and inspect/validate/repair are free.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.