Inspiration

In India's government hospitals, a single OPD doctor sees 100 patients per shift. That's 4 minutes per consultation. In those 4 minutes, they're expected to review years of medical history, check drug interactions, interpret lab results, and prescribe safely.

I'm Krishna, born in Ahmedabad, now based in New Jersey. Growing up, I watched my family navigate the Indian healthcare system. VaidyaFlow exists because of them, and the millions of patients sitting in OPD waiting rooms right now.

The name comes from Sanskrit: Vaidya (healer) + Flow (patient flow through OPD).

What it does

VaidyaFlow is an MCP server that integrates directly into a clinician's workflow through Prompt Opinion. When a doctor opens a patient's chart, VaidyaFlow automatically receives that patient's FHIR context and exposes four clinical tools.

get_patient_brief — 10-second structured patient card with conditions, medications, labs, allergies, and safety flags.

check_prescription_safety— Contraindication checker that scans both structured FHIR records and free-text clinical notes. Returns a verdict with reasoning.

get_abnormal_labs — Surfaces abnormal lab values with clinical interpretation and action guidance.

generate_handoff_note — Structured shift handoff document so critical information never gets lost between doctors.

How we built it

Tech stack: Python 3.13, FastMCP, FHIR R4, Starlette ASGI, httpx, Railway, Prompt Opinion, Gemini Flash Lite.

Challenges we ran into

Debugging the FHIR handshake was the hardest part. Prompt Opinion's only error signal for a wrong capability advertisement is a quiet UI banner. I built an in-server debug tool that dumps all incoming headers and runs live FHIR fetch attempts end-to-end to diagnose exactly where the pipeline was breaking. FastMCP architecture constraints meant that adding HTTP-context-dependent behavior required reading FastMCP's source code to find the right injection point. FHIR document format inconsistency was also a challenge. Different FHIR servers store clinical notes differently, inline base64, Binary resource URLs, or narrative text. I built a parser that handles all three formats.

Accomplishments that we're proud of

Production-deployed on Railway with 15 deploys over 48 hours. Full Prompt Opinion FHIR Context integration including the extensions key that no existing Python library supports. Built solo in 48 hours while finishing a university degree.

What I Learned

The MCP ecosystem is young. The gap between what the spec says and what your SDK supports is real. Being willing to drop down to raw ASGI middleware and rewrite protocol responses is a genuine skill in this space. Healthcare AI's hardest problem isn't the AI. It's the data plumbing. FHIR is brilliant in theory and surprisingly inconsistent in practice. The teams that win in clinical AI will be the ones who handle that inconsistency gracefully.

What's Next

Longitudinal trajectory analysis to reason over time-series FHIR Observations and flag deteriorating chronic disease before it becomes an emergency. Multi-agent adversarial review where a Prescriber agent and a Skeptic agent independently review each treatment plan, and an Adjudicator agent resolves disagreements. A pilot at a government hospital in Ahmedabad through personal connections.

Built With

  • ai
  • asgi
  • clinical
  • decision
  • fastmcp
  • fhir
  • gemini
  • healthcare
  • httpx
  • mcp
  • opinion
  • prompt
  • python
  • railway
  • starlette
  • support
  • synthea
Share this project:

Updates