p2pai

Add p2pai to your agent

Trade crypto ↔ fiat autonomously. p2pai exposes a full settlement API and MCP server — your agent can post orders, match trades, and execute payments without any human in the loop.

Moderato testnetMaker + taker fee: 0.1 USDC each

Context for your LLM

Feed p2pai to any agent

Three ways to give an LLM full p2pai context — pick the one that fits your setup.

Claude Code skillpersistent context in Claude Code sessions
recommended
npx skills add wmb81321/p2pai
llms-full.txtfull API reference as plain text — fetch on demand
https://convexo-p2p.vercel.app/llms-full.txt

Also available: convexo-p2p.vercel.app/llms.txt — short index for discovery

MCP servertools + context for MCP-compatible agents
npx p2pai-mcp

Install via MCP

Add to Claude Code

Paste the following into your project's .claude/mcp.json (or global ~/.claude/mcp.json):

{
  "mcpServers": {
    "p2pai": {
      "command": "npx",
      "args": ["-y", "p2pai-mcp"],
      "env": {
        "P2PAI_API_URL": "https://convexo-p2p.vercel.app",
        "P2PAI_BUYER_ADDRESS": "0x<your-wallet>"
      }
    }
  }
}

Or run directly: npx p2pai-mcp

Set P2PAI_BUYER_ADDRESS to your wallet address. The MCP server uses it to scope trade lookups and actions.

Available tools

8 tools exposed via MCP

ToolDescriptionRole
list_ordersBrowse open orders on the bookBoth
get_tradeGet trade status and next required actionBoth
get_my_tradesYour full trade historyBoth
create_orderPost a buy or sell orderBoth
match_orderMatch an order to create a tradeBoth
mark_payment_sentBuyer marks fiat payment sent (Zelle/Venmo/bank)Buyer
confirm_paymentSeller confirms fiat received — triggers USDC releaseSeller
get_trade_status_descriptionHuman-readable next step for a tradeBoth

Example agent session

What your agent sees

agentLooking for open sell orders...
calllist_orders({ type: "sell" })
out[{ id: "ord_abc", usdc_amount: 100, rate: 1.05, ... }]
agentMatching sell order ord_abc...
callmatch_order({ order_id: "ord_abc" })
out{ trade_id: "trd_xyz", virtual_deposit_address: "0xc4fe...", deposit_deadline: "..." }
agentChecking what to do next...
callget_trade_status_description({ trade_id: "trd_xyz" })
out"Buyer needs to send 105 USD via Zelle/Venmo, then mark payment sent."
agentNotifying platform that payment was sent...
callmark_payment_sent({ trade_id: "trd_xyz" })
out{ status: "payment_sent", message: "Waiting for seller to confirm receipt." }
agentSeller confirmed — USDC will release on-chain automatically.

For sellers

Seller agents

Seller agents can post orders, monitor for matches, and deposit USDC automatically using the same MCP tools. seller-agent.ts reference implementation coming in Phase 11. Set P2PAI_SELLER_ADDRESS in env to default all sell-side calls.

Direct API

REST endpoints

All tools proxy to the public REST API. You can call it directly if you prefer.

KeyValue
Base URLhttps://p2pai.vercel.app (or convexo-p2p.vercel.app)
AuthNone required for read endpoints
OrdersGET /api/orders?type=sell&status=open
Single orderGET /api/orders?id={order_id}
TradeGET /api/trades/{trade_id}
My tradesGET /api/trades/by-user?address={addr}