x402-fetch + viem); the dollars are test dollars.MERCURY is an agent-to-agent storefront. Your agent discovers what's for sale,
pays with its own wallet, and gets the goods — no human, no signup, no API key, no checkout page.
Just an HTTP 402 Payment Required that your agent settles on-chain and retries.
Wire it in about 5 lines.
x402 is the missing piece between "my agent can decide" and "my agent can pay." MERCURY is a live seller on the other end of it — a real catalog your agent can browse and buy from on its own.
The price ships in the 402 response. Your agent signs, the facilitator settles, you get the result. No onboarding form, no dashboard, no monthly seat.
A free /catalog and a standard /.well-known/x402 doc let your agent find what's for sale and the price before it ever pays. Discovery and checkout can't drift.
Web-fetch delivers right now — pass a ?url= and your agent gets clean page text back in the result. Mints (resources, 1-of-1 placeables, agent identity) are delivered on the mainnet step: gated and off until the minter is armed.
Every charge is real USDC on Base mainnet, signed per call and capped at the exact price shown — your agent never authorizes more than the listed amount for one result.
Every line is a single HTTP route your agent can hit. Prices are in USDC on Base mainnet.
This table hydrates live from /catalog — the same source of truth the pay-gate uses, so it can never drift from what you'll actually be charged.
| Service | Route | Price | Type |
|---|---|---|---|
| web-fetch live | GET /buy/fetch?url=… | $0.003 | api · web-fetch |
| signal | GET /buy/signal | $0 — free demo/sample | data |
| matter | GET /buy/matter | gated — delivers on the mainnet step | resource |
| brick | GET /buy/brick | gated — delivers on the mainnet step | resource |
| antimatter | GET /buy/antimatter | gated — delivers on the mainnet step | resource |
| dark-matter | GET /buy/dark-matter | gated — delivers on the mainnet step | resource |
| shelf | GET /buy/shelf | gated — delivers on the mainnet step | placeable |
| wand | GET /buy/wand | gated — delivers on the mainnet step | placeable |
| agent | GET /buy/agent | gated — delivers on the mainnet step | agent |
| api-render | GET /buy/api/render | gated — delivers on the mainnet step | api |
| api-oracle | GET /buy/api/oracle | gated — delivers on the mainnet step | api |
Live now: GET /buy/fetch?url=… charges ~$0.003 USDC and returns clean page text — the one route that charges-and-delivers today. signal is a free $0 demo read. The mint and metered-API routes are gated — they deliver on the mainnet step, off until the minter is armed (for those, pass ?to=<your-wallet> when it's live so the good is sent to you).
It's the real Coinbase x402-fetch + viem under the hood. Wrap your wallet's
fetch, hit a paid route, and the 402 → sign → settle → deliver loop runs itself:
import { wrapFetchWithPayment } from "x402-fetch"; import { privateKeyToAccount } from "viem/accounts"; const account = privateKeyToAccount(process.env.BUYER_PK); // throwaway Base-Sepolia key w/ USDC const pay = wrapFetchWithPayment(fetch, account); const res = await pay("https://mercury-x402-jed.fly.dev/buy/fetch?url=https://example.com"); const good = await res.json(); // returns clean page text + title; settles ~$0.003 USDC. Live-delivering route.
npm i x402-fetch viem
2. fund your agent wallet with a little USDC on Base
3. hit a paid route — settlement happens automatically on retry
402 + price + terms.I want a handful of agent builders to wire MERCURY into a real agent and tell me what's missing. You get hands-on help, direct input on the catalog, and first position when this goes live.