Inspiration
After a clinic visit, a patient goes home with a page of instructions and a family that wants to help but isn't sure how.
Alexa+ can remember that page and set reminders, but it can't show who approved the plan, who can see it, why an alert fired, or what the clinician will be told.
We wanted an assistant that is accountable, not just helpful: every care instruction Alexa says can be traced back to the page it came from.
How We Built It
CareLoop is an MCP add-on for Alexa+: a Python server built with FastAPI, the official MCP SDK, and SQLite, exposing 32 tools over Streamable HTTP.
- Approve, then act. A shared prescription becomes draft items, each citing its source line. Nothing is active until the patient approves it. A model proposes items, but code decides what survives: every number in an item must appear on the page.
$$ \mathrm{nums}(\text{item}) \subseteq \mathrm{nums}(\text{source}) $$
Anything that fails validation is flagged for review, never silently dropped.
Answers with sources. When asked, "What medicine do I take before breakfast?", CareLoop responds: "Omeprazole, 7:30 AM, before breakfast, from line 6." A teach-back then checks in code that the patient understood their plan.
Rules, not guesses. A clinician's rule determines when family members are notified. For example, if the symptom score reaches 7 or higher for 2 consecutive days, CareLoop triggers an alert once per episode.
Privacy by surface. Tools return one short, speakable sentence plus opaque references. Sam's shared Echo Dot hears only: "You have 1 new CareLoop update." His own phone, once unlocked, shows which rule fired and its source line, never the score, and only within the permissions Maya has granted. Maya can revoke his access by voice.
A simulator. Without Alexa+ preview access or an Echo device, we built a browser-based stand-in for Alexa+: two devices, the Alexa app, Sam's phone, local voice processing (Kokoro and Whisper), and a live MCP inspector, all connected to the real CareLoop server.
Challenges
No access to Alexa+. The Alexa AI CLI and Local Inspector required preview credentials, so we had to build our own simulator and clearly distinguish simulated behavior from verified platform behavior.
Models invent things. Planner models fabricated plan text, requested internal IDs from users, and generated their own confirmation questions instead of triggering actual confirmation flows. The server now independently refuses, reads back, or confirms actions rather than trusting the model.
Privacy vs. usability. Hiding every record broke action tools that require IDs. Opaque, position-labelled references resolved this conflict while preserving privacy.
A moving protocol. Mid-call questions (MCP elicitation) work under MCP
2025-11-25but not yet under the stateless2026-07-28revision. We documented this limitation rather than hiding it.
What We Learned
- Test with the real model. A scripted planner passed scenarios that the live model failed. With a hosted model, 70 spoken scenarios executed 3 times each achieved 207/210 successful runs (98.6%).
On our synthetic prescriptions (typed, scanned, photographed, and prompt-injected), document reading achieved 100% recall, with zero invented numbers.
$$ \text{Recall} = \frac{|\text{found} \cap \text{expected}|}{|\text{expected}|} = 100\% $$
- Make the server the authority. Identity, consent, validation, and rules belong in deterministic code backed by tests (423 tests), not in a prompt.
Log in or sign up for Devpost to join the conversation.