fhir-agent-bench
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-agent-bench What active medications is patient 42 taking?"
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-agent-bench
A read-only MCP server over FHIR records of synthetic patients, a LangGraph agent that answers clinician-style questions through it ("last 10 HbA1c values", "active medications", "conditions since 2020"), and a benchmark of tool-call accuracy, answer correctness and refusal behaviour across open-weight and API models.
Work in progress: see the milestones and issues. Results appear here only once a run in this repo has produced them.
No real patient data is used: tests run on a small hand-written synthetic FHIR bundle, and the benchmark uses Synthea synthetic patients (Apache-2.0).
Development
uv venv --python 3.12 .venv
uv pip install --python .venv/Scripts/python.exe -e ".[agent,dev]"
pre-commit install
python -m pytestWork runs through issues and pull requests: one branch per issue, conventional commits, CI (ruff + pytest) must pass before a squash-merge.
Related MCP server: Legacy-to-FHIR Mapping MCP Server
Licence
MIT, see LICENSE. Author: Arjun Sivasankar (github.com/Arjun-Sivasankar).
Available Tools
6 toolsget_allergiesBRead-onlyIdempotent
Recorded allergies and intolerances for one patient.
Inputs: patient_id (required).
get_conditionsARead-onlyIdempotent
Conditions (diagnoses) for one patient, optionally by clinical status (active,
resolved, ...) and onset on or after since (YYYY-MM-DD).
Inputs: patient_id (required), since, clinical_status.
get_medicationsBRead-onlyIdempotent
Medication requests for one patient, optionally filtered by status (active, stopped, completed, ...).
Inputs: patient_id (required), status.
get_observationsARead-onlyIdempotent
Lab results and vital signs for one LOINC code, newest first. since (YYYY-MM-DD) is
inclusive; limit is 1-100. Examples: 4548-4 HbA1c, 13457-7 LDL cholesterol,
3016-3 TSH, 8480-6 systolic and 8462-4 diastolic blood pressure.
Inputs: loinc_code (required), patient_id (required), limit, since.
get_patientBRead-onlyIdempotent
Demographics of one patient by id.
Inputs: patient_id (required).
search_patientsARead-onlyIdempotent
Find patients by (part of) their name and/or exact birth date (YYYY-MM-DD). Returns id, name, gender and birth date for each match.
Inputs: name, birth_date.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a clearly distinct FHIR resource: observations, demographics, allergies, conditions, medications, and patient search. The only potentially close pair (get_patient vs search_patients) is cleanly separated by id lookup vs name/birthdate search.
All names follow a predictable snake_case verb_noun pattern (get_* for single-patient resource reads, search_* for discovery). The one verb deviation (search_patients) is semantically meaningful rather than arbitrary.
Six tools is a well-scoped surface for a clinical data lookup server, with each tool mapping to a distinct resource type. No redundant or filler tools are present.
The surface covers common chart-review reads but omits encounters/visits, procedures, immunizations, and diagnostic reports, and offers no write or update operations at all. Filtering is also inconsistent (observations support limit, conditions/medications do not), which will cause dead ends for agents needing pagination or broader clinical context.
Maintenance
Related MCP Connectors
Read patient-authorized EHR records: medications, labs, conditions, allergies. Consent-bounded.
Read a patient's claims and clinical records from the payers and providers they connect.
Synthetic EHR: medications, labs, conditions, allergies, immunizations, FHIR R4. No API key.
Query Health Gorilla FHIR patients, conditions, medications and lab results.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables read-only FHIR access to Practice Fusion EHR to search patients, appointments, conditions, medications, and lab results.134MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural-language querying of a mock legacy healthcare database and returns validated FHIR resources (Patient, Observation, Condition).MIT
- 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.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables exploring a synthetic electronic health record via natural language, including patient demographics, encounters, notes, and medications, with optional write support for adding synthetic progress notes.-