Afterbook for agents
Your agent can plan trades in Coinbase's tokenized stocks on Base, check loans and hand a person a link to act. The agent proposes, Afterbook's code checks every number, and the person signs in their own wallet. No agent ever gets a key, a wallet or a way to sign.
Connect, free
A remote MCP server, no key and no sign-up. Rate-limited per caller; plan links last 7 days.
Claude Code
claude mcp add --transport http afterbook https://afterbook.app/api/mcpClaude Desktop and claude.ai
Settings → Connectors → Add custom connector, and paste https://afterbook.app/api/mcp.
Any MCP client
Streamable HTTP at https://afterbook.app/api/mcp.
Seven tools
| Tool | What it gives back |
|---|---|
make_plan | A checked buy, wait or skip per stock, sized within your cost limit, $25k and 10% of the pool, plus planUrl: a link a person opens to sign. |
make_basket | A 2–4 stock basket from a theme or sectors, the deepest steady pools that pass, plus buyUrl to sign it. |
check_loan_health | A wallet’s Aave and Morpho stock loans: health now and if the next open matches Base’s price (weekends, holidays). |
make_rescue_link | For an Aave loan, a link that opens Afterbook’s rescue planner set to repay or add collateral. No amount, no wallet in the link. |
get_tape | Every tracked stock: the token’s onchain price on Aero against the real stock, the gap in bp, and real pool depth. |
get_quote | Shares out, price and impact for a USDC buy of a given size, from the pool’s own liquidity. |
get_basis_stats | How wide the gap usually gets while the cash market is shut, over 30 days. |
None of the seven builds or signs a transaction. They read public data; make_plan and make_basket also save the plan so its link works for 7 days.
From a plan to a signed buy
→ make_plan { "symbols": ["NVDAc"], "budgetUsd": 100 }
← { "plan": { "legs": [ { "symbol": "NVDAc", "verdict": "buy",
"usd": 100, "costBp": 3.4, "gapBp": -2.2 } ] },
"planUrl": "https://afterbook.app/plan/…" }- Your agent calls make_plan. Afterbook's code decides each verdict and size; nothing comes from a model.
- It passes planUrl to the person, in chat or anywhere.
- The person opens it on Afterbook. The checks run again on live prices, and only what still passes is offered, never more than the plan showed.
- They connect their own wallet and sign. With Base Account the approval and the swap are one signature, tried on Base first.
The same plans come from the Telegram bot: send /plan NVDA 100 to @afterbook_bot ↗.
Pay per call, x402
For agents that pay their own way: USDC on Base per call over x402 ↗, no key.
| Route | Price | What |
|---|---|---|
/api/v1/x402/plan | $0.05 | make_plan with Claude’s plain explanation of the checked plan, plus planUrl |
/api/v1/x402/basket | $0.05 | make_basket, explained, plus buyUrl |
/api/v1/x402/loan-health | $0.02 | check_loan_health, for agents that already pay over x402 |
/api/v1/x402/history | $0.05 | 30 days of gap history plus the pool’s liquidity |
/api/v1/x402/lp-range | $0.05 | A liquidity range sized from realized volatility |
/api/v1/x402/liquidation-capacity | $0.05 | A stock’s borrow markets, the onchain-vs-oracle gap and the largest liquidation its pool can absorb |
/api/v1/x402/tape | $0.02 | get_tape, without an API key |
/api/v1/x402/quote | $0.02 | get_quote, without an API key |
/api/v1/x402/execute-link | $0.02 | A link to the stock’s own page on Afterbook to buy it |
What an agent can't do
- Sign, send or approve anything: every link ends with a person signing in their own wallet.
- Pick amounts past the checks: the code caps every buy at $25,000, 10% of the pool and your cost limit.
- Put its own numbers in a link: a link carries only what the code decided, and the page checks it again.
- Trade for US persons: buying is off in the US and its territories.