sdxc APIs

Package capabilities as pay-per-call HTTP and MCP tools for agents.

Install packages from npm for free. When an agent needs hosted execution — encode a QR, highlight source, parse a zone file — it pays per call with x402.

How charging works

Every priced call uses the x402 protocol. No API keys, no accounts — a wallet settles USDC on the configured network.

  1. Call an operation or MCP tool without payment.
  2. The server answers HTTP 402 with a PAYMENT-REQUIRED header (amount, network, destination).
  3. Your client signs a payment and retries with PAYMENT-SIGNATURE.
  4. We verify and settle through a facilitator, then return the result with PAYMENT-RESPONSE.

GET /, GET /v1, GET /health and MCP discovery stay free. Only running an operation charges.

Connect over MCP

Point your agent at the Streamable HTTP endpoint. Tool names match the catalog ids, so semver.satisfies is the same on HTTP and MCP.

Endpoint

https://api.sdxc.dev/mcp

Claude Code

claude mcp add --transport http sdxc-apis https://api.sdxc.dev/mcp

Cursor / clients with an MCP config file

{
  "mcpServers": {
    "sdxc-apis": {
      "type": "http",
      "url": "https://api.sdxc.dev/mcp"
    }
  }
}

Claude Desktop (HTTP bridge)

{
  "mcpServers": {
    "sdxc-apis": {
      "command": "npx",
      "args": [
        "-y",
        "@abluva/mcp-remote@latest",
        "https://api.sdxc.dev/mcp",
        "--protocol",
        "2026-07-28"
      ]
    }
  }
}

Unpaid tools/call requests answer HTTP 402 with the same x402 headers as POST /v1/…. Your MCP client needs an x402-aware wallet or bridge to settle.

Operations

Each row wraps one published package. Prices are USDC atomic units (6 decimals) on the configured network.

IdPackagePrice
qr.encode
Encode text as a QR Code Model 2 symbol and return its SVG path.
@sdxc/qr$0.001
highlight
Tokenize source text for a named language with @sdxc/highlight.
@sdxc/highlight$0.002
markdown.plain
Parse Markdown and return plain text suitable for excerpts and search.
@sdxc/markdown$0.001
semver.satisfies
Ask whether one SemVer stands in a named relation to another (= != < <= > >= ~ ^).
@sdxc/semver$0.0005
zone-file.parse
Parse an RFC 1035 master file into typed DNS records (requires an origin).
@sdxc/zone-file$0.002
json-patch.apply
Apply an RFC 6902 JSON Patch document to a JSON value.
@sdxc/json-patch$0.001
json-patch.diff
Generate an RFC 6902 JSON Patch that transforms one JSON value into another.
@sdxc/json-patch$0.001
pdf.build
Build a one-page PDF from title, body text and a client-supplied TrueType font (base64, ≤ 500 KiB).
@sdxc/pdf$0.005
epub.build
Build an EPUB 3.3 publication from metadata and XHTML chapters; returns the container as base64.
@sdxc/epub$0.005
feed.normalize
Parse feed text or fetch a feed URL (≤ 1 MiB body, public hosts) into the normalized @sdxc/feed shape.
@sdxc/feed$0.003

Call over plain HTTP

POST /v1/<id> with a JSON body. Same prices and payment headers as MCP.

# 1. Challenge
curl -i -X POST https://api.sdxc.dev/v1/semver.satisfies \
  -H 'content-type: application/json' \
  -d '{"version":"1.2.3","comparison":"^","against":"1.0.0"}'
# → 402 + PAYMENT-REQUIRED

# 2. Retry with PAYMENT-SIGNATURE from your x402 wallet
# → 200 + PAYMENT-RESPONSE + JSON result