提交

Schemacheck Agent

@garyedgington

SchemaCheck Agent validates JSON payloads against JSON Schema Draft 7 and 2020-12 standards. Designed for agent-to-agent workflows, it returns structured validation results instantly — including field-level error paths, human-readable summaries, and optionally a corrected payload when repair mode is enabled. Built on the x402 micropayment protocol, each validation call costs $0.005 USDC on Base mainnet — no subscriptions, no API keys, no accounts. Pay per call, settle on-chain.
概览

SchemaCheck Agent

A machine-native paid API for validating JSON payloads against JSON Schema.

Live endpoint: https://projectx402-production.up.railway.app
MCP endpoint: https://projectx402-production.up.railway.app/mcp


What it does

Send a JSON Schema and a JSON payload. Get back a structured validation result: whether the payload is valid, a list of errors with JSONPath locations, a plain-English summary, and optionally a suggested corrected payload.

Built for autonomous agents, backend pipelines, and developers who need reliable, cheap, per-call JSON validation without managing a library dependency.

Supports two access modes:

  • MCP tools via Streamable HTTP — connect any MCP-compatible client directly, fiat billing via MCP-Hive
  • REST + x402 — HTTP endpoint with USDC micropayment on Base mainnet ($0.005/call)

Endpoints

EndpointPaymentRepairLimit
/mcp (MCP Streamable HTTP)Fiat via MCP-HiveYes (validate_schema)None
POST /v1/schema-checkx402 USDC ($0.005)YesNone
POST /v1/schema-check/trialFreeNo32KB request body
GET /healthFree

Add to your MCP client config:

{
  "mcpServers": {
    "schemacheck": {
      "url": "https://projectx402-production.up.railway.app/mcp"
    }
  }
}

Two tools are available: validate_schema (full, with repair) and validate_schema_trial (free, no repair). See docs/agent_quickstart.md for a full Python MCP client example.


Quickstart — trial (no payment)

curl -X POST https://projectx402-production.up.railway.app/v1/schema-check/trial \
  -H "Content-Type: application/json" \
  -d '{
    "json_schema": {
      "type": "object",
      "required": ["name", "email"],
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string", "format": "email"}
      },
      "additionalProperties": false
    },
    "payload": {
      "name": "Ada Lovelace",
      "email": "not-an-email"
    }
  }'

Response:

{
  "valid": false,
  "errors": [
    {
      "path": "/email",
      "code": "format",
      "message": "'not-an-email' is not a valid email address.",
      "schema_path": "/properties/email/format"
    }
  ],
  "summary": "The payload failed validation. 1 error found.",
  "suggested_payload": null,
  "confidence": 0.9,
  "meta": {
    "strictness": "normal",
    "repair_attempted": false,
    "engine": "jsonschema",
    "schema_draft": "auto"
  }
}

Quickstart — paid endpoint (x402)

The paid endpoint requires an x402 v2 USDC micropayment of $0.005 per call on Base mainnet.

Payment flow:

  1. Send request to POST /v1/schema-check without payment headers.
  2. Receive 402 Payment Required with x402Version=2 and payment details.
  3. Sign and send payment via PAYMENT-SIGNATURE header.
  4. Receive 200 with validation result.

See docs/agent_quickstart.md for a full Python example with x402 payment handling.


Request fields

FieldTypeRequiredDefaultDescription
json_schemaobjectyesJSON Schema document
payloadanyyesThe JSON value to validate
strictnessstringno"normal""strict", "normal", or "lenient"
repairbooleannofalseReturn a suggested corrected payload if possible
explainbooleannotrueInclude plain-English summary

Response fields

FieldTypeDescription
validbooleantrue if payload passes schema validation
errorsarrayStructured validation errors; empty when valid
summarystringPlain-English summary (null if explain=false)
suggested_payloadany / nullCorrected payload suggestion (paid endpoint + repair=true only)
confidencefloatConfidence score 0–1
metaobjectEngine, strictness, and repair metadata

Error codes

required · type · format · enum · additionalProperties · minimum · maximum · minLength · maxLength · pattern · items · oneOf · anyOf · allOf · unknown


Pricing

ModePrice
Trial (/v1/schema-check/trial)Free
Paid (/v1/schema-check)$0.005 USDC per call

Payment is handled via the x402 protocol — an HTTP-native micropayment standard using USDC on Base.


Health check

curl https://projectx402-production.up.railway.app/health
{"status": "ok", "service": "schemacheck-agent", "version": "0.3.0"}

Reporting issues

If you encounter unexpected responses, payment errors, or validation bugs, please open a GitHub issue.

Include:

  • The endpoint called (/v1/schema-check or /v1/schema-check/trial)
  • The request body (redact any sensitive data)
  • The response received
  • The X-Request-ID header value from the response if available

Further reading

服务器配置

{
  "mcpServers": {
    "schemacheck-agent": {
      "url": "https://projectx402-production.up.railway.app/sse"
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.