💡 Inspiration
Students spend hundreds of hours passively re-reading notes or textbooks—proven to be one of the least effective methods for long-term retention. Active recall and spaced repetition (such as the SuperMemo-2 algorithm) are scientifically proven to be exponentially more effective.
However, traditional flashcard and quiz apps suffer from a major limitation: they require a screen and a keyboard. Students cannot review while cooking, commuting, folding laundry, or taking a walk. Furthermore, traditional flashcards only test rigid, memorized answers—they cannot conduct an adaptive oral viva exam that probes conceptual depth with follow-up questions.
We built StudyMate (StudyBuddy) to solve this: a voice-first, hands-free study partner powered by the Model Context Protocol (MCP) and Alexa+ with a lifelong memory of what you know and what you forget.
🚀 What It Does
StudyMate acts as a self-hosted MCP server providing two voice-first learning modes sharing a unified memory graph:
- Spaced Repetition Flashcards: Fast spoken active recall powered by the SuperMemo-2 (SM-2) algorithm. It schedules reviews based on recall quality ($q \in [0, 5]$) and interval progression ($I_n = I_{n-1} \times EF$).
- VivaMate Oral Exam Simulator: Adaptive viva examinations where Alexa+ asks open-ended conceptual questions, dynamically scales difficulty (Beginner $\leftrightarrow$ Intermediate $\leftrightarrow$ Advanced), probes with targeted follow-ups when understanding is partial (4–7/10), and schedules targeted revisions for weak concepts.
- Unified Memory Graph: Weak concepts uncovered during oral viva exams automatically adjust flashcard scheduling priority, and vice-versa.
- Diagnostic Revision Planner: Consolidates due flashcards and scheduled topic revisions into a single spoken forecast when asking "What is my revision plan?"
- Interactive Web Voice Simulator & Live MCP Inspector: A built-in web client (
/simulator/) with continuous Web Speech STT/TTS, hands-free auto-listening, and real-time inspector telemetry logging every MCP tool call over Streamable HTTP.
🛠️ How We Built It
- Core & Server: Python 3.11+ using the official
mcpSDK (MCPServer/ Streamable HTTP transport). - Transport Protocol: Streamable HTTP at
/mcpadhering to the latest MCP specification (2025-11-25+/2026-07-28) with session management and CORS support. - Spaced Repetition Engine: Custom implementation of the SuperMemo-2 (SM-2) algorithm with ease factor floor limits ($EF \ge 1.3$) and lapse management.
- Dual Grading Engine: Conversational semantic token matching via
rapidfuzz(handling filler words and voice variance) with optional server-side AWS Bedrock Converse API evaluation using Claude 3.5 Haiku / Amazon Nova. - Database & Persistence: SQLite with relational tables for
cards,reviews,viva_sessions,viva_answers,weak_topics, andrevisions. - Testing & Quality Assurance: 30 comprehensive automated
pytestunit tests covering SM-2 mathematics, grading logic, viva difficulty transitions, follow-up triggers, and API routes. - Packaging: Production Dockerfile and Procfile ready for cloud deployment.
⚡ Challenges We Ran Into
- Handling Conversational Spoken Answers: In oral exams, students say things like "Well, basically it is force equals mass times acceleration". Strict string equality or plain Levenshtein distance heavily penalized correct answers due to conversational fillers. We solved this by implementing
rapidfuzz.fuzz.token_set_ratiowith regex normalization, awarding full credit for key semantic token matches. - Continuous Speech Recognition Buffering: In the browser simulator, Web Speech API initially fired premature results on brief pauses between words. We implemented continuous full-sentence buffering with a 1.3-second silence debounce timer, ensuring complete spoken thoughts are captured cleanly.
- Dynamic MCP SDK Evolution: Migrating from legacy FastMCP patterns to the official
MCPServerStreamable HTTP specification required updating lifecycle handlers and ensuring smooth session management across asynchronous requests.
🏆 Accomplishments That We're Proud Of
- Real Spoken Adaptive Viva: Alexa+ doesn't just grade right/wrong—she probes deeper with follow-up questions when a student shows partial grasp, mimicking a real professor.
- Unified Memory: Bridging flashcard intervals and oral exam weakness tracking into one coherent SQLite database.
- 100% Test Coverage on Core Logic: 30 unit tests passing with zero failures.
- Interactive Live Inspector: Visualizing real-time MCP tool invocations with millisecond latency telemetry directly in the browser simulator.
📚 What We Learned
- The power and simplicity of the Model Context Protocol (MCP) for decoupling voice agent logic from backend tools.
- How to combine structured deterministic algorithms (SM-2) with generative LLM evaluators (AWS Bedrock) for the optimal balance of speed, cost, and pedagogical rigor.
🔮 What's Next for StudyMate
- Audio Diagram & Graph Explanations: Adding multi-modal diagram questions for Alexa Show devices.
- Multi-Subject Syllabus Import: One-click import of Anki decks (
.apkg) and PDF lecture notes directly into StudyMate decks. - Collaborative Group Viva: Multi-student study sessions where Alexa quizzes study groups round-robin style.
📝 Product Feedback (MCP & AWS Bedrock)
MCP Python SDK
- Tool:
mcpPython SDK (v2.3.0) - What worked well: The
@mcp.tool()registration is clean, intuitive, and handles JSON schema generation effortlessly. Streamable HTTP handles session management out of the box. - What could improve: Transitional aliases with deprecation warnings for renamed imports (e.g.,
from mcp.server.fastmcp import FastMCP) would make upgrading legacy examples smoother. - Verdict: Highly recommended; standardizing voice AI tools via MCP makes agent development significantly cleaner.
AWS Bedrock Converse API (AWS Builder Challenge)
- Tool: AWS Bedrock Runtime Converse API
- What worked well: The unified Converse API is much more consistent across foundation models than legacy invoke APIs, producing structured rubric evaluations with sub-second latency.
- What could improve: Standardizing JSON schema enforcement mode across all model families in Converse API to avoid regex parsing fallbacks.
Built With
- alexa
- amazon-web-services
- aws-bedrock
- docker
- edtech
- fastapi
- mcp
- model-context-protocol
- pytest
- python
- spaced-repetition
- sqlite
- starlette
- supermemo-2
- uvicorn
- voice-ai
- web-speech-api
Log in or sign up for Devpost to join the conversation.