Before writing code, first explore the project structure, then invoke the chatgpt-app-builder skill for documentation.
Hackathon project from Claude Code London Hack Night 03 (20 Feb 2026). This MCP App teaches concepts with an adaptive visual loop inside the assistant.
The app should feel like a live tutor:
- Explain a concept with an interactive diagram or mind map
- Let the user click nodes to drill deeper
- Check understanding with a quiz or fill-in-the-blank exercise
- Adapt the next explanation based on the result
Pitch: "Lumo turns any concept into a live, visual, adaptive lesson in-chat."
Core loop: Explore -> Interact -> Drill -> Check -> Adapt -> Suggest
- Explore: model calls
lumo-sketchorlumo-map - Interact: user clicks a node or branch
- Drill: widget sends follow-up prompt, model deepens explanation
- Check: model calls
lumo-quiz(recognition) orlumo-recall(recall) - Adapt: correct answer advances; wrong answer re-explains differently
- Suggest: model offers adjacent topics
Bloom's taxonomy guides tool selection: Remember/Understand → diagram/mindmap/quiz; Apply/Analyse → fill-in-blank.
No fixed endpoint; session ends naturally when the user stops engaging.
lumo-sketch(server tool + widget)- Interactive Mermaid.js diagram with clickable nodes (dagre layout)
- Supports flowchart, sequenceDiagram, stateDiagram-v2, classDiagram
nodeDescriptionsmap for drill-down context- Includes optional
stepInfo(current/total)
lumo-map(server tool + widget)- Zoomable, pannable Markmap mind map from Markdown headings
- Click any branch to explore that subtopic via follow-up
- Use for concept landscapes/hierarchies (no clear directional flow)
lumo-quiz(server tool + widget)- Multiple-choice quiz (2-4 options) — tests recognition (Bloom's Remember/Understand)
- Uses
correctId,explanation,topic - Sends delayed follow-up message after answer
lumo-recall(server tool + widget)- Fill-in-the-blank active recall — tests retrieval (Bloom's Apply/Analyse)
{{BLANK_ID}}placeholders in prompt, per-blank hints and answers- Correct turns green and locks; wrong shows hint; all correct reveals explanation + follow-up
- Structured data contract: LLM outputs structured text (Mermaid syntax, Markdown headings,
{{BLANK_ID}}templates); widgets handle all rendering. Never ask the LLM to output visual layout directly. - Server is a typed pass-through: validate with Zod, return
structuredContentplus text fallback. - Widgets are topic-agnostic primitives; the model decides when/how to use them.
useSendFollowUpMessage+useWidgetStatecreate the dual-surface sync (user action -> model response -> next widget).useWidgetStatereads/writes viaopenai.widgetState.modelContent(AppsSdkAdaptor). Default state only applies whenmodelContentis null.- Tool descriptions embed Bloom's taxonomy and learning spiral phases to guide LLM tool selection.
server/src/index.ts- MCP server, widget registration, fallback textserver/src/schemas.ts- Zod input contracts (diagram, mindmap, quiz, fill-blank)web/src/helpers.ts- typed Skybridge helpersweb/src/widgets/lumo-sketch.tsx- Mermaid.js diagram + drill-down follow-upsweb/src/widgets/lumo-map.tsx- Markmap mind map + branch click follow-upsweb/src/widgets/lumo-quiz.tsx- multiple-choice quiz + adaptive follow-upsweb/src/widgets/lumo-recall.tsx- fill-in-the-blank active recall widgetweb/src/index.css- shared visual theme and widget styles
Use the mcp-apps skill (.agents/skills/mcp-apps/) for MCP App decisions (resources, tool linkage, widget messaging, CSP, theming). Reference files:
SKILL.md- core patterns and decisionsreferences/spec.md- protocol details and type shapesreferences/examples.md- runnable examples
Use the chatgpt-app-builder skill for broader ChatGPT app workflow (architecture, local run, deploy, publish).
Only fetch full SEP-1865 spec if the skills do not cover the needed detail: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx
- Start locally:
npm run dev - Run tests:
npm test - Type check:
npx tsc --noEmit(run alongside tests — devtools may surface TS errors tests don't catch) - Build:
npm run build - Verify all widgets in devtools:
- Diagram: Mermaid flowchart renders with proper layout; node click sends follow-up; light/dark theme re-renders correctly
- Mind map: Markdown headings render as zoomable tree; pan/zoom works; branch click drills down
- Quiz: correct/wrong paths work; follow-up fires once after 1.5s
- Fill-in-blank: inputs render inline; correct turns green and locks; wrong shows hint; all correct reveals explanation + follow-up after 1.5s
- Text fallback remains useful for non-UI hosts (Mermaid in fenced code block; Markdown as-is; fill-blank with answers listed)