Inspiration
Most purchase fraud isn't clever. The same bill gets paid twice, an order is split into three so nobody senior has to sign it, someone approves their own request at 5 AM on a Sunday. Detectors can find these, but their output is a spreadsheet of scores that the person responsible for the money never opens. I wanted the answer to be one question away: "Alexa, anything suspicious this quarter?"
What it does
Books.check lets you ask Alexa about your purchase orders and hear which ones look wrong and why.
- "Anything suspicious this year?" Alexa says how many orders were flagged and how much money is at risk, and names the top three.
- "Why was order 293 flagged?" Alexa explains the evidence ("the same order was billed twice, and $23,915 was paid more than once") and suggests a next step ("ask Vendor E for a refund or credit note for the second payment").
- "Give me a summary of last quarter." Spend, flags by type, money at risk.
- "Mia Patel" or "Vendor H". Find every order a person raised or approved, or every order with a vendor.
On the simulated Echo Show, flagged orders float as holographic coins on a bank teller's counting mat. Drop a coin into the slot on top of the Echo and Alexa answers while a receipt prints out with the order's history, the suspicious steps marked in highlighter. Every flagged order waits in a jar labelled with the count; click it to pour out the next few.
How I built it
- An MCP server (Python, MCP SDK 2) speaking protocol 2025-11-25 over stateless Streamable HTTP. Four read-only tools:
list_anomalies,explain_case,summarise_period,search_orders. Every result carries aspeechfield written to be read aloud unchanged, plus structured data for the screen. - Offline scoring. An Isolation Forest with context features from my earlier benchmark project scores 309 purchase orders once, offline, after the answer key is stripped. Rules then turn each flag into evidence a person can act on: duplicate bills, overbilling, payment without a goods receipt, self-approval, orders split under the approval limit, after-hours activity. The server only filters an in-memory list, so tool calls take about 3 ms.
- A spoken-period parser, so "last quarter", "Q2 2026", "March" and "the last 90 days" all work, and a date shift so "this month" always means something when a judge runs it.
- The Echo Show is a web page that is a real MCP client: plain
fetchsendsinitialize,tools/listandtools/call, and an MCP log drawer shows every message and its round-trip time. The 3D stage is three.js; voice input uses the browser's speech recognition, and answers are spoken by a local neural voice (Piper, LJSpeech) that the server provides. - 50 automated tests, including 40 tool calls over real HTTP held to a 500 ms budget.
Challenges I ran into
- Alexa+ tooling isn't open to entrants, so I couldn't test against the real Alexa+ planner. I built the simulated Echo Show and wrote keyword rules to stand in for Alexa's understanding.
- The 500 ms target. Fitting the detector takes 1.7 seconds, so all scoring moved offline and the server became a fast lookup.
- Making explanations true. An early version told order 238 it was "one of 2" split orders while order 239 said "one of 3". Grouping orders into chains fixed it, and the answer now states the real span ("in 17 days").
- A voice that's allowed in a public repo. Several popular open voices turned out to be research-only or non-commercial; LJSpeech is public domain.
- Honest numbers. The page's own timer made a 17 ms call look like 3.4 seconds while it was busy drawing 3D; the MCP log now reads network timing.
Accomplishments that I'm proud of
- On the benchmark's synthetic data, 45 orders are flagged and 42 of them are real fraud (precision 0.93, recall 0.95), and no answer key ever reaches the server.
- Every tool call answers in milliseconds, far inside the 500 ms target.
- The design: a coin slot, a jar and a printed receipt make an audit tool something people want to play with.
What I learned
- Designing for voice changes the data: every answer needs a sentence you could say out loud, and money at risk has to be counted once, not summed.
- MCP's simplest transport settings (stateless, JSON responses) make a server easier to host and test.
What's next for Books.check
- Connect to a live ERP instead of a benchmark export.
- Let Alexa+ itself call the server once add-on tooling opens up.
- Start with small-business owners and the bookkeepers who help them.
Built With
- alexa-plus
- javascript
- mcp
- mcp-python-sdk
- model-context-protocol
- pandas
- piper-tts
- python
- scikit-learn
- sqlite
- starlette
- three.js
- uvicorn
- web-speech-api
Log in or sign up for Devpost to join the conversation.