A child writes 3x = 25 for 3x + 5 = 20. Show Alexa the page, and Show Your Work boxes the exact line where the answer changes, with a counterexample you can check by hand and a certificate anyone can replay. (A simulated Alexa+ display, not an Amazon product.)

Try it

  • Web demo, no install: https://akari-h-111.github.io/algebraic-constraint-compiler/ — the page is a real MCP client of our public server (initialize, tools/list, tools/call over Streamable HTTP, protocol 2025-11-25), and your browser then replays each certificate with the independent Python verifier (Pyodide). Guided requests; no AI runs in the web demo.
  • In Claude Code or any MCP host: claude mcp add --transport http show-your-work https://show-your-work-mcp.onrender.com/mcp, then ask whether Maya's work is right. (Free instance: the first request can take about 50 seconds.)
  • With voice, camera and a live AI agent: run the simulator locally with a Gemini or Claude key (two commands in the README).
  • Source (MIT): https://github.com/Akari-H-111/algebraic-constraint-compiler · open-source spin-off: https://github.com/Akari-H-111/mcp-apps-preview

Inspiration

Just over half of U.S. teens have used AI chatbots for schoolwork, and about four in ten have used them to solve math problems; parents underestimate how often (Pew Research Center, Feb 2026; 1,458 teens and parents surveyed Sept–Oct 2025). Language models are fluent, not exact: in Apple's GSM-Symbolic study, accuracy fell when only the numbers changed, and by up to 65% when one irrelevant clause was added.

Picture the kitchen at 8 pm. Maya's algebra is on the counter, and her dad wants to know one thing: is it right? An assistant sounds equally sure either way, and nothing in its answer tells him whether to believe it. He won't type equations into anything. He'll hold up the page. We wanted Alexa+ to look at it, show its work, and prove it.

What it does

Show Your Work is an Alexa+ skill built as a self-hosted MCP server (Streamable HTTP, MCP 2025-11-25), plus a simulated Alexa+ smart display that acts as its host.

  • Show Alexa the page. Snap a photo of the homework. The AI model's only job is reading: each line, exactly as the child wrote it, and where it sits on the page. The MCP server checks every step with exact fractions and finds the first line that changes the answer: x = 5 works on line one but gives 15 ≠ 25 on line two. The display boxes that line in red on the photo, ticks the lines that follow, and gives a hint that is labelled as a guess. The answer is revealed only if someone asks.
  • "Not sure" is an answer. A line the reader flags as unclear ("is that a 5 or an S?") is boxed in amber and held for review: nothing is concluded about it, Alexa asks, and every other step is still certified.
  • Word problems that can't happen. Adult tickets $12, child tickets $7, 20 tickets for $300: the only exact solution is −12 child tickets, so the worksheet has a typo. A certified "no", with a two-line proof.
  • Checks, solves, practises, remembers. It checks a proposed answer by substitution and uniqueness, solves systems exactly (one answer, a complete infinite family, or "no solution" with a 0 = c contradiction), makes practice problems whose answer keys were verified before anyone sees them, and keeps a family notebook that re-verifies every saved certificate before counting it.
  • An interactive certificate card (MCP Apps). Every result renders as an MCP App with the reading to check, the proof, and live buttons: Replay verifier re-checks the proof through the server, and Try a forgery changes one number, recomputes the SHA-256, and shows that the verifier still rejects it.
  • Works beyond our display. Because it is standard MCP, the same public server answers our web page (a browser MCP client) and Claude Code; in our test run Claude Code called check_work and reported the same certified mistake.

The trust boundary is visible on purpose. Reading the page or the words is the only AI step, and the screen shows that reading back ("What I understood — please check"). Everything after it is exact rational arithmetic, replayed by a verifier that never trusts the compiler. Swap the model and the math can't change, because the model never calculates.

