Inspiration

Patient portals are traditionally static interfaces where users view past appointments and upload PDF reports without truly understanding them. We wanted to change this by creating a proactive, intelligent agent that bridges the gap between patient data and medical action.

Inspired by the potential of Model Context Protocol (MCP), we built Cura—a Gemini-powered medical agent designed to reason, explain reports, check symptoms, recommend specialists, and directly schedule appointments on behalf of the patient, all while displaying a live, transparent MCP protocol trace.

How We Built It

  • Frontend & Design: We built a high-fidelity patient dashboard using React, TypeScript, and Vite, styled with premium HSL colors, soft glassmorphism, and smooth micro-animations.
  • The Brain (AI): We integrated the official @google/genai SDK to leverage Gemini's advanced reasoning.
  • The Superpowers (MongoDB MCP): We implemented a simulated MongoDB MCP Server interface. When patients converse with Cura, Gemini dynamically plans and invokes MCP tools:
    • mongodb_query_clinical_knowledge: Searches medical guides.
    • mongodb_find_specialist: Locates doctors by symptom/specialty.
    • mongodb_get_medical_history: Accesses patient records.
    • mongodb_book_appointment: Modifies database records to reserve slots.
    • mongodb_log_consultation: Saves chat summaries to the database.
  • Developer Observability: We built an on-screen Live MCP Debugger Console that prints JSON-RPC 2.0 messages (like tools/call and tools/call_result) in real-time.

Challenges We Faced

  1. Asynchronous Function Calling: Coordinating the timing between the user’s chat session, the agent's function calls (such as booking appointments), and updating the dashboard UI in real-time.
  2. Standardizing the Protocol: Designing a frontend console that accurately maps the standard JSON-RPC Model Context Protocol specification for educational and presentation value.

What We Learned

  • How to structure complex multi-step agent plans using Gemini's native tool calling.
  • How MCP standardizes LLM-to-database connections, making it incredibly simple to port database tools between different LLM runtimes.

What's Next for Cura AI

  • Arize Phoenix Integration: Implementing automated evaluation for doctor matching and symptom advice.
  • Fivetran Pipelines: Syncing local clinic files with centralized MongoDB Atlas clusters automatically.

Built With

Share this project:

Updates