Inspiration
Every year, 12 million patients are mis-triaged in US emergency departments, and 1 in 5 Medicare patients is readmitted within 30 days, costing $26 billion annually. These failures share a root cause: patient data exists in FHIR systems, but no tool connects triage, recovery, and readmission prevention into a single coordinated workflow.
I built HealthBridge to prove that MCP (Model Context Protocol) tools and A2A (Agent-to-Agent) communication can create a clinical intelligence layer that sits on top of FHIR servers and turns raw patient data into actionable, coordinated care decisions.
What I Learned
MCP tools are the right abstraction for clinical AI. Each of our 9 tools maps to a distinct clinical capability (symptom assessment, medication reconciliation, care gap identification, etc.). Any LLM agent can discover and use them through the standard MCP protocol with no custom integration needed.
A2A coordination is what makes multi-agent systems clinically useful. When our Triage Agent identifies an EMERGENT case, it proactively notifies the Recovery Coordinator via A2A so discharge planning starts immediately, not hours later when a case manager is assigned.
Gemma 4 26B handles clinical reasoning well when given structured prompts and FHIR context, but it requires careful prompt engineering to prevent data fabrication and chain-of-thought leakage into outputs.
Gradio + async Python works as a rapid demo layer, but production deployment would need a proper API gateway separation between the MCP server and the web UI.
How I Built It
9 MCP Tools built on the mcp Python SDK. Each tool fetches FHIR R4 data (conditions, medications, observations, encounters, allergies) and passes it to Gemma 4 26B for clinical analysis:
- assess_symptoms for ESI-based triage with red flag detection
- summarize_clinical_history for AI-generated clinical summaries
- identify_care_gaps for USPSTF guideline-based gap analysis
- check_medication_risks for interaction and contraindication screening
- suggest_care_plan for personalized care plan generation
- reconcile_medications following ISMP/Joint Commission NPSG.03.06.01 standards
- generate_warning_signs for personalized "when to call your doctor" guidance
- translate_care_plan for 6th-grade reading level patient-friendly translations
- assess_readmission_risk for CMS HRRP 30-day readmission scoring
2 A2A Agents as autonomous FastAPI services that consume MCP tools:
- Triage Agent (port 8001) classifies urgency using symptom assessment and clinical history, then forwards high-acuity cases to the Recovery Coordinator
- Recovery Coordinator (port 8002) generates medication reconciliation, warning signs, and recovery guides, and accepts A2A handoff from Triage
Web UI built with Gradio and deployed on Render. A single "Assess" button runs all three analyses (triage, readmission risk, recovery) in parallel via asyncio.gather and populates all tabs simultaneously.
Security includes SSRF protection on FHIR URLs, private IP blocking, input sanitization, and output HTML/script stripping.
Challenges
- Gemma 4 A4B returns chain-of-thought in a separate thinking part. I had to modify the response parser to skip thinking parts and only extract the final answer.
- The Google GenAI SDK had issues with the A4B variant. I switched to direct REST API calls to the Generative Language API endpoint instead.
- FHIR test servers like HAPI have sparse data for many patients. I built graceful fallback so agents work with symptoms-only analysis when patient records are incomplete.
- Running three AI calls sequentially took about three minutes. I solved this by running triage, recovery, and readmission risk in parallel with asyncio.gather, cutting total time to roughly 60 seconds.
Log in or sign up for Devpost to join the conversation.