How we built it

  • Exact compiler (Python standard library). A small, safe reader for linear equations (numbers, exact decimals, unknowns, + − × ÷ ( ) =; no eval, no floats). Elimination over Fraction tracks row operations, so every conclusion carries a witness: the combination that isolates each unknown, a combination that leaves 0 = c, a point that satisfies one line but not the next, or the new equations written as exact combinations of the old ones.
  • Independent verifier. It never imports the producer, never sees its matrix and never runs elimination. It re-reads each equation by plugging numbers into its own evaluator and checks every witness with multiplication and addition. Certificates bind the canonical input SHA-256, scope, backend and version, so a certificate from the public server replays on any machine, including inside your browser.
  • MCP server. MCP Python SDK 1.30.0 (FastMCP) over Streamable HTTP and stdio: 9 model-visible tools, 1 app-only tool (_meta.ui.visibility: ["app"]), 4 prompts, and a ui:// resource served as text/html;profile=mcp-app. Results carry concise text for the model plus structuredContent for the card. Deployed from the repo's Dockerfile to a public endpoint.
  • Photo reading. The host validates the image (type, size, dimensions, SHA-256) and sends it to the model as a multimodal message with strict rules: copy lines exactly (never fix a child's mistake), give each line a box on a 0–1000 scale, flag doubtful symbols instead of choosing. The boxes travel in check_work's provenance, are bound into the certificate input digest, and come back as view.focus for the display to highlight. Gemini is wired live; Claude and Amazon Bedrock (Nova) image paths are implemented and unit-tested.
  • Simulated Alexa+ host. A standard-library web server with a hand-written MCP client and a real agent loop: the model picks tools and the host calls them over MCP. Gemini ran live for the demo; Claude (official SDK) and Bedrock are implemented but were not run against the live APIs. Speech recognition is the browser's; spoken replies use Gemini TTS (pre-recorded clips of the exact wording on the web, live synthesis locally, the browser's voice as a labelled fallback). The host implements the MCP Apps host side, including the cross-origin sandbox proxy, CSP injection, app-only tool enforcement and fixed container sizing for a smart display. A "Behind the screen" timeline shows every model turn, photo, reading and tools/call with timings and verification status.
  • The web demo as an MCP client. A ~120-line browser MCP client calls the Render-hosted server from GitHub Pages; Pyodide loads the same Python verifier so the browser replays each certificate itself, and refuses to speak an answer if its replay disagrees. If the free server is still waking, the page runs the same engine locally and says so.
  • Testing. 115 automated tests: real HTTP MCP, the browser MCP client against a live local server, adversarial forgeries for every claim type, 250 random systems cross-checked against brute force, verifier-independence checks, corrupted notebook rows, photo validation and provider image formatting, and the simulator's scenarios and agent loop. A no-dependency Chrome DevTools script drives the UI for visual QA and records the demo.

Challenges we ran into

  • Readers guess. Gemini 2.5 Flash read a deliberately ambiguous "3x = 1S" as "3x = 15" without flagging it, three times out of three, and its boxes drift between runs. So the reading is always shown back next to the boxed photo, and nothing the model reads is ever treated as proof.
  • Keeping "no" honest. "No solution", "no valid answer in the domain", "your step 2 is wrong", "that's nonlinear, I can't certify it", "I can't read that line yet" and "the server failed" are six different things, and they stay six distinct statuses all the way to the voice reply.
  • Pedagogy versus proof. A kid needs a hint, not the answer. The broken step is certified; the kind of slip is a rule-based guess, labelled that way.
  • MCP Apps on a smart display. Web hosts must wrap views in a cross-origin sandbox proxy. We implemented one and hit real sizing and painting behaviour in hidden panes; a fixed-height container, which the spec allows, turned out to be the right design for a display.
  • Free tiers. Busy models return 503s and cap daily requests, and the free server sleeps. The host retries and falls back without ever letting a model failure look like math, and the web page falls back to the in-browser engine while the server wakes.

Accomplishments that we're proud of

  • A photo goes in, and a red box on the exact wrong line comes out, backed by a certificate the browser itself replays.
  • A certified negative answer is a finding: "this worksheet has a typo", with a two-line proof.
  • A forged certificate with a freshly recomputed hash is still rejected, live, from a button inside the card.
  • One server, three kinds of clients: a simulated Alexa+ display, a plain web page, and Claude Code.
  • We released the MCP Apps host tooling as its own open-source project: mcp-apps-preview lints any server against SEP-1865 and previews its views locally. Show Your Work passes it with 0 errors and 0 warnings.

What we learned

Exactness is a product feature only when people can see it. The design moves that mattered were drawing the result on the child's own page, showing the reading back, and putting the proof on the screen. A bigger model would not have done that.

What's next

  • Quadratics with exact surd certificates, and inequalities (Farkas witnesses for "you can't meet this budget").
  • Teacher mode: a photo of a whole worksheet, each problem with its own certificate.
  • A reader that proposes alternative readings per line, so disagreement becomes a review flag.
  • Alexa+ account-linked notebooks for families once a public path to attach self-hosted MCP servers exists.

Simulated Alexa+ experience built for the Amazon Developer Hackathon. Not an Amazon product.

Built With

Share this project:

Updates

Submission history