# OnchainRouter > Onchain tools for AI agents. Call an onchain tool, pay a cent, get the result. No account, no API key, no subscription. No answer, no charge. OnchainRouter is a catalogue of paid onchain tools for AI agents. Listing tools is free. Each call returns HTTP 402 with a price and payment rails; the agent signs an x402 payment from its own wallet and calls again. The router holds no wallet and takes no commission: settlement goes from the agent to the tool author. ## Connect - MCP (Streamable HTTP): `https://onchainrouter.io/mcp`. `tools/list` is free. A paid call returns a payment-required result until the signed payment is passed as the `payment` argument (or in `_meta["x402/payment"]`). - HTTP: `POST https://onchainrouter.io/api/tools/` with a JSON body. Unpaid: 402 with a `PAYMENT-REQUIRED` header. Paid: send the signed payment in `PAYMENT-SIGNATURE`. - Wallet for chat clients: `npx onchainrouter wallet` (MCP server with `sign_x402_payment`). - SDK: `npm install onchainrouter`; `pay(url, input, wallet)` on the client, `paid(config, handler)` on the server. ## Payment rails (testnet) - Hedera testnet (`hedera:testnet`): 0.1 HBAR per call, settled by Blocky402. Gas sponsored. - Arc testnet (`eip155:5042002`): 0.01 USDC per call, settled by Circle Gateway. Gasless. Both rails are offered in one 402; pay on whichever you hold. ## Rules - No answer, no charge: a tool that cannot deliver returns 404 (HTTP) or `isError` (MCP) and the payment is never settled. - Malformed input is rejected with 400 before any price is quoted. - 0% commission: the 402 names the author's address; the router never touches the funds. ## Tools ### Lending rates - MCP tool: `lending_rates` - HTTP: `POST https://onchainrouter.io/api/tools/lending-rates` - Price: 0.1 HBAR or 0.01 USDC per call - Best place to lend or borrow an asset, weighed against liquidity depth. - Inputs: asset: Asset symbol, e.g. USDC or WETH; chain (ethereum | arbitrum | bsc | avalanche | polygon | base | optimism | gnosis | scroll): Chain to search - Example input: `{"asset":"USDC","chain":"ethereum"}` ### Governance power - MCP tool: `governance_power` - HTTP: `POST https://onchainrouter.io/api/tools/governance-power` - Price: 0.1 HBAR or 0.01 USDC per call - How concentrated a protocol's voting power is, and how much of it never votes. - Inputs: protocol (ampleforth | compound | cryptex | ens | euler | gitcoin | hifi | hop | ousd | pooltogether | radicle | rarible | reflexer | threshold | uniswap): Protocol whose delegate table to measure - Example input: `{"protocol":"uniswap"}` ### Withdrawal risk - MCP tool: `withdrawal_risk` - HTTP: `POST https://onchainrouter.io/api/tools/withdrawal-risk` - Price: 0.1 HBAR or 0.01 USDC per call - Whether a deposit can actually leave a lending market right now, and how much can. - Inputs: asset: Asset symbol, e.g. USDC or WETH; chain (ethereum | arbitrum | bsc | avalanche | polygon | base | optimism | gnosis | scroll): Chain to search; amountUsd?: Withdrawal size in USD, to check whether it clears - Example input: `{"asset":"USDC","chain":"base","amountUsd":50000}` ### Liquidation pressure - MCP tool: `liquidation_pressure` - HTTP: `POST https://onchainrouter.io/api/tools/liquidation-pressure` - Price: 0.1 HBAR or 0.01 USDC per call - Whether borrowers against an asset are being liquidated right now, and how much room the terms leave. - Inputs: asset: Asset symbol, e.g. WETH or USDC; chain (ethereum | arbitrum | bsc | avalanche | polygon | base | optimism | gnosis | scroll): Chain to search - Example input: `{"asset":"USDC","chain":"base"}` ### Protocol health - MCP tool: `protocol_health` - HTTP: `POST https://onchainrouter.io/api/tools/protocol-health` - Price: 0.1 HBAR or 0.01 USDC per call - Whether a protocol is growing or draining, and whether it earns anything from what it holds. - Inputs: protocol (aave-amm | aave-arc | aave-rwa | aave-v2 | aave-v3 | abracadabra | alpaca-finance-lending | banker-joe | bastion-protocol | benqi | burrow | compound-v2 | compound-v3 | cream-finance | dforce | euler-finance | geist-finance | goldfinch | inverse-finance | iron-bank | kinza-finance | liquity | makerdao | maple-finance-v1 | maple-finance-v2 | moonwell | morpho-aave-v2 | morpho-aave-v3 | morpho-compound | pac-finance | qidao | radiant-capital | rari-fuse | scream | seamless-protocol | seismic | sonne-finance | spark-lend | truefi | uwu-lend | venus | vesta-finance | zerolend): Protocol name; chain (ethereum | arbitrum | bsc | avalanche | polygon | base | optimism | gnosis | scroll): Chain the deployment runs on - Example input: `{"protocol":"moonwell","chain":"base"}` ### Governance pulse - MCP tool: `governance_pulse` - HTTP: `POST https://onchainrouter.io/api/tools/governance-pulse` - Price: 0.1 HBAR or 0.01 USDC per call - Whether a protocol's governance is still deciding anything, and whether votes clear quorum. - Inputs: protocol (ampleforth | compound | cryptex | ens | euler | gitcoin | hifi | hop | ousd | pooltogether | radicle | rarible | reflexer | threshold | uniswap): Protocol whose proposal history to read - Example input: `{"protocol":"ens"}` ## List a tool Any x402 endpoint on Hedera or Arc can be listed, by a person or an agent. Nothing is stored; a listing is a GitHub issue or pull request that a maintainer merges. - MCP: call `submit_tool` on `https://onchainrouter.io/mcp` (free) with endpoint, name, question, example. It probes the 402 and returns `issueUrl` (prefilled) and `registryEntry` (for a PR to `lib/tools/registry.ts`). - HTTP: `POST https://onchainrouter.io/api/submit` with the same JSON fields; same response. - Not on x402 yet: `npm install onchainrouter`, wrap the function with `paid()` from `onchainrouter/server`, deploy, then list it. - Rules: the 402 must offer `hedera:testnet` or `eip155:5042002`; return 404 when there is no answer so nothing is charged; do one job and report the outcome. ## Pages - [Docs](https://onchainrouter.io/docs): quickstarts, HTTP and MCP reference, selling a tool, funding a wallet - [Catalogue](https://onchainrouter.io/tools): every tool with price and inputs - [Connect](https://onchainrouter.io/connect): MCP and HTTP setup for your own agent or Claude Code - [Playground](https://onchainrouter.io/playground): try a tool from a wallet we fund - [Submit](https://onchainrouter.io/submit): list your own tool; wrap an API with `paid()` or bring an x402 endpoint - [Source](https://github.com/web3xDev/onchainrouter)