/api/mcp (Streamable HTTP, stateless) with personal tokens made on Connect
your AI (stored as a hash, shown once, revocable; migration 0033). Each call
runs as the token's user in their own session, so RLS applies; AI switched
off in Settings refuses.
Summary only, like every cloud path: the existing summary tools, plus tools
that change things through placeholders and answer with counts: list
categories and rules, create rule, delete rule (with undo), recategorize,
find transfers, merge accounts (preview first).
Rule past-matching and merging moved to shared libraries (lib/rule-past.ts,
lib/merge-run.ts) so the app and the tools run the same code.
Tested with the official MCP client: bad token refused, tools listed, and the
'ing' rule found, undone and replaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>