Inspiration

Hospital bills are one of those documents people know they should review, but almost nobody actually checks line by line. The statements are dense, the codes are confusing, and most people either pay the full amount or paste the bill into a chatbot and get back a paragraph they still cannot act on.

I wanted to build something more practical: a shared review surface where a person and an AI agent can look at the same live bill together before any payment is made.

That became Hold the Bill.

What it does

Hold the Bill is a WebMCP app for reviewing itemized hospital bills before payment.

The app loads a statement, lets each line be marked as Unseen, OK, Question, or Dispute, and blocks the final hold step until every line has been reviewed.

It also runs deterministic billing-shape checks for:

  • duplicate charges
  • charges after discharge
  • miscellaneous unexplained items
  • wrong-patient tests
  • facility + physician informational pairing

Once every line has been checked, the user can Lock hold. That freezes the review, calculates how much should not be paid yet, and generates a ready-to-use call script for the billing office.

Why WebMCP

This use case is a strong fit for WebMCP because the problem is not just “give me advice.” The real problem is tying that advice to the exact line items on the page the user is about to pay.

Without WebMCP, an agent would return a paragraph in chat and the user would still have to map that advice back to the bill manually.

With WebMCP, the website exposes structured tools directly from the page. The agent can:

  • read the current statement
  • review the bill
  • explain specific lines
  • mark lines
  • lock or unlock the hold
  • import pasted bill text

That means the human and the agent operate on the same live state, not in separate places.

How we built it

I built Hold the Bill as a client-side React + TypeScript app with Vite.

The app uses a shared local store for both the UI and the WebMCP tools, so actions taken by a person or an agent update the same statement immediately.

WebMCP is implemented with document.modelContext.registerTool(...) on the top-level page. Each tool calls the same internal store logic as the visible buttons in the interface.

I included:

  • the default City Ridge sample statement for judge demos
  • a PDF / paste import path for text-based statements
  • browser-only PDF text extraction using pdfjs-dist
  • a hold pack generator and call script
  • activity logging for human and agent actions

There is no backend and no OCR pipeline in this version. For the hackathon, I intentionally kept the upload path focused on digital PDFs and pasted text instead of trying to support low-quality phone photos.

Challenges we ran into

The biggest product challenge was keeping the app useful without pretending to be a hospital billing system or a medical truth engine.

I narrowed the scope to billing-shape checks instead of broad medical correctness. That made the behavior explainable and demo-friendly.

Another challenge was the import flow. Full OCR for arbitrary bill photos would have added complexity, model downloads, and unreliable results, so I avoided that and built a safer import path for text-layer PDFs and pasted statement text.

On the WebMCP side, the main challenge was making the tools feel like a natural extension of the UI, not a second product. The solution was to keep the human path and the agent path backed by the exact same store and review logic.

What I learned

I learned that WebMCP is most powerful when the agent is not replacing the interface, but joining the user inside it.

This project made that very concrete: the value is not an AI summary by itself, but the combination of:

  • agent speed
  • shared page state
  • visible line-by-line decisions
  • a final human-controlled lock step

That pattern feels useful well beyond this project.

What's next

Next, I would improve parsing, support more statement formats, and make the hold pack easier to export or send. I would also explore stronger rules and a safer path for authenticated patient portals.

But for the hackathon, the core idea is already here: do not pay a confusing hospital bill until every line has been seen.

Built With

Share this project:

Updates