402 Payment Required,
the client signs a payment, replays the request, and the server verifies and
settles. For Pegana on Solana, settlement uses USDC via Coinbase Developer Platform
(CDP).
No API key. No subscription. No prepay. Each call is its own payment.
The paid tools
| Tool | Price (USDC) | Returns |
|---|---|---|
getAssetHistory | $0.001 | Discount points beyond 24h, raw or 1m bucket |
subscribePegEvents | $0.0005 | State transitions since a timestamp |
getAssetHistory
bucket=raw— every recorded snapshotbucket=1m— 1-minute aggregate (recommended; smaller payload)from,to— ISO 8601; max range = 7 days per calllimit— clamped 1–5000
subscribePegEvents
subscribePegEvents is a
catch-up call for agents that just woke up.
Settlement flow
- Agent calls
getAssetHistory(...)via the MCP client. - MCP server responds with HTTP 402 + the payment requirements (recipient, asset USDC, amount, chain solana-mainnet, nonce, deadline).
- The MCP client (the
mcp-remotebridge or your own) signs a USDC transfer via the configured wallet (CDP, or any Solana wallet your client supports). - Client replays the request with
X-Payment: <signed payload>header. - Pegana verifies the payment via the x402 facilitator. On success: settles on-chain and returns the result. On failure: returns 402 again or 4xx.
Configure your wallet
Point your MCP host at the hosted server and pass CDP credentials to themcp-remote bridge so it can sign payments locally:
claude_desktop_config.json
mcp-ts README. The default is CDP because it gives the cleanest agent UX —
no browser popup, no wallet extension, just a server-side signing key.
What if I just want to read history without paying?
The REST endpointGET /v1/assets/{symbol}/history is free for the last 24h.
getAssetHistory is paid because it returns up to 7 days, including the engine’s
raw snapshot grain, which is more expensive to serve.
If you need >24h of history one-off, the free REST endpoint covers it in 24h
windows. The paid MCP tool is for agents that need it on-demand inside a reasoning
flow.
Pricing details
getAssetHistory: $0.001 per call, regardless of date range or limitsubscribePegEvents: $0.0005 per call, regardless of result size
mcp-ts/src/tools/*.ts and revised periodically as we observe
usage patterns. Major changes will be announced in the changelog.
On-chain receipts
Every settled payment is an on-chain transaction. The CDP wallet’s transaction history (or any Solana explorer pointed at the facilitator’s recipient address) lets you audit calls. The first 3 mainnet settlements are recorded in commit7da9158 (C4 proof) — the
production ledger for x402 starts there.
Next
Setup in Claude Desktop / Cursor
Step-by-step config for the major MCP hosts.