
Inspiration
At 3 AM a new parent has a baby in one arm and a bottle in the other. Pediatricians ask parents to track every feed, diaper and fever: newborns feed 8–12 times a day, parents watch for 6+ wet diapers a day, and a 100.4°F temperature under 3 months means calling the doctor right away (American Academy of Pediatrics). Today all of that goes into a phone, typed with one thumb in the dark. Of all the times voice is useful, this is the time it's the only thing that works. About 3.6 million babies are born in the US every year, and none of their parents have a free hand.
What it does
Swaddle is a baby-care service for Alexa+, built as a self-hosted MCP server.
- Log by talking: "She finished on the left, about fifteen minutes." "I topped her up with a bottle." If a detail is missing, Swaddle asks for it mid-call: "How much did Mia drink?"
- What's next: next feed and nap predictions learned from this baby's last week, weighted toward the same time of day, with a "likely between" window and a confidence level.
- Safety thresholds with sources: a temperature is checked against AAP "when to call" guidance for the baby's age. "100.6 degrees is a fever for a baby under 3 months. The American Academy of Pediatrics says to call your pediatrician now, even at night."
- Shift handoff: "Catch me up on the night" leads with what needs action (the flagged fever, the note Sam left after calling the nurse line), then the totals, then what's next. Voice ID records who did what.
- On a screen: the same
care_reporttool renders an MCP App with a 24-hour clock of sleep, feeds and diapers, a week of trends against pediatric guidance, and flags with sources, ready for the checkup. Without a screen it speaks one line.
How I built it
- Python + the official MCP SDK (
mcp2.xMCPServer), served over Streamable HTTP at/mcp, protocol 2025-11-25. - 13 tools, one intent each, with typed
outputSchemas andreadOnly/destructive/idempotentannotations. Every result carries a shortspeechline for voice plus structured content for screens and agents. - Elicitation when a bottle amount is missing, with a graceful spoken follow-up plus a
set_bottle_amounttool for hosts that don't support it. - MCP Apps (
io.modelcontextprotocol/ui):ui://swaddle/report.htmlbound tocare_report, rendered on screens only when the client negotiates the extension. - Prediction engine: weighted quantiles over the baby's own feed intervals and awake windows. Weights combine a circular time-of-day Gaussian kernel (σ = 2.5 h) with a 3-day recency half-life. Sleep predictions blend in an age-based prior that fades as the baby's own data accumulates. Confidence comes from the effective sample size and the spread.
- Guidance module: a small set of AAP thresholds, each with its source URL, so every safety statement can be cited. Count-based flags wait for a full day of logs to avoid false alarms.
- Simulated Alexa+ client: real Alexa+ access isn't available to entrants, so I wrote an SDK-free MCP client in one HTML file. It speaks 2025-11-25 over Streamable HTTP, parses SSE, answers server elicitation requests, hosts MCP Apps in a sandboxed iframe, and shows every JSON-RPC message in a live panel. A small rule-based router stands in for Alexa+'s LLM so it runs offline.
- Tested end to end: pytest launches the real server and drives it with the official MCP client over HTTP, including elicitation. It also works with the official MCP Inspector CLI.
- Reproducible demo video: a script drives the client in Chromium with a frozen demo clock, voices it with Kokoro TTS and assembles it with ffmpeg. Everything on screen is real server output.
Challenges I ran into
- No access to the Alexa+ MCP Toolkit or simulator, so I built a protocol-faithful client to prove the server works the way a host would use it.
- The MCP Python SDK 2.x renamed FastMCP to
MCPServer, so most published samples fail on a freshpip install mcp. - Designing for the ear: the first version's replies took 20+ seconds to speak. I rewrote every response to lead with the action, and moved detail to structured content and the screen.
- Predictions that don't lie: a 3 AM question needs 3 AM data, and a sparse log needs to admit low confidence instead of sounding sure.
Accomplishments I'm proud of
- A complete night-to-morning flow (log, predict, flag, note, hand off, report) in one coherent product, not a list of features.
- Safety statements that are conservative, age-aware and cited every time.
- One server that works as voice only, voice plus screen (MCP App) and agent-to-agent (structured output), from the same tool calls.
What I learned
Voice-first tools need two outputs: one sentence for the ear and a schema for everything else. MCP's structured content, elicitation and Apps map onto those needs well.
What's next
OAuth 2.1 account linking so each household has its own log, Alexa+ routines ("remind me if she hasn't fed in 3.5 hours"), multiple babies (twins), medication timing, and exporting the report to the pediatrician's portal.
Disclaimer
Swaddle is a logging assistant, not medical advice. The demo household and history are generated.
Demo video: https://youtu.be/TPDbhNsB-cg · Code (MIT): https://github.com/ShermaineYap/Swaddle-AmazonDevHack
Log in or sign up for Devpost to join the conversation.