Agent integration
Every paid surface on mondello.dev speaks
x402 —
USDC on Base mainnet, facilitator at
pay.openfacilitator.io. Three ways to call:
1. Find what to buy
Fetch the master manifest. No auth, no payment required. Returns every skill, hosted API, and paid content endpoint with x402 metadata.
curl https://mondello.dev/api/catalog.json
Each item includes an x402 block with
scheme, network, asset,
payTo, priceMicroUsd — everything
needed to pay programmatically.
2. OpenAPI for function calling
If your agent supports OpenAPI (Claude tool use, ChatGPT function calling, LangChain, etc.), skip straight to the spec:
curl https://mondello.dev/openapi.json
It's a valid OpenAPI 3.1 document with one custom extension —
x-x402-payment — that tells the client how much a
given operation costs and where to pay. The rest of the spec
(paths, request schemas, response shapes) is fully standard,
so most OpenAPI-aware tools can import it with no changes.
3. MCP server
Every EmDash site ships an MCP server over Streamable HTTP at
/_emdash/api/mcp. Tools: content read/search,
schema introspection, media, menus, taxonomy.
# Unauthenticated probe — returns 401 with WWW-Authenticate
curl -i https://mondello.dev/_emdash/api/mcp
# Auth discovery
curl https://mondello.dev/.well-known/oauth-protected-resource Auth is OAuth 2.1 with dynamic client registration — point Claude Desktop, Cursor, or any MCP-aware tool at the URL and the flow is automatic. This is separate from x402: MCP is for site content read; x402 is for paid compute.
4. Pay with curl
The server returns HTTP 402 with a PAYMENT-REQUIRED
header describing what's owed. Any x402-compatible wallet
tool can sign the challenge and retry:
# Step 1: get the 402 challenge
curl -i https://mondello.dev/skills/emdash-deploy/raw
# Step 2: decode the challenge header, sign with your wallet,
# retry with the payment-signature header. Any x402 client
# (e.g. 'npx @x402/cli pay <url>') handles this for you.
Resources without needing a wallet:
/skills/<slug> preview pages,
/skills.json, /api/catalog.json,
/api/stats.json,
/api/x402/media/image/generate?inspect=1 style
landing docs on every paid endpoint.
5. Pay from TypeScript
We publish a small helper at
src/lib/x402-client.ts that wraps
fetch() with the full x402 handshake. Any
Cloudflare Worker, Node script, or Astro SSR can use it:
import { privateKeyToAccount } from "viem/accounts";
import { x402FetchBytes } from "@/lib/x402-client";
const signer = privateKeyToAccount(process.env.WALLET_PK);
const { bytes, paid, paidUsd } = await x402FetchBytes(
"https://mondello.dev/api/x402/media/image/generate",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ title: "an agent-era hero" }),
signer,
maxPriceUsd: 0.10, // refuse anything above $0.10
allowedNetworks: ["eip155:8453"], // Base only
},
);
console.log(`Paid ${paidUsd} USDC, got ${bytes.length} byte image`); The helper caps single-payment size, restricts networks + asset, and only retries once. See the source for the full API.
6. Use from Claude Code
Any Claude Code skill installed from this site is a pure Markdown recipe — no runtime payment needed after install. The paid step is the initial download:
curl -sSL https://mondello.dev/skills/emdash-deploy/install | bash
The install script fetches the x402-gated raw markdown and
writes to ~/.claude/skills/<slug>/skill.md.
If the agent shell has x402 configured it pays silently;
otherwise you get clear instructions on stdout.
7. Fund a wallet
x402 today settles in USDC on Base mainnet. Minimum practical funding is a few dollars. Base bridge: bridge.base.org. For agents that already hold USDC on Ethereum mainnet, the native Base bridge is cheapest. For fresh wallets, Coinbase can send USDC directly to Base with no gas hassle.
Our treasury wallet:
0x0E4d1C7Ca47879C7Dd518526ef38f290C7081028 on Base.
This is the payTo value in every x402 challenge
from this site. You can verify settlements on
BaseScan.