fhir-journey-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fhir-journey-mcp which discharged patients last week never got a follow-up booked?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fhir-journey-mcp
A read-only MCP server that gives an AI agent a patient's context from any FHIR R4 server: who they are, when they were last seen, what is booked next, and which discharged patients never got a follow-up.
Hospitals already run HIS, EMR and scheduling systems that speak (some) FHIR. An agent that calls patients or answers the front desk needs that context before it says a word, and it should not need write access to get it.
Tools
Tool | What it answers |
| Find a patient by name, phone, identifier (MRN, ABHA number) or birth date. Requires at least one filter. |
| Encounters + appointments as one dated timeline, last seen, next appointment, no-show and cancellation counts. |
| Appointments by patient, practitioner, status and date range, e.g. all |
| Free slots for a practitioner (chained through |
| Finished encounters in a window with no live follow-up within N days. Cancelled or no-show follow-ups don't count as booked. Each row says whether the window is already |
fhir_find_followups_due output, from the live smoke run below:
[
{ "patient": "Meera Demo", "discharged": "2026-10-09T12:00:00.000Z", "dueBy": "2026-10-16T12:00:00.000Z", "lateBooking": "2026-10-28T10:00:00.000Z" },
{ "patient": "Rohan Demo", "discharged": "2026-10-13T12:00:00.000Z", "dueBy": "2026-10-20T12:00:00.000Z", "lateBooking": null }
]Related MCP server: LangCare MCP FHIR Server
Run it
npm install
npm run build
FHIR_BASE_URL=https://your-server/fhir FHIR_TOKEN=... npx fhir-journey-mcpClaude Desktop / any MCP client:
{
"mcpServers": {
"fhir-journey": {
"command": "node",
"args": ["/path/to/fhir-journey-mcp/dist/mcp/server.js"],
"env": { "FHIR_BASE_URL": "https://hapi.fhir.org/baseR4" }
}
}
}With no FHIR_BASE_URL it uses the public HAPI test server, which holds synthetic data only.
Verify it
npm test # 22 offline tests against a fake FHIR server
npm run seed # loads 4 synthetic patients with known answers, tagged per run
npm run smoke # starts the server over stdio and checks every tool's answerscripts/seed.ts documents the expected answers (who is booked, who is due, whose follow-up was cancelled and rebooked late). npm run smoke passes 10/10 against the public HAPI server.
Design choices
Read-only. Booking, cancelling and messaging patients belong behind a human or a separate, audited tool.
No full-table reads. Search tools refuse to run without a filter.
Ids are validated before they reach a URL path; a model can't turn
patientIdinto../Practitioner/1.Paging links are only followed on the configured origin, so a bearer token is never sent to a host the server named in a
nextlink.Search URLs are redacted from errors, since they carry names and phone numbers.
GET retries on 408/429/5xx with backoff; transaction POSTs are never replayed.
Compact summaries, not raw resources: less token spend, fewer fields for a model to misread.
meta.tagfilter on every search tool, for scoping to one tenant or one test dataset.
Not done / honest limits
Tested against HAPI FHIR only. Real hospital systems use FHIR profiles and partial implementations differently (chained search and
_sortsupport vary). Not tested against any production EMR/HIS.No ABDM gateway integration, consent artefact handling, or SMART-on-FHIR auth flow; it takes a bearer token you already have.
"Follow-up" means any live appointment for the patient after discharge, not one matched to the same department or condition.
fhir_find_followups_duemakes one appointment query per patient (5 in parallel). Fine for a daily worklist, not for a 10,000-discharge backfill.
MIT licensed.
Available Tools
5 toolsfhir_find_followups_dueFollow-ups dueA
Finished encounters that ended in a date range with no live follow-up appointment booked within withinDays of discharge. Cancelled or no-show follow-ups do not count as booked. Returns the patients to contact, oldest discharge first, whether the window has already closed (overdue) or can still be met, and any follow-up booked too late.
Inputs: dischargedFrom (required), tag, withinDays, dischargedTo, +2 more.
fhir_find_open_slotsFind open slotsA
Free Slots in a date range, earliest first, for one practitioner or one schedule. Defaults to the next 7 days. Read-only: it does not hold or book the slot.
Inputs: to, tag, from, limit, +2 more.
fhir_get_patient_journeyPatient journeyA
One patient's encounters and appointments merged into a dated timeline, plus when they were last seen, their next upcoming appointment, and no-show/cancellation counts. Use this before contacting a patient so the agent knows their context.
Inputs: patientId (required), since.
fhir_list_appointmentsList appointmentsA
Appointments filtered by patient, practitioner, status and date range, soonest first. At least one of patientId, practitionerId, from or tag is required.
Inputs: to, tag, from, limit, +3 more.
fhir_search_patientsSearch patientsA
Find patients by name, phone, identifier (e.g. MRN or ABHA number, as system|value or value) or birth date. At least one filter is required. Returns compact summaries, not full resources.
Inputs: tag, name, limit, phone, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource or workflow: patient search, patient timeline, appointment listing, open slots, and follow-up detection. The only mild overlap is that get_patient_journey already embeds a patient's appointments while list_appointments offers a filtered appointment view, so an agent could occasionally hesitate on which to use for appointment data.
All tools use a uniform fhir_ prefix followed by a consistent verb_noun pattern (search_patients, get_patient_journey, list_appointments, find_open_slots, find_followups_due). The convention is predictable and readable throughout.
Five tools is well-scoped for a focused patient-journey server; each one earns its place covering search, context, appointments, availability, and follow-up detection without redundancy.
The read-only surface covers discovery and identification well, but the implied workflow dead-ends: find_open_slots explicitly cannot hold or book, and find_followups_due returns patients to contact with no tool to actually schedule the follow-up. Booking/rescheduling operations are notable gaps for the scheduling workflow the tools describe.
Maintenance
Related MCP Connectors
Read patient-authorized EHR records: medications, labs, conditions, allergies. Consent-bounded.
Read Spruce Health contacts, conversations, messages, phone lines and team members (read-only).
Read Elation Health patients, appointments, problems, allergies, medications, notes and vitals.
HL7 FHIR R4 health-data API for AI agents: free sandbox, 30 synthetic patients, AI-ready context.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides safe read-only access to synthetic healthcare data via FHIR R4, enabling AI assistants to search patients, retrieve vitals, and summarize conditions using a public sandbox.426 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to securely interact with FHIR R4-based EMRs, supporting read, search, create, and update operations on any FHIR resource type across systems like Epic, Cerner, and OpenEMR.311 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to query de-identified FHIR-shaped hospital data through audited, read-only tools for patients, encounters, conditions, observations, medications, and interaction checks, while any medication write stays a draft that a clinician must confirm out-of-band.MIT
- FlicenseNot gradedqualityAmaintenanceEnables LLM-based agents to connect to a FHIR-compliant healthcare backend and query or manipulate clinical data with natural-language prompts. Provides full CRUD operations on FHIR resources, AI-powered document ingestion and semantic search, RAG-ready retrieval, and LOINC terminology lookup.-