Labsco
MCP SERVER

EHR Tools with MCP and FHIR

by jmandel

Pulls a patient record over SMART on FHIR, then lets an agent grep it, query it with SQL, or run JavaScript over it.

Biomedical: Genomics & Clinical Data
Summary
Three ways into one patient record: search, SQL, code.

Structured FHIR and free-text notes end up in the same searchable pile, which is the part most FHIR tooling leaves out. Choose by precision: grep to find a mention, SQL when you know the resource shape, JavaScript when the answer has to be computed from several places at once.

What it is

A server that connects to an EHR through the SMART App Launch framework, extracts the patient record including structured FHIR resources and the text of clinical notes and attachments, and exposes that copy through three tools.

What you get
  • Text and regular-expression search across the whole fetched record, structured data and note text alike (grep_record)
  • Read-only SQL SELECT queries against the structured FHIR data, for precise lookups such as a lab result by LOINC code (query_record)
  • Custom JavaScript run over the fetched resources and attachments, for calculations that combine several sources (eval_record)
  • A standalone SMART on FHIR web client for the extraction step
  • The model works against the extracted record, not against the EHR itself
Requirements

An EHR that supports SMART on FHIR and an authorised launch against it. The record is fetched first; the tools then run over that copy.