MCP directory
LE

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.

npm

Run it locally

Install the package and point your AI client at it.

npm

npx -y @lastehr/[email protected]

Environment variables

  • MEDPLUM_ACCESS_TOKENsecret

    FHIR 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_ID

    FHIR 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_SECRETsecret

    FHIR 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_URL

    FHIR 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_BACKEND

    epic, 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_ADAPTERS

    Set to 1 to enable LASTEHR_BACKEND epic, oracle, or smart.

  • LASTEHR_CLIENT_ID

    SMART Backend Services client id. Not a secret.

  • LASTEHR_PRIVATE_KEYsecret

    PKCS#8 PEM for SMART private_key_jwt. Never log it.

  • LASTEHR_PRIVATE_KEY_PATH

    Path to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY.

  • LASTEHR_KEY_ID

    JWT kid. Must match the public JWKS.

  • LASTEHR_JWKS_URL

    https URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional.

  • LASTEHR_SCOPES

    Space-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration.

  • LASTEHR_FHIR_BASE_URL

    FHIR base URL. Epic and Oracle default to their public sandboxes when unset.

  • LASTEHR_TOKEN_URL

    SMART token URL. Epic and Oracle default to their public sandboxes when unset.

  • LASTEHR_ENCOUNTER

    Encounter/{id} added to Epic observations when the tool call omits encounter.

  • LASTEHR_PERFORMER

    Practitioner/{id} filed as legal authenticator on Oracle observations.

More from github.com/cbetz

More MCP servers