Pay anything. Borrow the gap.
Your agent pays x402 prices in USDG on Robinhood Chain from its own wallet. When it is short and has a Priors line, it borrows only the difference, and repays when it gets paid.
Connect your agent
Where does it run? Pick one: one copy, one paste.Add Priors to your AI client. Pick it:
1 · read records (hosted, no key)
claude mcp add --transport http priors https://mcp.priors.trade/mcp
2 · pay and borrow (your agent's wallet, from the environment)
export PRIORS_KEY=0x… # the agent wallet's key claude mcp add priors-wallet -e PRIORS_KEY=$PRIORS_KEY -- npx -y @priors/mcp
Then start claude and ask: "what is agent 6234's priors score?" or "pay https://api.priors.trade/v1/score/6234".
1 · read records: Settings → Connectors → Add custom connector, name Priors, URL:
https://mcp.priors.trade/mcp
2 · pay and borrow: Settings → Developer → Edit config, paste, restart Claude Desktop.
{
"mcpServers": {
"priors-wallet": {
"command": "npx",
"args": ["-y", "@priors/mcp"],
"env": { "PRIORS_KEY": "0x… the agent wallet's key" }
}
}
}{
"mcpServers": {
"priors": { "url": "https://mcp.priors.trade/mcp" },
"priors-wallet": {
"command": "npx",
"args": ["-y", "@priors/mcp"],
"env": { "PRIORS_KEY": "0x… the agent wallet's key" }
}
}
}Save, then enable the servers in Cursor Settings → MCP.
read (remote): https://mcp.priors.trade/mcp Streamable HTTP, no key pay (local): npx -y @priors/mcp stdio, PRIORS_KEY in the environment
Paying needs the agent's own wallet: a key kept in the environment as PRIORS_KEY, holding only what the agent may spend. Reading needs nothing.
Pay x402 prices from your code. When the balance is short and the agent has a line, it borrows the gap.
npm i @priors/x402 ethers
import { createPayer } from "@priors/x402";
const { pay } = createPayer({ signer, pool, agentId, maxPrice: "$0.10", maxBorrow: "$5" });
const { response } = await pay("https://api.priors.trade/v1/score/6234");The full version, with every option explained, is just below.
Priors records as a paid endpoint, for any runtime that speaks x402.
curl -i https://api.priors.trade/v1/score/6234 # HTTP 402, with a price of 0.03 USDG on eip155:4663 in the PAYMENT-REQUIRED header
Pay it with the SDK, or with any x402 client on Robinhood Chain. /v1/report/{id} returns the full credit report, same price.
Pay from code
A fetch that answers 402 by paying, within the limits you set.// npm i @priors/x402 ethers import { ethers } from "ethers"; import { createPayer, robinhood } from "@priors/x402"; // the agent's own wallet: a key kept in the environment, holding only what it may spend const provider = new ethers.JsonRpcProvider("https://rpc.mainnet.chain.robinhood.com"); const signer = new ethers.Wallet(process.env.PRIORS_KEY, provider); const payer = createPayer({ signer, pool: robinhood.pool, // optional, with agentId: borrow the gap from its Priors line agentId: 437n, // its ERC-8004 id maxPrice: 100_000n, // never pay more than $0.10 for one call (USDG has 6 decimals) maxBorrow: 5_000_000n, // never borrow more than $5 for one call; 0 never borrows }); // a fetch that pays a 402: what it paid and borrowed, in atomic USDG const { response, paid, borrowed, dueAt } = await payer.pay("https://api.priors.trade/v1/report/466"); console.log(response.status, await response.json(), { paid, borrowed, dueAt });
pool and agentId, or set maxBorrow to 0, and it only ever pays from balance. A loan returns its dueAt.Read Priors from any MCP client
Hosted, nothing to install, no key: one URL.claude mcp add --transport http priors https://mcp.priors.trade/mcp
{
"mcpServers": {
"priors": { "url": "https://mcp.priors.trade/mcp" }
}
}Streamable HTTP, read-only. It reads the same public data as priors.trade and the facilitator's directory; it never holds a key and cannot send a transaction.
The same record as a paid x402 endpoint, for agents that pay per call: https://api.priors.trade/v1/report/{id} and /v1/score/{id}, 0.03 USDG each. The code above pays it.
Pay from Claude, or any MCP client
A local MCP server with your agent's wallet behind it.{
"mcpServers": {
"priors": {
"command": "npx",
"args": ["-y", "@priors/mcp"],
"env": { "PRIORS_KEY": "0x… the agent wallet's key" }
}
}
}max_price.How credit works for payments
Not leverage. Float: the few dollars that pay for the call that earns the next ten.It borrows only the gap
When a price is above the agent's USDG balance, the payer borrows the shortfall from the agent's Priors line (at least the pool's minimum loan), pays, and keeps the rest for the next calls. With enough balance, it borrows nothing.
It repays when it gets paid
A loan for payments runs seven days by default. The fee is the pool's, one percent per thirty days, and the agent repays when its own clients pay it. Every repayment lengthens its record.
A line needs someone behind it
Paying works for any wallet. Borrowing needs an ERC-8004 identity with a Priors line, and a line needs a backer who pays first if the agent walks. Volume through the hub never opens a line by itself.
Ask for a first line on the seats page, or back an agent on Participate.