mcp
v1.0.1Spot market for AI inference tokens.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_spot
Spot prices per model: the delivered OUTPUT-token rate (USD/MTok) from affirmed on-chain draws (last price, median, draw count).
selling_guide
Turnkey, executable steps to put a human's spare AI capacity on mtok.market via SELLER-HOSTED delivery — run YOUR OWN relay pointed at an upstream you control (a local Ollama/vLLM model, a subscription via a CLI bridge, or a provider key) and list a tier:direct offer; buyers pay you per chunk on-chain. Gotchas baked in. supply_type filters to one path.
| Parameter | Type | Description |
|---|---|---|
supply_type | string | Narrow the guide to one supply path: "open-weight" (a local Ollama/vLLM model), "subscription" (a CLI bridge to a plan you pay for), or "provider-key" (an API key you hold). Omit for all three. |
buying_guide
Turnkey, executable steps to get a human cheap AI tokens and run their prompts on mtok.market: bid (read routes[]) or read the book for a tier:direct offer, then draw paid chunks from the seller's relay (pay each draw on-chain through MtokDripLedger, POST <relayEndpoint>/chunk, the relay verifies DrawPaid and serves). You need a funded wallet on Base.
get_book
Open offers (asks) and bids for a model. sort=input|output ranks by that dimension.
| Parameter | Type | Description |
|---|---|---|
model | string | Model id as listed in the book, e.g. "llama-3.1-70b". Exact string match. Omit for every model. |
sort | string | Rank by "input" (inputPricePerMTok) or "output" (outputPricePerMTok). Default output. |
get_draws
The chain-derived draw tape: contract-paid draws indexed from MtokDripLedger events on Base. status=inProcess (DrawPaid with no terminal yet) | settled (closed by DrawAffirmed or DrawDisputed). This is the canonical delivered/receipt surface; the platform records nothing off-chain.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max draws returned, newest first, 1..200. Default 50. |
status | string | "inProcess" = DrawPaid with no terminal event yet; "settled" = closed by DrawAffirmed or DrawDisputed. Omit for both. |
get_stats
Exchange fee model plus chain-derived volume: delivered volume + affirmed/disputed counts, all recomputable from MtokDripLedger events on Base (source:"chain").
register
Create an agent identity. Returns {agentId, apiKey}; send the apiKey as the x-api-key (or Authorization: Bearer) header on EVERY subsequent request to act as that agent — this transport is stateless, so it is not remembered between calls. Pass pubkey (Ed25519 SPKI PEM) if you will place signed non-custodial orders.
| Parameter | Type | Description |
|---|---|---|
name * | string | Display name for the agent, free text, e.g. "my-ollama-seller". Not unique. |
pubkey | string | Ed25519 public key as an SPKI PEM ("-----BEGIN PUBLIC KEY-----" ... ). Required later for signed orders; the SDK mints and publishes one for you. |
get_me
Your agent state: open orders (offers + bids). Non-custodial — there is no platform wallet, grant, or credential vault in /me; money moves peer-to-peer on-chain, and your delivered draws are the on-chain tape (get_draws).
place_offer
List capacity for sale via SELLER-HOSTED delivery (tier:"direct" — the only advertised path). Set tier:"direct" + relayEndpoint (your relay's PUBLIC HTTPS url — a cloudflared tunnel gives one free) + settlementPubkey (your seller payout EVM address on Base) and NO credentialId: you run your own relay (mtok-relay or any conforming passthrough) pointed at an upstream you control, and buyers pay each draw on-chain through MtokDripLedger (canonical relay protocol: GET /api/guides/selling, notes.directTierProtocol). After every instance behind relayEndpoint is dual-stack, add requestHashScheme:…
| Parameter | Type | Description |
|---|---|---|
inputPricePerMTok | number | Ask price for input tokens, USD per million tokens, positive, e.g. 0.20. |
inputTokens | integer | Input (prompt) tokens in the block, whole tokens, e.g. 1000000 for one MTok. |
intent | object | Pre-signed order intent (the SDK builds it). When present with sig the flat fields are ignored; the order comes from intent.params. |
model | string | Model id as listed in the book, e.g. "llama-3.1-70b". Exact string match. |
outputPricePerMTok | number | Ask price for output tokens, USD per million tokens, positive, e.g. 0.80. |
outputTokens | integer | Output (completion) tokens in the block, whole tokens, e.g. 500000. |
payoutAddress | string | Where seller USDC lands. Canonical EVM address on Base: 0x + 40 hex, e.g. "0x1234567890abcdef1234567890abcdef12345678". |
recurring | boolean | true to re-list the same block each time the window closes. Default false. |
relayEndpoint | string | Public HTTPS base url of your relay, e.g. "https://quiet-fox.trycloudflare.com". Buyers POST <relayEndpoint>/chunk. |
requestHashScheme | string | Optional signed rollout marker; set only when every relay instance behind relayEndpoint is dual-stack. |
settlementPubkey | string | Seller wallet the on-chain draw pays; for a direct offer the same wallet as payoutAddress. Canonical EVM address on Base: 0x + 40 hex, e.g. "0x1234567890abcdef1234567890abcdef12345678". |
sig | string | Ed25519 signature over intent, base64url. Pair with intent. |
startsInSeconds | integer | Delay before the offer window opens, seconds, 0..604800. Default 0 (open now). |
tier | string | Delivery tier. "direct" (seller-hosted relay) is the only one advertised. |
usableForSeconds | integer | How long buyers can draw against this offer once its window opens, seconds, 300..604800 (5 minutes to 7 days), e.g. 43200. |
place_bid
Bid for a block. The bid response returns routes[] — the crossing SELLER-HOSTED offers (lowest price first), each {offerId, sellerId, relayEndpoint, settlementPubkey, requestHashScheme?, inputPricePerMTok, outputPricePerMTok, availableInputTokens, availableOutputTokens}. Pick a route and DRAW paid chunks from its relayEndpoint (pay each draw on-chain through MtokDripLedger using /api/config, POST <relayEndpoint>/chunk, then affirmDraw/disputeDraw on-chain — see buying_guide / drawFromSeller). priceOn=input|output ranks matches by one dimension. You ALWAYS need a funded wallet on Base (ther…
| Parameter | Type | Description |
|---|---|---|
inputTokens | integer | Input (prompt) tokens in the block, whole tokens, e.g. 1000000 for one MTok. |
intent | object | Pre-signed order intent (the SDK builds it). When present with sig the flat fields are ignored; the order comes from intent.params. |
maxInputPricePerMTok | number | Most you will pay for input tokens, USD per million tokens, e.g. 0.25. |
maxOutputPricePerMTok | number | Most you will pay for output tokens, USD per million tokens, e.g. 1.00. |
maxStartDelaySeconds | integer | Longest you will wait for an offer window to open, seconds, 0..604800. Default 0 (open now only). |
model | string | Model id as listed in the book, e.g. "llama-3.1-70b". Exact string match. |
outputTokens | integer | Output (completion) tokens in the block, whole tokens, e.g. 500000. |
priceOn | string | Rank crossing offers by "input" or "output" price alone. Omit to rank by the sum of both. |
sig | string | Ed25519 signature over intent, base64url. Pair with intent. |
cancel_order
Cancel one of your open orders. side: offer|bid.
| Parameter | Type | Description |
|---|---|---|
id * | string | The order id returned by place_offer / place_bid, also listed by get_me. |
side * | string | "offer" or "bid": which book the order is on. |
get_reputation
A seller's reputation: score, tier, recommendedMaxChunkUsd (the per-draw size a buyer should risk in the direct tier), plus a chain object {affirmed, disputed, deliveredUsd} folded from MtokDripLedger events (source:"chain").
| Parameter | Type | Description |
|---|---|---|
agentId * | string | The seller agent id, as returned by register and shown as sellerId on routes[] and book offers. |
get_config
Chain config a SELLER-HOSTED buyer needs to build the on-chain draw payment: { feeAddress, feeBps, dustThresholdUsd, chainId, usdcAddress, dripContractAddress }. Pay each draw through the MtokDripLedger contract at dripContractAddress (payDraw), then affirmDraw/disputeDraw on-chain; the seller relay verifies the DrawPaid event before delivery.