Inspiration
I first heard about MCP servers through this hackathon. While exploring the challenge, I realized this was an opportunity to build something that solves a real clinical problem not just a demo. After analyzing the available FHIR patient data, I noticed patterns that are easy to miss in a busy clinic: a child's BMI silently climbing into the overweight range over 6 years, blood pressure elevated on every single visit, an ear infection that quietly progressed into chronic sinusitis. These aren't edge cases they're the kind of slow-moving risks that get overlooked when clinicians are seeing dozens of patients a day. That's what PediatricRiskProfiler is built to surface.
What it does
PediatricRiskProfiler is an MCP server that connects to FHIR patient data and gives clinicians instant, structured risk summaries across four health domains:
- Growth & BMI tracking - pulls the full BMI percentile history, flags sustained overweight or obese readings, and returns the latest height and weight
- Blood pressure trend analysis - traces BP readings over time, flags any systolic reading above 130, and identifies sustained hypertensive patterns
- Cardiovascular risk assessment - combines BMI and BP data together to produce an overall LOW / MODERATE / HIGH risk score with specific clinical reasons
- Respiratory infection chain - detects progression from acute to chronic infections, calculates time between episodes, and flags rapid re-infection patterns
- Oral health recurrence - identifies recurring dental conditions, clusters of related issues within short time windows, and calculates recurrence gaps in years
All 7 tools work entirely from structured FHIR data no custom databases, no hardcoded patient info. Every result is patient-specific and updates automatically when the patient context changes.
How we built it
The build started with data analysis loading real synthetic FHIR patient data (Conditions and Observations) and understanding what was actually available before writing a single line of tool code. This shaped every tool design decision.
From there the process was:
- Studied the Prompt Opinion platform through the getting started video and understood how MCP servers connect, how FHIR context gets passed through the SHARP extension, and how tools get registered and invoked by agents
- Analyzed the existing sample tools (
GetPatientAge,FindPatientId) to understand the code structure theIMcpToolinterface,FhirClientInstance.search,McpUtilities.createTextResponse, and thetools/index.tsbarrel pattern - Built each tool incrementally starting with the simplest FHIR queries (BMI percentile series, height/weight) and working up to the cross-analysis tool (
GetPediatricRiskFlags) that combines multiple FHIR queries in parallel usingPromise.all - Handled missing data gracefully throughout every tool returns a meaningful message if a patient has no relevant data, so the tools work across any patient not just the test cases
- Deployed to Render using Docker for a stable public endpoint, then registered the MCP server and configured the agent in the Prompt Opinion marketplace
The full stack is TypeScript, Express, the MCP SDK, and the FHIR R4 type library from @smile-cdr/fhirts.
Challenges we ran into
FHIR data was unfamiliar territory understanding the structure, knowing which LOINC codes map to which observations, and figuring out why BP values live inside a component array instead of a simple valueQuantity took real time to work through. The bigger challenge was building tools that work reliably across any patient, not just the test cases handling missing data gracefully so the tools never just crash or return nothing useful.
Accomplishments that we're proud of
The tools surface genuinely real clinical patterns Patient 2 had blood pressure above 130 on every single visit for 9 years and BMI in the overweight range consistently. That's a real risk that could be missed in a busy clinic. Building something that catches that automatically, from raw FHIR data, in seconds that feels meaningful. We're also proud that all 7 tools work across different patients and return different, accurate results rather than hardcoded demos.
What we learned
- What MCP servers actually are and how they expose tools to AI agents
- How FHIR R4 structures patient data Observations, Conditions, LOINC codes, component arrays
- How the Prompt Opinion platform handles FHIR context propagation through SHARP so tools receive patient tokens automatically
- How to take large, messy clinical data and return a clear, structured, clinically useful output
What's next for PediatricRiskProfiler
- Expand beyond Conditions and Observations - add medication review detection, immunization gap checking, and lab trend analysis when those FHIR resources become available
- Add age-aware thresholds BP and BMI cutoffs should adjust based on the patient's age, not use fixed adult values
- Build a combined full-patient risk dashboard tool that summarizes all four health domains in a single call
- Support population-level queries flag all patients in a practice with sustained elevated BMI or unresolved chronic conditions


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