Last EHR — Medplum
by github.com/cbetz · v0.5.5 · updated Nov 17, 2026
FHIR chart tools for MCP: read-only by default, with elicitation-gated, human-approved writes.
Run it locally
Install the package and point your AI client at it.
npm
npx -y @lastehr/[email protected]Environment variables
MEDPLUM_ACCESS_TOKENsecretFHIR chart tools over Medplum or a local HAPI stack: read-only by default, with an opt-in elicitation-gated write profile (human-approved per action).
MEDPLUM_CLIENT_IDFHIR chart tools over Medplum or a local HAPI stack: read-only by default, with an opt-in elicitation-gated write profile (human-approved per action).
MEDPLUM_CLIENT_SECRETsecretFHIR chart tools over Medplum or a local HAPI stack: read-only by default, with an opt-in elicitation-gated write profile (human-approved per action).
MEDPLUM_BASE_URLFHIR chart tools over Medplum or a local HAPI stack: read-only by default, with an opt-in elicitation-gated write profile (human-approved per action).
LASTEHR_BACKENDepic, oracle, or smart. Requires LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1. Sandbox writes are approval-gated and persist because those sandboxes do not support delete.
LASTEHR_EXPERIMENTAL_FHIR_ADAPTERSSet to 1 to enable LASTEHR_BACKEND epic, oracle, or smart.
LASTEHR_CLIENT_IDSMART Backend Services client id. Not a secret.
LASTEHR_PRIVATE_KEYsecretPKCS#8 PEM for SMART private_key_jwt. Never log it.
LASTEHR_PRIVATE_KEY_PATHPath to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY.
LASTEHR_KEY_IDJWT kid. Must match the public JWKS.
LASTEHR_JWKS_URLhttps URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional.
LASTEHR_SCOPESSpace-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration.
LASTEHR_FHIR_BASE_URLFHIR base URL. Epic and Oracle default to their public sandboxes when unset.
LASTEHR_TOKEN_URLSMART token URL. Epic and Oracle default to their public sandboxes when unset.
LASTEHR_ENCOUNTEREncounter/{id} added to Epic observations when the tool call omits encounter.
LASTEHR_PERFORMERPractitioner/{id} filed as legal authenticator on Oracle observations.
More from github.com/cbetz
More MCP servers
MochiPDF
github.com/cbolgiano
Remote MCP server for HTML-to-PDF and screenshots with OAuth and API-key auth.
Fabrx
github.com/cc1988cc
MCP server for Fabrx - Build APIs from documents in your IDE
Arabicfmt Mcp
github.com/cc1a2b
Arabic formatting: 22 Arab currencies (Saudi riyal U+20C1), Hijri dates, تفقيط, RTL/bidi fixes.
Klaren — French Companies Directory
github.com/ccamborde
Search French companies, directors and associations (INPI, INSEE, RNA).
Nyc Property Intel
github.com/ccedacero
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Agent Referee
github.com/ccheez34
Neutral tie-breaks between AI agents and sealed review of an agent's output, with signed receipts.