Nova by NexusHealth — Devpost Project Story
Unified Patient Context MCP Server
Inspiration
It started with a single statistic that I couldn't let go of: physicians spend an average of 36 minutes navigating the EHR for every 30-minute patient visit. More than half of a doctor's working life is spent not caring for patients — but hunting for data across disconnected systems.
This isn't just an efficiency problem. It is a patient safety problem. A deteriorating patient's warning signs are scattered — heart rate in one system, creatinine trend in another, a new nephrotoxic drug added yesterday in a third. No single AI agent has the full picture. And so patterns get missed, drug interactions go undetected, and nurses on night shifts have no way to know which of their 18 patients needs attention right now without manually checking each one.
I asked myself: what if every healthcare AI agent could call a single endpoint and receive the complete clinical picture of a patient — labs, medications, vitals, deterioration signals, drug interactions — all unified, deduplicated, and explained?
That question became Nova by NexusHealth: not just a data aggregator, but an intelligence layer that thinks, adapts, learns, and — crucially — does it all without storing a single byte of patient data.
What It Does
Nova is a Model Context Protocol (MCP) server deployed on Prompt Opinion that gives any healthcare AI agent the ability to understand a patient completely through 10 specialized clinical tools.
The 10 Tools
| Tool | What It Does |
|---|---|
get_patient_snapshot |
Returns the complete clinical picture of a patient in one call — conditions, medications, allergies, and an AI-generated one-sentence summary |
get_active_problems |
Returns prioritized active clinical conditions with urgency scoring |
get_medication_timeline |
Returns medication history with drug interaction detection via OpenFDA, including brand/generic deduplication |
get_recent_abnormal_labs |
Returns abnormal lab results with trend analysis and clinical significance explanation |
detect_clinical_deterioration_signals |
Calculates NEWS2 and MEWS scores from FHIR vital signs and returns a rule-based deterioration report with AI narrative |
get_patient_context_delta |
Returns what changed in the last N hours across all clinical domains |
synthesize_cross_domain_insights |
Answers open clinical questions by reasoning across lab, medication, and vital sign data simultaneously |
scan_ward_alerts |
Proactively scans all patients in a ward and returns a prioritized alert list — no prompt needed |
orchestrate_context_from_sources |
Calls multiple MCP servers in parallel and synthesizes a unified cross-system context |
get_pattern_insights |
Queries an anonymous session-level pattern store to surface whether the current clinical pattern has been seen before this shift |
Five Capabilities That Set Nova Apart
Adaptive Clinical Persona — The same query produces fundamentally different output based on who is asking. A physician receives a full clinical narrative with differential reasoning. A nurse receives actionable bullet points with specific escalation thresholds. A pharmacist receives a medication-focused view with interaction severity and renal dosing flags. A patient receives plain language with next steps. This is not translation — it is structural adaptation.
Proactive Ward Alerts — Nova does not wait to be asked. scan_ward_alerts queries all patients in a location, runs deterioration scoring in parallel via asyncio.gather, ranks by risk, and surfaces who needs attention now.
Confidence-Weighted Evidence Trail — Every synthesis insight includes a transparent evidence trail. Each data source receives a weight calculated as:
$$w_i = 0.4 \cdot \text{recency}_i + 0.4 \cdot \text{completeness}_i + 0.2 \cdot \text{quality}_i$$
The overall confidence score is the weighted average across all sources, mapped to a human-readable label ("high", "moderate", "low") with a plain-language transparency note explaining why. This directly addresses the FDA and EMA 2026 AI transparency guidelines — something we believe no other submission in this competition has explicitly designed for.
Meta-Orchestration — Nova is the only submission that calls other MCP servers as part of its work. orchestrate_context_from_sources reaches out to radiology, pharmacy, and scheduling MCP servers in parallel, merges their results, and synthesizes a unified picture. This is true interoperability — not just a server that receives calls, but one that coordinates an ecosystem.
Clinical Pattern Memory — Perhaps the most novel feature. Throughout a session, Nova accumulates anonymous clinical patterns without ever storing patient data. When tools 5 or 7 run, the combination of generic clinical conditions (not values, not identifiers) is hashed using SHA-256 and stored in a thread-safe in-memory dict. When queried, Nova can surface: "This pattern has appeared 3 times this session. In 2 of 3 cases, deterioration was detected within 31 hours." The store holds zero patient data and resets on every server restart.
How We Built It
Protocol Layer: FastMCP (Python MCP SDK) with Streamable HTTP transport, making all 10 tools discoverable and invocable from the Prompt Opinion platform.
Data Sources:
- HAPI FHIR R4 (public test server) for all clinical resources: Patient, Condition, MedicationRequest, AllergyIntolerance, Observation
- OpenFDA API for drug interaction detection and drug label information
- Synthea for generating realistic synthetic FHIR R4 patient bundles (our primary demo patient, Eleanor M. Dawson, was built with Synthea and uploaded to HAPI FHIR)
Clinical Logic: NEWS2 and MEWS scoring are implemented as pure Python rule engines with zero ML dependencies, following the Royal College of Physicians 2017 guideline exactly. Drug deduplication uses a curated brand→generic mapping (50+ entries) combined with normalized string matching.
AI Integration: Google Gemini 2.0 Flash handles all natural language generation — clinical narratives, persona-adapted explanations, cross-domain synthesis, and pattern insight summaries. Critically, AI is used as an explainer, not a decider. Rule-based engines make all clinical determinations; Gemini translates them into language appropriate for each clinical role.
SHARP Integration: Every tool extracts and propagates the SHARP context header (patient ID, EHR token, clinical role, session ID, org ID) from Prompt Opinion's session, with graceful fallback for local testing. Every response includes a sharp_metadata object.
Architecture Principles:
- Fully async throughout (
httpx.AsyncClient,asyncio.gatherfor parallel calls) - Stateless by design — zero persistent storage of patient data
- Graceful degradation — if any external service is unavailable, partial results are returned with informative error fields rather than crashes
Testing: 69 test cases covering unit tests (NEWS2/MEWS algorithms, SHARP extraction, drug deduplication), integration tests with mocked FHIR and OpenFDA, and end-to-end tests via MCP client against the live HAPI FHIR server.
Deployment: Railway.app with auto-deploy from GitHub. Registered and published on Prompt Opinion Marketplace under org NexusHealth.
Challenges We Ran Into
Designing Clinical Pattern Memory without any privacy risk. Our initial approach stored generic condition categories directly as strings. We realized even categorical labels could potentially be combined to narrow down patient identity in small wards. The final design — SHA-256 hashing of sorted, normalized condition labels, with no numeric values or identifiers ever entering the store — took three complete redesigns to get right. The store now contains nothing that could be reverse-engineered into patient identity.
FHIR data sparsity for NEWS2 scoring. The HAPI FHIR public test server's synthetic patients often lack complete vital sign timelines. Without multiple observations, trend calculation and NEWS2 scoring produce weak signals. We solved this by building a custom Synthea bundle with clinically realistic observation sequences — multiple vitals at realistic time intervals — and uploading it directly to HAPI FHIR.
Drug interaction detection at scale. OpenFDA does not support batch queries. For a patient on 8 medications, checking every pair creates an $O(n^2)$ query problem — 28 pairs for 8 drugs. We capped this at 20 pairs, ran all calls in parallel via asyncio.gather, and reduced the effective search space by running semantic deduplication (collapsing brand/generic duplicates) before querying.
Making AI genuinely irreplaceable — not just a text wrapper. The easiest failure mode in healthcare AI is using an LLM only to reformat data that a database query could have returned. We pushed past this in two ways: synthesize_cross_domain_insights requires AI to connect temporally correlated findings across three independent data domains simultaneously (something no SQL query can do), and get_pattern_insights produces emergent cross-patient insight that only exists because of accumulated session state.
SHARP context propagation in local testing. SHARP headers are injected by the Prompt Opinion platform — they don't exist when running locally via MCP Inspector. We built a MOCK_SHARP=true environment mode that simulates the full SHARP context, ensuring all 19 SHARP-related test cases pass in both local and platform environments without any code differences.
Accomplishments That We're Proud Of
10 fully functional clinical tools — all discoverable and invocable from Prompt Opinion, all SHARP-compliant, all returning structured Pydantic-validated responses with graceful degradation.
A NEWS2 algorithm that is 100% clinically accurate. We validated it against published clinical scenarios from the Royal College of Physicians. Score 0 on a healthy patient, score 15 on a critically ill simulated patient — both correct.
69 test cases, all passing — including end-to-end tests against the live HAPI FHIR server with a real synthetic patient. This is not a demo that only works in a controlled environment.
Clinical Pattern Memory with provable zero-PII guarantees. The privacy design of this feature is something we are genuinely proud of — it achieves something previously considered incompatible (session-level learning in a stateless, zero-storage system) through cryptographic anonymization.
A system where AI is genuinely doing something a rule engine cannot. When synthesize_cross_domain_insights connects a creatinine trend, a newly started medication, and a declining urine output pattern to surface a possible AKI signal — that connection only exists because of AI reasoning across three independent data domains. That is the standard we held ourselves to.
What We Learned
Building Nova taught us that the hardest part of healthcare AI is not the AI — it is the data architecture underneath it. FHIR interoperability, drug deduplication, vital sign normalization, and LOINC code mapping consumed more engineering time than the LLM integration by a significant margin.
We also learned that clinical feasibility is a design constraint, not an afterthought. Every feature — from the confidence weights in the evidence trail to the disclaimer fields in the pattern memory output — was designed with the question: would a clinician trust this in a real workflow? That question eliminated several initially appealing features and sharpened the ones that remained.
Finally, we learned that MCP's power is not in the individual server — it is in the ecosystem. The moment Nova became a meta-orchestrator that calls other MCP servers, the architecture shifted from "a useful tool" to "a coordination layer" — and the potential impact multiplied accordingly.
What's Next for Nova by NexusHealth
SMART on FHIR OAuth2 integration — replacing the HAPI public test server with real EHR sandboxes (Epic, Cerner) using proper patient-authorized token flows.
Persistent Pattern Memory with federated privacy — extending Clinical Pattern Memory beyond a single session using differential privacy techniques, enabling ward-level pattern detection across shifts without any individual patient data leaving the facility.
Indonesia SATUSEHAT integration — connecting Nova to Indonesia's national health interoperability platform (Kemenkes RI), making unified patient context available across the JKN/BPJS ecosystem serving 250+ million people. This is the long-term vision: a system built in Indonesia, for the scale of Southeast Asia.
Specialized agent ecosystem — using Nova as the foundational context layer for a suite of specialized agents: a discharge planning agent, a triage prioritization agent, a medication reconciliation agent — each consuming Nova's tools as their data foundation rather than building their own FHIR integrations from scratch.
How to Test
Nova is live and ready — no installation or account required to test the server directly.
All synthetic data. No real PHI. The demo patient (Eleanor M. Dawson, synthea-demo-patient) was generated with Synthea and uploaded to the HAPI FHIR public test server.
Option 1: Prompt Opinion Marketplace (Recommended)
- Open the Nova listing on Prompt Opinion Marketplace
- Add Nova to your Prompt Opinion workspace
- Create an agent and try these example prompts:
| What to test | Example prompt |
|---|---|
| Patient snapshot (nurse view) | "Show me the patient snapshot for synthea-demo-patient as a nurse" |
| Deterioration detection | "Detect clinical deterioration signals for synthea-demo-patient" |
| Cross-domain AI synthesis | "Is the elevated creatinine related to the new medication? patient: synthea-demo-patient" |
| Ward alert scan | "Scan ward ICU-A for patient alerts" |
| Clinical Pattern Memory | "Get pattern insights for synthea-demo-patient with conditions: creatinine_rising, metformin_present" |
| Role adaptation (pharmacist) | "As a pharmacist, show me the medication timeline for synthea-demo-patient" |
To test Adaptive Clinical Persona: ask the same question twice — once with "as a nurse" and once with "as a physician" — and compare the structure of the output.
Option 2: MCP Inspector (Direct Tool Invocation)
npx @modelcontextprotocol/inspector
Connect to:
https://amiable-determination-production.up.railway.app/mcp
All 10 tools will appear in the inspector. Invoke any tool directly with:
patient_id:synthea-demo-patientrole:physician,nurse,pharmacist, orpatient
Recommended test sequence to demonstrate Pattern Memory:
- Call
detect_clinical_deterioration_signalswithpatient_id: synthea-demo-patient - Call it 2 more times with the same patient
- Call
get_pattern_insightswithconditions: ["news2_medium_risk", "tachycardia"] - You should see
pattern_found: trueandsimilar_patterns_seen > 0
Option 3: Direct HTTP (curl)
# Step 1: Initialize session
SESSION=$(curl -s -X POST https://amiable-determination-production.up.railway.app/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-D - \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}' \
| grep -i "mcp-session-id" | awk '{print $2}' | tr -d '\r')
# Step 2: Call any tool
curl -s -X POST https://amiable-determination-production.up.railway.app/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: $SESSION" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_patient_snapshot","arguments":{"patient_id":"synthea-demo-patient","role":"nurse"}}}'
Log in or sign up for Devpost to join the conversation.