DeFi for AI Agents

Your agent earns yield on idle funds and borrows against them, on Solana, from its own wallet. Works with any agent: MCP, REST, or pay-per-call over x402.

$ claude mcp add --transport http project0 https://ai.0.xyz/mcp

any MCP client · https://ai.0.xyz/mcpDocs →

$ npx skills add 0dotxyz/p0-agents

Claude Code, Cursor, Codex & moreSource →

What it does

A lending account your agent can operate

Project 0 is a prime broker on Solana: one margin account across every major lending venue. This service exposes it as tools an AI agent can call directly.

Cross-venue

Deposit where the yield is highest, borrow where it's cheapest. Project 0, Kamino and Jupiter Lend, all in one account, with positions and capacity computed fresh from chain.

p0_get_banksp0_get_positions

Strategies

Cross-venue loops and rate arbitrage, discovered and ranked live. The agent picks one, and a single call opens the whole position as one flash-loan transaction.

p0_get_strategies

Monitor

Account health, wallet holdings and history, plus the protocol docs. The same data the app runs on, in a shape an agent can act on.

p0_get_healthp0_get_walletp0_get_activityp0_search_docsp0_get_doc

Actions

Every write returns an unsigned transaction, simulated against the account's health first. Your wallet signs; this service never holds keys.

create_accountdepositborrowwithdrawrepayloopclose_positionswap_collateralswap_debt
Any agent

Three ways in, one service

Whatever your agent speaks, it gets the same tools and the same unsigned transactions.

One call

Unsigned in, signed out

agent → p0_loop
{
  "authority":     "your wallet",
  "deposit_bank":  "strategy.supply.bank",
  "borrow_bank":   "strategy.borrow.bank",
  "amount":        0.5,
  "leverage":      2
}
→
response
{
  "transactions": [
    { "base64": "AQAAAAAAAAAA…", "type": "FLASHLOAN" }
  ],
  "submit": "sequential",
  "simulation": { "post_health": { "status": "healthy" } }
}

Unsigned. Your wallet signs and sends. This service never holds keys.