What an agent can do
- Plan a swap on one chain, or a cross-chain swap or bridge between any two of Ethereum, Arbitrum, Base, BNB Chain, Polygon and Optimism. The plan returns the calls to sign, in order.
- Track a swap, transfer or gas top-up after it is sent: whether it is pending, on its way, delivered or refunded, and what arrived.
- Find a token by symbol or address, with a flag when a token looks like a listed one.
- Get gas: a wallet that holds USDC but no native coin gets ETH, BNB or POL by signing one USDC authorization. Signing costs no gas.
Cleave never signs and never sends a user's transaction. The one thing it sends is a gas order the wallet has already signed.
What every plan states
A plan leads with what can go wrong, then the outcome:
- Notices first: a blocking notice returns no calls; a warning, or a recipient other than the wallet, sets
requiresConfirmation. - The outcome kind: an exact amount, or at least a minimum; with a swap on arrival, the requested token, else a named fallback token; where a transfer can go unfilled, a refund of the bridged token on the source chain hours later.
- Costs: every cost charged by others, except network gas. Cleave's fees are inside the price.
- Time: the expected time for a cross-chain route, and
validUntil, after which the calls are stale and the agent should plan again.
Routes that need a claim step on the destination are not offered to agents.
Three ways in
| Point | MCP | REST | x402 |
|---|---|---|---|
| What it serves | All four tools | All four tools | Gas top-ups only |
| Endpoint | https://api.cleave.fi/ | https://api.cleave.fi/ | https://api.cleave.fi/ |
| Transport | Streamable HTTP, JSON-RPC | POST with a JSON body | GET and the HTTP 402 payment flow |
| Key | None | None; a partner key is optional | None |
| Limits the user can set | Wallet pin, USD cap, listed tokens only | None: the token to receive must be listed | None |
| How the user pays gas | Their wallet sends the calls | Their wallet sends the calls | One USDC payment authorization |
Choosing one
- MCP fits an agent that runs in an MCP client. The connection URL can carry the user's limits, so they apply to every tool call. See MCP server.
- REST fits your own code: an agent framework, a bot or a backend. The tools take the same JSON input as over MCP. See Agent REST API.
- x402 fits an agent that already pays for HTTP resources with x402. It covers gas top-ups only. See x402 gas top-up.
The usual flow
cleave_find_token, when a symbol is ambiguous.cleave_plan_swap, with the wallet, the tokens and the amount.- The wallet signs the returned calls in order, before
validUntil. cleave_track_swap, with the chain, the transaction hash and the plan'srequestId.
Check with cleave_track_swap before sending a plan again: a plan still in flight that is sent twice can pay twice.
Finding Cleave
Cleave publishes a server card, OpenAPI documents and an ERC-8004 agent registration, is listed in the MCP registry as fi.cleave/, and its gas top-up is listed in the x402 Bazaar. See Discovery.