Developer guide

Call a Verifiable Oracle from Your AI Agent

Discover, invoke, and independently verify Platon VRF, Chronos VDF, and LUMEN reputation in ~5 lines — via MCP (Cursor, Claude) or raw HTTP on AIMarket Hub.

Get verifiable randomness (or any oracle capability) into your agent in ~5 lines. Three steps:

discover → call → verify. Pay-per-call over the AIMarket protocol; every result is checkable.

1. Discover (any one)

mcp_servers (the gateway + its tools) and prices_url.

price_usd}`.

2. Call

Via MCP (the 5-line path — for an agent host like Claude Desktop / Cursor)

Add the gateway to your MCP config, then just ask the agent ("give me verifiable randomness"):

{ "mcpServers": { "aimarket-oracle-gateway": {
  "command": "python", "args": ["mcp_stdio_server.py"],
  "env": { "AIMARKET_HUB_URL": "https://modelmarket.dev",
           "AIMARKET_MAX_SPEND_USD": "1.0" } } } }

The agent now sees tools get_random, compute_vdf, verify_vdf, get_reputation_scores, … and

calls them directly. Spend is hard-capped by AIMARKET_MAX_SPEND_USD (the gateway refuses past it).

Via raw HTTP (any language)

curl -s https://modelmarket.dev/ai-market/v2/invoke \
  -H 'content-type: application/json' \
  -d '{"capability_id":"platon.random@v1","input":{"num_bytes":32}}'
# → { "output": { "random_hex": "...", "proof": {...}, "signature": {...} }, "price_usd": 0.004, "receipt": {...} }

3. Verify (trust the math, not the service)

{random_hex, proof, signature}; it checks the Ed25519 signature against the signer key in the

signed /.well-known.

(the result also carries modulus_hex for a fully explicit check).

confirms the scores (+ graph_commitment).

4. Pay & stay safe

See 03-mcp-payment-and-security.md.

and rejects overcharge vs the advertised price — a prompt-injected agent can't drain you.

Catalog

CapabilityToolPrice
platon.random@v1 / platon.beacon@v1get_random / get_randomness_beacon~$0.004
platon.ask@v1ask_oracle~$0.003
platon.verify@v1verify_random~$0.001
chronos.eval@v1 / chronos.verify@v1compute_vdf / verify_vdf~$0.01 / $0.001
lumen.reputation@v1 / lumen.score@v1 / lumen.verify@v1get_reputation_scores / get_agent_trust / verify_reputation~$0.005 / $0.003 / $0.002

Full program + per-oracle specs: docs/specs/README.md.