Inspiration
Every seven minutes, someone in America dies from sepsis.
Not because we lack the drugs. Not because physicians don't know what to do. Because the system fails patients between decisions — at the exact moments where AI could intervene.
The prior authorization holds up the antibiotic while mortality climbs 7% per hour. The culture result sits in the chart while the patient stays on broad-spectrum carbapenems. The procalcitonin trend is never checked — so antibiotics run 4 days longer than necessary. The patient is discharged without a structured follow-up plan, and 1 in 4 is back in the hospital within 30 days.
These are not random failures. They are predictable, automatable decision gaps.
When the Surviving Sepsis Campaign published their 2026 International Guidelines in March — the most current clinical evidence in existence — we saw an opportunity: build an agent that implements every recommendation in that document, for every patient, automatically.
That is what this is.
What It Does
A single MCP server with 10 clinical tools covering the complete sepsis lifecycle — the only submission in this marketplace that does so.
The Patient: Marcus Williams
58M, T2DM, CKD Stage 2, Penicillin Anaphylaxis. Arrives in the ED on May 1st in septic shock.
Stage 1 — Detect
Prompt: "Patient just arrived in the ED. Assess sepsis risk at admission on May 1st with BP 88/54, HR 118, RR 22, temp 39.1°C, GCS 12, lactate 2.8."
MonitorVitalsPattern extracts vitals from FHIR DocumentReference. DetectDeteriorationAlert scores deterministically:
- qSOFA: 3/3 — altered mentation, RR >22, SBP <100
- SIRS: 4/4 — all criteria met
- SOFA: 3 — renal + neurological dysfunction
- Tier: SEPTIC SHOCK
TrackSepsisBundlechecks Hour-1 compliance. Blood cultures ✓. Lactate ✓. Antibiotics — STALLED. PA required for Meropenem.
His penicillin anaphylaxis precludes Piperacillin-Tazobactam. Meropenem is the only appropriate option. UnitedHealthcare requires prior authorization. Every hour this sits unanswered, his survival probability drops.
GenerateShiftHandoff produces a complete SBAR note for the incoming ICU team.
Stage 2 — Authorize (via integrated PA Tools MCP)
Prompt: "Run PA authorization"
CheckCoverageRequirements loads UHC's carbapenem policy. GenerateClinicalJustification writes the PA letter grounded in his actual FHIR data — the allergy chain, the clinical necessity, the mortality cost of delay. PA approved. Antibiotics unblocked.
Stage 3 — Treat
Meropenem 1g IV q8h initiated. ICU admission. Vasopressors Day 0–1. Clinical improvement begins.
Stage 4 — De-Escalate
Prompt: "Culture results are back. Should we switch to a narrower antibiotic or keep the current one?"
RecommendAntibioticDeEscalation reads the microbiology DocumentReference:
- Organism: E. coli — ESBL negative
- Sensitive to Ceftriaxone (MIC ≤1 µg/mL)
- Resistant to Ciprofloxacin — fluoroquinolone oral step-down blocked automatically
- Decision: DE-ESCALATE — Meropenem → Ceftriaxone 1g IV q24h
- PA check: Ceftriaxone does not require PA — administrative burden eliminated De-escalation reduces AKI risk by 20%, ICU readmission by 41%, in-hospital mortality by 8% (JAMA Internal Medicine 2025, 124,577 patients). It happens in only 29.5% of appropriate cases nationally. This tool makes it happen every time.
Stage 5 — Stop
Prompt: "Look at the procalcitonin trend and tell me if it is safe to stop antibiotics now."
MonitorProcalcitoninAndStop applies the SSC 2026 PCT-guided stopping algorithm:
| Day | Date | PCT (ng/mL) | Clinical Status |
|---|---|---|---|
| 0 | May 1 | 18.4 (Peak) | Septic shock |
| 1 | May 2 | 9.2 | Off vasopressors |
| 2 | May 3 | 4.1 | GCS improving |
| 3 | May 4 | 0.8 | Afebrile x24h |
| 4 | May 5 | 0.3 | CRITERIA MET |
- Criterion 1: PCT < 0.5 ng/mL ✓
- Criterion 2: 98.4% drop from peak ✓
- Decision: DISCONTINUE Evidence: ADAPT-Sepsis trial (JAMA 2025) — PCT-guided stopping equals 4 fewer antibiotic days per patient with no increase in mortality. PCT protocol compliance in real ICUs is only 54%. This tool achieves 100% — every patient, every time.
Stage 6 — Discharge
Prompt: "Patient is ready for discharge. Generate the complete discharge package."
GenerateSepsisDischargePackage generates three documents:
- PCP Clinical Handoff Letter — specific lab orders (CBC/CMP Day 7, PCT Day 14), nephrology referral for CKD, ED return criteria, hospital course summary
- Patient Education Letter — plain language, post-sepsis syndrome explained, warning signs to watch for
- 30-Day FHIR CarePlan — structured Day 7 / 14 / 30 / 90 action table 17–35% of sepsis survivors readmit within 30 days. 62% of those readmissions are infectious causes — largely preventable with structured follow-up. This package is that structure.
How We Built It
Architecture: LLM Extracts. Python Decides.
Clinical thresholds are not guesses. They are hardcoded constants.
FHIR DocumentReference (.txt)
↓ Groq llama-3.3-70b → extract structured JSON from clinical text
↓ Deterministic Python → apply clinical algorithms
↓ FHIR-shaped output → Task, CarePlan, AuditEvent drafts
Every clinical constant is hardcoded:
PCT_ABSOLUTE_STOP_THRESHOLD = 0.5(SSC 2026)PCT_PERCENT_OF_PEAK_STOP = 0.20(SSC 2026)QSOFA_SEPSIS_THRESHOLD = 2(Sepsis-3)DEESCALATION_MAP= 8-organism Python dict (IDSA 2023) The LLM does one thing: convert unstructured clinical text into structured JSON. Once that data is extracted, every clinical decision runs in deterministic Python. The LLM cannot hallucinate a PCT threshold. It cannot misapply a de-escalation rule. The algorithm is the algorithm.
Stack
- FastMCP — Python MCP server
- Groq llama-3.3-70b — clinical text extraction only
- FHIR R4 — DocumentReference for all patient data
- Railway — production deployment
- Prompt Opinion SHARP — automatic FHIR context propagation ### FHIR Scope The Prompt Opinion workspace scopes FHIR access to DocumentReference. All clinical data — vitals, labs, culture results, PCT series — is embedded in DocumentReference notes. This is consistent with real-world EHR clinical document exchange workflows (C-CDA, HL7 FHIR DocumentReference R4). In production with full FHIR server access, the same tools would read from Observation, Condition, and MedicationRequest resources directly.
Challenges We Ran Into
1. Groq extraction reliability on complex documents
The de-escalation tool initially returned INSUFFICIENT_DATA because the antibiotic susceptibility table in the clinical note used complex indented formatting that Groq's extraction failed to parse reliably. Solution: created a dedicated marcus_williams_culture_simple.txt DocumentReference with clean, line-by-line formatting designed for reliable LLM extraction. Lesson: the data format matters as much as the extraction prompt.
2. FHIR scope limitations The platform's FHIR server returns 403 on Observation, Condition, and MedicationRequest resources in this workspace. All vitals and labs had to be embedded in DocumentReference text. This is a platform constraint, not a clinical limitation — and it reflects how many real hospitals actually exchange data today via clinical documents rather than structured FHIR resources.
3. Building SSC 2026 in real time The Surviving Sepsis Campaign 2026 guidelines were published in March 2026 — during the hackathon window. We had to implement the PCT-guided stopping algorithm from the primary source, verify it against the ADAPT-Sepsis trial published in JAMA the same month, and encode it as deterministic Python constants before submission. No training data. Primary source only.
Accomplishments That We're Proud Of
- The only submission covering detect → discharge. Every other sepsis tool in this marketplace stops at detection or at PA. We go to discharge.
- SSC 2026 implementation from primary source. Published March 2026. No other submission cites it.
- Deterministic clinical thresholds. Not one clinical decision in this system is made by an LLM. The LLM extracts. Python decides. This is how clinical AI should be built.
- The de-escalation catch. The tool automatically blocks fluoroquinolone oral step-down when the organism is resistant — even if the user doesn't ask about it. This is the kind of catch a tired resident misses at 3am. The tool never misses it.
- Human-in-the-loop by design. Every output ends with attending physician review required. The PA letter verification flags what needs sign-off before submission. We built the AI to support the physician, not replace the physician.
What We Learned
Clinical AI fails at the edges — not in the happy path. Jennifer Mitchell's FHIR record had an ALL diagnosis that conflicted with her lung cancer treatment request. Marcus Williams' allergy profile blocked every first-line antibiotic. The PCT series spans 5 days across two documents. Real clinical data is messy, contradictory, and spread across multiple sources.
The architecture that handles this is: paranoid validation at extraction, deterministic logic at decision, and explicit human review gates before any action. Every system that skips any of these three layers will fail a real patient.
We also learned that the most clinically impactful feature — antibiotic de-escalation — is the least implemented. 70.5% of patients who should be de-escalated aren't. The tool for this is not complex. The barrier is workflow friction. MCP removes that friction.
What's Next
- Full FHIR R4 resource support — read from Observation, Condition, MedicationRequest directly when platform scopes allow
- Real-time sepsis surveillance — continuous monitoring on all ICU patients, not just when a physician prompts
- EHR integration — direct write-back to Epic/Cerner via FHIR write APIs (CMS-0057-F enables this in 2027)
- Resistance pattern learning — aggregate de-escalation decisions across patients to surface emerging resistance patterns at the institution level
- Post-sepsis syndrome tracking — 30/90-day follow-up completion rates reported back to the discharging physician

Log in or sign up for Devpost to join the conversation.