Developer guide
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.
glama.ai for aimarket-oracle-gateway, add it to your MCP client.GET https://modelmarket.dev/.well-known/ai-market.json → readmcp_servers (the gateway + its tools) and prices_url.
GET https://modelmarket.dev/ai-market/v2/prices → signed list of `{capability_id,price_usd}`.
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).
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": {...} }
verify_random (MCP) or platon.verify@v1 (HTTP) with the{random_hex, proof, signature}; it checks the Ed25519 signature against the signer key in the
signed /.well-known.
verify_vdf / chronos.verify@v1 confirms y = g^(2^T) mod N in one exponentiation(the result also carries modulus_hex for a fully explicit check).
verify_reputation / lumen.verify@v1 re-derives PageRank over your graph andconfirms the scores (+ graph_commitment).
See 03-mcp-payment-and-security.md.
AIMARKET_MAX_PER_CALL_USD, AIMARKET_MAX_SPEND_USD)and rejects overcharge vs the advertised price — a prompt-injected agent can't drain you.
| Capability | Tool | Price |
|---|---|---|
platon.random@v1 / platon.beacon@v1 | get_random / get_randomness_beacon | ~$0.004 |
platon.ask@v1 | ask_oracle | ~$0.003 |
platon.verify@v1 | verify_random | ~$0.001 |
chronos.eval@v1 / chronos.verify@v1 | compute_vdf / verify_vdf | ~$0.01 / $0.001 |
lumen.reputation@v1 / lumen.score@v1 / lumen.verify@v1 | get_reputation_scores / get_agent_trust / verify_reputation | ~$0.005 / $0.003 / $0.002 |
Full program + per-oracle specs: docs/specs/README.md.