Once Upon YOUR Child MCP server
Enables Amazon Alexa+ to act as a voice host for Once Upon YOUR Child, exposing tools for listing heroes, starting interactive adventures, continuing chosen paths, generating bedtime stories, and narrating audio so Alexa+ can tell personalized, age-calibrated stories by voice.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Once Upon YOUR Child MCP servertell Maya a bedtime story; she's nervous about her swim test"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Once Upon YOUR Child — MCP server for Alexa+
Demo video (3 min): https://youtu.be/jCIvdz7ySrQ — the deployed server driving a simulated Alexa+ page, entered as Once Upon a Voice in the Build, Ship, Shape hackathon.
A self-hosted Model Context Protocol server that lets a voice agent such as Alexa+ tell personalized, feelings-aware bedtime stories from Once Upon YOUR Child.
The child already has heroes in the app: a name, an age, a comfort item, buddies, fears and strengths. This server exposes those heroes and the app's story engine as MCP tools, so a parent can say:
"Alexa, tell Maya a bedtime story. She's worried about her first swim lesson."
and get a choose-your-own-path story about her hero, calibrated to her age, with choices she answers by voice.
Built for the Alexa+ track of the Amazon Build, Ship, Shape hackathon (2026).
Tools
Tool | What it does |
| The family's saved heroes, so the agent can ask "which hero tonight?" |
| Opens a Pick-a-Path story for a hero. Returns speech plus choices phrased for the hero's age. |
| Continues with what the child said: "two", "the cave", "the last one", or their own idea. |
| A complete wind-down story sized to N minutes, with the hero's buddies along. |
| MP3 narration in the app's child-safe storyteller voices, for hosts that play audio. |
| Available narration voices. |
One prompt, bedtime, gives a host a ready-made opening.
Every tool returns text meant to be read aloud verbatim. Alexa+ is the narrator; the app is the author.
Related MCP server: Spoken Letter for Alexa+ MCP Server
Written for the child's age
The app groups children into bands (Sprout ≤5, Explorer 6–8, Adventurer 9–12, Creator 13–14) and the backend writes each scene for that band: sentence length, vocabulary, story depth and number of choices. This server adapts the spoken frame to match:
Band | Choices asked as | Default path | Ending |
Sprout | "Theo, which one? Follow the light, or call softly to it?" (no numbers) | short, 4 scenes | "The end. Sweet dreams, Theo." |
Explorer | "What should happen next? One: … Two: … Or tell me your own idea." | medium, 6 scenes | "The end. Sweet dreams, Maya." |
Adventurer | numbered, up to three choices, "Or say your own idea." | medium, 7 scenes | "The end. Goodnight, Zara." |
Creator | numbered, up to three or four choices | medium, 8 scenes | "The end." |
Long choice texts are trimmed to their first clause for the ear (the full text stays in structuredContent), and the model's own trailing nudges ("What will you do next?", a restatement of the choices) are stripped so a child hears the question once. Errors are spoken too: a quota hit becomes "Maya's storybook is resting for tonight."
Run it
cp .env.example .env
npx tsx scripts/setup-parent.ts # creates a parent account + one hero; paste the printed ids into .env
npm install
npm run dev # http://0.0.0.0:3333/mcp (Streamable HTTP, spec 2025-11-25)
npm run smoke # in a second terminal: lists tools over HTTP
npm run check:voice # offline checks of the read-aloud helpers
npx tsx scripts/personas.ts # live: one hero per age band through the server (costs model calls)Production: npm run build && npm start. Railway and similar hosts set PORT.
Deploying on Railway (railway.json sets the build, start command and /healthz health check):
New project from this GitHub repo.
Variables:
MCP_SHARED_SECRET(required; the server exits without it),OUYC_CLIENT_ID(so it can sign itself back in), optionallyOUYC_REFRESH_TOKENandOUYC_DEFAULT_VOICE_ID. LeavePORTandHOSTunset: Railway supplies the port, and the default0.0.0.0bind is what lets requests with the public hostname through (binding to127.0.0.1turns on the SDK's localhost-only Host check and every public request gets a 403).Generate a public domain, then check
https://<domain>/healthz, and openhttps://<domain>/for the simulated Alexa+ page with the same secret.
The simulated Alexa+ page
With the server running, open http://localhost:3333/ (served from web/index.html, one static file, no build). It is a browser-side MCP client: it sends initialize, tools/list and tools/call to the same POST /mcp a voice host would, and plays the part of Alexa+ with a small rule-based router (who the hero is, adventure or bedtime, theme, feeling). It asks once for the demo key (MCP_SHARED_SECRET; leave blank if the server has none) and keeps it in sessionStorage.
Voice in uses the Web Speech API, so speech recognition needs Chrome or Edge on https:// or localhost; the text box always works. Voice out uses the narrate tool (the app's storyteller voices, MP3) with the browser's own voice as a fallback and a checkbox to prefer it. Every MCP call shows up in the transcript with its timing so a judge can see the protocol at work.
Locking the endpoint: set MCP_SHARED_SECRET and every POST /mcp must carry Authorization: Bearer <that secret>; anything else gets a 401. It is optional on your own machine, but the server refuses to start without it on Railway (or with NODE_ENV=production), because whoever reaches an open endpoint becomes the demo parent. The check scripts read the same variable from .env and send the header themselves. GET /healthz stays public.
Hosts whose connector setup takes only a URL (no custom headers), such as the free tier of the Claude app, can use https://<host>/mcp/<MCP_SHARED_SECRET> instead; it is the same endpoint with the secret as the last path segment. A URL is easier to leak than a header (it can show up in proxy logs, history and screenshots), so treat that URL as the secret itself and rotate MCP_SHARED_SECRET after the demo.
Auth to the app: backend access tokens live about an hour, so the server keeps itself signed in with the refresh token and, failing that, re-mints the anonymous session by OUYC_CLIENT_ID. Set the client id and the server survives restarts and token expiry on its own.
How it talks to the app
Alexa+ ──MCP (Streamable HTTP)──▶ this server ──HTTPS──▶ Once Upon YOUR Child backend
/get-characters
/generate-interactive-story
/continue-interactive-story
/generate-story (bedtime_mode)
/tts/synthesizeThe server carries a bearer token for one parent account. It never bypasses the backend's gates:
Story and narration routes sit behind the app's parental-consent check.
Age calibration is enforced server-side from the hero's verified age.
Free-text choices ("something else") are wrapped as story input, never as instructions.
Voice-only mode:
include_images: false, so no illustration is generated that nobody will see.Bedtime (linear) stories count against the account's quota (free tier: 3 a day, 5 a month). Adventures may count too; check the app's current quota rules.
Safety notes for a kids' voice experience
The child's name and feelings are sent only to the app's own backend, which already handles them under its privacy policy.
The premium ElevenLabs voice is hard-gated off for under-13 accounts by the backend, regardless of what this server asks for.
The server keeps only an in-memory map of open story choices; no story content is stored here.
Status
2026-09-24: scaffolded; tool surface and transport verified against the MCP SDK (protocol 2025-11-25).
2026-09-25: full loop verified live against the production backend through the MCP server:
list_heroes, a three-scenestart_adventure/choose_pathrun answered with "two" and "the first one", atell_bedtime_story, andnarratereturning an MP3 audio block. Seescripts/live.ts.2026-09-25: age-band walkthrough (
scripts/personas.ts) with heroes aged 4, 6, 10 and 13. Added age-aware choice phrasing, clause-trimmed labels, echo/nudge stripping, spoken errors, refresh-token auth, and hero details on bedtime stories.2026-09-26 to 2026-10-06: shared secret on
POST /mcpand the header-less/mcp/<secret>form, Railway config with/healthz, the simulated Alexa+ page (web/index.html) with voice in and out, quota-vs-rate-limit speech, and a rate-limit stall no longer losing the open story.
Demo account setup is in scripts/setup-parent.ts (anonymous session, adult declared age, one hero).
License
MIT, for the code in this repository. The licence does not cover the Once Upon YOUR Child name, logo, or backend service, which are separate: this server is a client of that service and needs an account with it.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI story generator — create illustrated storybooks, AI songs, and short AI video films
AI story generator — create illustrated storybooks, AI songs, and short AI video films
Create and read private AI-illustrated storybooks with your PictureBooks account and credits.
Personalized hypnosis sessions and multi-day journeys, a free session library, and audio rendering.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceEnables AI integration with the Echoes storytelling platform, providing narrative knowledge graph extraction, semantic search, and arc isolation.83 npmMIT- AlicenseNot gradedqualityAmaintenanceMCP server that exposes recorded family stories as read-only tools, enabling Alexa+ to retrieve and deliver voice stories to children through natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Alexa+ voice agents to control smart home devices, generate daily briefings, orchestrate routines, and query user context through tools backed by AWS Bedrock.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables voice-driven morning check-ins for older adults living alone through Alexa+, capturing sleep, mood and pain, logging medication doses and appointments, and answering medication questions from official FDA labels. Keeps family members informed with household status updates and automatic alerts when a check-in or dose is missed.5 npmMIT