Inspiration
Healthcare AI agents are most useful when they can work with real clinical context instead of generic chat prompts. We built Clinical FHIR Safety MCP to explore how Prompt Opinion agents can use MCP and FHIR context to support safer, more actionable clinical workflows.
What it does
Clinical FHIR Safety MCP is a Prompt Opinion-compatible MCP server that connects agents to FHIR patient records. It can summarize a patient's chart, inspect FHIR resources, suggest diagnostic workup paths based on documented conditions and observations, and check proposed medications against allergies and current medication lists.
The server supports common FHIR resources such as Patient, Condition, Observation, MedicationStatement, MedicationRequest, AllergyIntolerance, Encounter, Procedure, DiagnosticReport, DocumentReference, CarePlan, Immunization, Appointment, Practitioner, and Organization.
How we built it
We built the MCP server in TypeScript using Express and the Model Context Protocol SDK. The server receives Prompt Opinion FHIR context headers, including the FHIR server URL, patient ID, and access token. It then uses standard FHIR API calls to retrieve patient-specific resources and return clinician-facing summaries and decision support outputs.
The server is deployed on Render and integrated into Prompt Opinion as a Streamable HTTP MCP server.
Challenges
The biggest challenge was handling FHIR context and permissions safely. Different resources require different scopes, so the server needed to gracefully handle unavailable data while still returning useful summaries from accessible resources.
Accomplishments
We created an end-to-end MCP integration that is discoverable and invokable from Prompt Opinion. It supports chart summaries, FHIR record exploration, diagnostic workup scaffolds, clinical note extraction, and medication safety checks.
What's next
Next, we would add richer clinical reasoning, source citations for each FHIR finding, safer write-back workflows such as clinician review tasks, and broader testing across more synthetic patient bundles.
Built With
- express.js
- fhir
- model-context-protocol-(mcp)
- ngrok
- node.js
- prompt-opinion
- render
- typescript
Log in or sign up for Devpost to join the conversation.