./ Case study
Alpha / MVP product — not a finished product; the agent and MCP server are built and tested.
SmartPockets
Personal finance platform with a streaming Claude agent that acts on live Plaid data behind a propose / confirm / execute / undo write-safety machine.
01Problem
Most personal finance apps stop at read-only dashboards; an assistant that can actually change your data is risky, because an LLM that writes directly to financial records can act on a hallucination. SmartPockets needed an agent that operates over real Plaid-synced data and can take actions — without ever letting a model commit an irreversible write unsupervised.
02What I built
A streaming Claude agent on a custom Convex runtime: Sonnet drives the conversation while Haiku handles context compaction and classification. A Zod-typed tool registry exposes the account, transaction, and card data behind read tools plus guarded write tools, and every mutation runs through a propose / confirm / execute / undo state machine with a 10-minute undo window, content-hash dedup, idempotent confirms, and an audit log. A standalone OAuth-2.1 MCP server exposes read-only tools to external clients. Plaid sync, Clerk auth, and React Email + Resend round out the stack.
03Highlights
- 01
Streaming agent on a custom Convex runtime via the Vercel AI SDK (streamText with a bounded step count and per-thread cancellation): Claude Sonnet drives, Claude Haiku handles compaction and classification
- 02
Zod-typed tool registry over live Plaid data — read tools for accounts, transactions, and cards, plus write tools gated by the safety machine
- 03
Propose / confirm / execute / undo write-safety machine: 10-minute undo window, content-hash dedup, idempotent confirms, and an audit log so no model write is irreversible or unsupervised
- 04
Standalone OAuth-2.1 MCP server (mcp-handler, dynamic client registration via Clerk) exposing read-only tools to external MCP clients over a Convex bridge
- 05
Plaid Link + transaction sync via Convex actions; Clerk auth; React Email + Resend transactional email; tested with a Vitest agent suite
04Outcomes
- Live and open source at smartpockets.com — an alpha / MVP, intentionally not presented as a finished product.
- The agent runs against live Plaid-synced data through a Zod-typed tool registry, and every write passes the propose / confirm / execute / undo machine with a 10-minute undo window and an audit log.
- A standalone OAuth-2.1 MCP server exposes read-only tools to external clients, and a Vitest suite covers the agent, the write path, and the tool registry.
05Stack
06Status
Alpha / MVP product — not a finished product; the agent and MCP server are built and tested.
07What this demonstrates
Production-minded AI engineering: a streaming Claude agent over real financial data, a Zod-typed tool registry, a propose / confirm / execute / undo write-safety machine, and a spec-compliant OAuth-2.1 MCP server — built and tested, with honest alpha framing.
08Author's note
The hard part of an agent that can write to financial data is not the model — it is the safety envelope around it. Most of the work went into the propose / confirm / execute / undo machine and the Zod-typed tool registry, so a hallucinated tool call can never become an irreversible, unsupervised write.
6 min read