{"$schema":"https://static.modelcontextprotocol.io/schemas/mcp-server-card/v1.json","version":"1.0","protocolVersion":"2025-06-18","serverInfo":{"name":"json-canon-x402","title":"JSON Canon","version":"0.2.0"},"description":"Pay-per-call JSON, CSV, PDF and Mexican-ID (RFC/CURP/CLABE) tools for agents. x402 payments in USDC on Base; get_pricing is free.","websiteUrl":"https://json-canon-x402.fly.dev","transport":{"type":"streamable-http","url":"https://json-canon-x402.fly.dev/mcp"},"remotes":[{"type":"streamable-http","url":"https://json-canon-x402.fly.dev/mcp"}],"capabilities":{"tools":{"listChanged":false}},"authentication":{"required":false,"schemes":[]},"payments":{"protocol":"x402","version":2,"network":"eip155:8453","asset":"USDC","payTo":"0x4a850515EfAad14b1c3dBD9288828076683b0b95"},"tools":[{"name":"validate_json","title":"Validate + canonicalize JSON","description":"Validate a JSON instance against an optional JSON Schema and return RFC 8785 canonical JSON plus SHA-256. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/validate.","inputSchema":{"type":"object","required":["instance"],"additionalProperties":false,"properties":{"instance":{"description":"JSON value to validate. Any JSON type is accepted."},"schema":{"type":"object","additionalProperties":true,"description":"JSON Schema to validate instance against. Optional. If omitted, the instance is accepted and only canonicalized."},"canonicalize":{"type":"boolean","default":true,"description":"If true (default), return RFC 8785 JCS canonical JSON, its SHA-256 hex digest, and byte length."}}}},{"name":"csv_to_json","title":"CSV to JSON with type inference","description":"Convert CSV to JSON rows with per-column type inference (integer, number, boolean, null, string), delimiter auto-detection and a generated JSON Schema. Leading-zero codes (ZIP, CLABE) stay strings. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/csv-to-json.","inputSchema":{"type":"object","properties":{"csv":{"type":"string","description":"CSV text (UTF-8). Max 1 MiB, 20,000 rows, 512 columns."},"csv_base64":{"type":"string","description":"Alternative to 'csv': base64 bytes (UTF-8 or Latin-1)."},"delimiter":{"type":"string","minLength":1,"maxLength":1,"description":"Auto-detected among , ; TAB | if omitted."},"header":{"type":"boolean","default":true,"description":"First row holds column names."},"infer_types":{"type":"boolean","default":true,"description":"Infer integer/number/boolean/null per column."},"parse_booleans":{"type":"boolean","default":true,"description":"Map true/false/yes/no/si to booleans."},"null_values":{"type":"array","items":{"type":"string"},"description":"Strings treated as null (empty is always null)."},"output":{"type":"string","enum":["objects","arrays"],"default":"objects"}},"required":[],"additionalProperties":false}},{"name":"json_diff","title":"JSON diff (RFC 6902 patch)","description":"Compare two JSON documents and return the RFC 6902 JSON Patch that turns source into target, plus canonical SHA-256 of each side. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/json-diff.","inputSchema":{"type":"object","properties":{"source":{"description":"Original JSON value (any type)."},"target":{"description":"New JSON value (any type)."}},"required":["source","target"],"additionalProperties":false}},{"name":"json_patch","title":"Apply JSON Patch (RFC 6902)","description":"Apply an RFC 6902 JSON Patch to a JSON document and return the result and its canonical SHA-256. Failed 'test' ops return 409 and are not charged. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/json-patch.","inputSchema":{"type":"object","properties":{"document":{"description":"JSON value to patch (any type)."},"patch":{"type":"array","description":"RFC 6902 operations (add, remove, replace, move, copy, test). Max 10,000.","items":{"type":"object","required":["op","path"],"properties":{"op":{"type":"string"},"path":{"type":"string"},"from":{"type":"string"},"value":{}}}}},"required":["document","patch"],"additionalProperties":false}},{"name":"pdf_text","title":"PDF text extraction","description":"Extract text per page from a PDF given by public URL or base64 (max 4 MiB, 100 pages). No OCR: scanned PDFs are flagged as likely_scanned. Price: 0.02 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/pdf-text.","inputSchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public http(s) URL of the PDF (max 4 MiB, 3 redirects, public IPs only)."},"pdf_base64":{"type":"string","description":"Alternative to 'url': base64 PDF bytes (max 4 MiB decoded)."},"pages":{"type":"array","items":{"type":"integer","minimum":1},"description":"1-based pages to read. Default: all (up to max_pages)."},"max_pages":{"type":"integer","minimum":1,"maximum":100,"default":100},"joined":{"type":"boolean","default":true,"description":"Also return all pages joined in 'text'."}},"required":[],"additionalProperties":false}},{"name":"pdf_tables","title":"PDF table extraction","description":"Extract tables (rows and header-keyed records) from a PDF given by public URL or base64 (max 4 MiB, 30 pages). 'lines' strategy for ruled tables, 'text' for whitespace-aligned ones. Price: 0.04 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/pdf-tables.","inputSchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public http(s) URL of the PDF (max 4 MiB, 3 redirects, public IPs only)."},"pdf_base64":{"type":"string","description":"Alternative to 'url': base64 PDF bytes (max 4 MiB decoded)."},"pages":{"type":"array","items":{"type":"integer","minimum":1},"description":"1-based pages to read. Default: all (up to max_pages)."},"max_pages":{"type":"integer","minimum":1,"maximum":30,"default":30},"strategy":{"type":"string","enum":["lines","text"],"default":"lines","description":"'lines' for ruled tables, 'text' for whitespace-aligned columns."},"header":{"type":"boolean","default":true,"description":"Also return rows as records keyed by the first row."},"include_text":{"type":"boolean","default":false,"description":"Also return page text."}},"required":[],"additionalProperties":false}},{"name":"mx_rfc","title":"Validate Mexican RFC (SAT)","description":"Validate a Mexican RFC tax ID (persona física or moral): format, embedded date, homoclave and SAT check digit. Offline; does not query SAT. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/mx/rfc.","inputSchema":{"type":"object","properties":{"value":{"type":"string","description":"RFC (12 or 13 chars). Spaces, dashes and lowercase are normalized.","examples":["SAT970701NN3"]}},"required":["value"],"additionalProperties":false}},{"name":"mx_curp","title":"Validate Mexican CURP (RENAPO)","description":"Validate a Mexican CURP: format, birth date, sex, state code, internal consonants and RENAPO check digit. Offline; does not query RENAPO. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/mx/curp.","inputSchema":{"type":"object","properties":{"value":{"type":"string","description":"CURP (18 chars). Spaces, dashes and lowercase are normalized.","examples":["BOXW310820HNERXN09"]}},"required":["value"],"additionalProperties":false}},{"name":"mx_clabe","title":"Validate Mexican CLABE (SPEI)","description":"Validate an 18-digit Mexican CLABE bank account: SPEI bank code (with bank name), plaza, account and check digit. Offline; does not confirm the account exists. Price: 0.01 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/mx/clabe.","inputSchema":{"type":"object","properties":{"value":{"type":"string","description":"CLABE (18 digits). Spaces, dashes and lowercase are normalized.","examples":["002010077777777771"]}},"required":["value"],"additionalProperties":false}},{"name":"get_pricing","title":"Pricing and usage (free)","description":"Free. Lists every paid tool with its price, HTTP endpoint and an example input, and explains how to pay with x402.","inputSchema":{"type":"object","properties":{},"additionalProperties":false}}],"resources":[],"prompts":[]}