HealNet — MCP Care‑Gap Navigator
Inspiration
I built HealNet because I wanted a small, high-impact demo that proves useful clinical value in under three minutes. I was inspired by real care‑coordination workflows where clinicians spend too much time hunting records; a reliable agent that surfaces prioritized gaps and next steps can save time and reduce missed care.
What it does
HealNet is a focused MCP (Model Context Protocol) superpower that summarizes a patient’s chart, detects actionable care gaps, and drafts concise follow‑up plans for clinicians and care coordinators. I built it to show a realistic, interoperable healthcare workflow that judges and clinicians can immediately understand and trust.
How we built it
Core server: server.py — a FastMCP-based MCP server exposing tools:
summarize_patient_chartidentify_care_gaps_tooldraft_follow_up_plangenerate_patient_message- FHIR adapter: fhir.py pulls patient data (live FHIR when configured, bundled demo fallback otherwise).
- Care-gap logic: care_gaps.py implements deterministic checks (e.g., stale HbA1c, elevated BP, missing screenings) and returns prioritized gaps with evidence.
- Optional LLM: configured by env vars (
HEALNET_LLM_BASE_URL,HEALNET_LLM_API_KEY,HEALNET_LLM_MODEL) and used only to create succinct summaries when available. - Packaging & docs: pyproject.toml, requirements.txt, README.md, and a
demo_bundle.jsonso the app runs for demo without a real FHIR server. - Deployment & demo: local run + Cloudflare Quick Tunnel for public endpoint and integration into Prompt Opinion for live recording.
Challenges we ran into
Quota/config friction: free‑tier model quotas (Gemini/GitHub) required me to support multiple provider options and graceful LLM disablement when unavailable.
- FHIR variability: different servers and resource shapes forced robust parsing and many defensive checks.
- Time & scope: balancing a complete, testable demo with safety (avoid hallucination in clinical outputs) while delivering within hackathon time.
Accomplishments that we're proud of
Deterministic core logic for safety: care gaps include evidence fields and priority levels (HIGH/MEDIUM/LOW).
- LLM only for human-friendly summarization; outputs always return structured fields suitable for UI automation or audit.
- Demo fallback bundle (
demo_bundle.json) ensures reproducible results for judges.
What we learned
How MCP and SHARP-style context propagate patient IDs and FHIR tokens into a tool-first workflow.
- Practical tradeoffs between deterministic logic and LLM polishing: use deterministic rules for safety-critical gap detection and an LLM for concise, human-friendly phrasing.
- How to make an app resilient: graceful FHIR fallbacks (demo bundle), environment-based LLM configuration, and robust parsing of heterogeneous FHIR resources.
- Devops lessons: packaging a tiny Python MCP server, running it locally, exposing it via Cloudflare Quick Tunnel, and wiring it into Prompt Opinion for an in‑platform demo.
What's next for HealNet
Built With
- cloudflare
- fastmcp
- fhir
- openai
- promptopinion
- python
- uvicorn
Log in or sign up for Devpost to join the conversation.