Inspiration
The inspiration came from a real conversation.
My sister, who is studying to become an OB/GYN, mentioned how often postpartum patients disappear after discharge despite still being in one of the highest-risk periods of maternal care. Delivery happens. The patient leaves the hospital. Follow-up never happens. Then complications escalate silently outside the care system.
That conversation became the starting point for Materna.
We also spoke with clinicians and people familiar with OB/GYN workflows who confirmed that the postpartum window is one of the most overlooked periods in maternal care despite being one of the most dangerous.
CDC data shows that more than half of pregnancy-related deaths occur after delivery and that more than 80% are preventable. Black women are also significantly more likely to die from pregnancy-related causes compared to everyone else.
What it does
The system looks for things like completed delivery encounters, absence of postpartum follow-up visits, high-risk conditions such as preeclampsia, hypertension, gestational diabetes, postpartum hemorrhage, and C-section recovery, severe blood pressure findings, postpartum depression screening gaps, and SDOH barriers such as transportation insecurity or food insecurity.
It then prioritizes the patient based on severity and generates a direct clinical outreach action for the care coordinator.
The output is simple: who is highest risk, why they are highest risk, and what action should happen next.
How we built it
I built Materna as a FHIR-compliant MCP server designed specifically for postpartum care coordination workflows.
First, I created structured FHIR transaction bundles using hand-crafted synthetic postpartum patient scenarios and confirmed that the system could detect the presence or absence of postpartum follow-up encounters.
Then, I implemented structured care gap detection logic for postpartum follow-up absence, severe hypertension, preeclampsia, postpartum depression screening gaps and SDOH-related barriers.
I built the actual coordinator-facing output to be based on prioritized outreach queues, outreach message generation, appointment scheduling logic, clinician escalation workflows, and follow-up verification.
The model layer runs through a Hugging Face-hosted inference workflow using Gemma, while the orchestration and clinical workflow logic remain deterministic and FHIR-native.
Challenges we ran into
One of the biggest challenges was connecting the FHIR context correctly from the Hugging Face Space into the Promptopinion workflow environment.
Another major issue was getting the MCP routing and path structure working correctly because the duplicated /mcp pathing caused repeated failures while we were trying to expose the server.
I also spent significant time refining how the model handled structured clinical reasoning while keeping the output constrained, deterministic, and clinically usable rather than overly conversational.
The final challenge was making the workflow feel like a real care coordination system and also importing relevant bundles in the right format for our examples.
Accomplishments that we're proud of
Materna is a working maternal care coordination workflow built around real FHIR-native clinical operations. It can also be implemented as a daily, weekly or monthly cronjob to identify the specific care gaps across different databases and communities.
This is potentially a lifesaving tool if utilized correctly and I am happy to be able to say that we successfully built a context-aware MCP server, that is able to do risk prioritization, outreach generation, organize postpartum scheduling workflows, continue to follow-up verification, do SDOH analysis, and finally, implement postpartum depression screening.
Most importantly, we built something actionable for a real clinical problem, and that was one of the most rewarding parts of the project.
What we learned
We learned how to build and expose a Model Context Protocol server with structured clinical workflows.
We learned how to connect agents to MCP servers while maintaining context integrity across FHIR resources.
What's next for Materna
The next step for Materna is evolving from a single-patient workflow into a scalable postpartum care coordination platform.
That includes implementing long-term postpartum monitoring, community resource referrals, adding multilingual outreach, and direct integration into hospital care coordination systems.
I also want to integrate a predictive maternal risk scoring and real-time postpartum monitoring so care coordinators are able intervene in edge cases and before severe deterioration occurs. The main value of this product will be in recursive scanning to identify care gaps.
Log in or sign up for Devpost to join the conversation.