Scan your whole stack
From OX Research Newsroom
Latest version: v0.5.6
Last EHR — Medplum was last scanned on 28 Nov 2026 at version 0.5.6. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.5.6 LATEST | 28 Nov 2026 | No rules fired |
| 0.5.5 | 17 Nov 2026 | No rules fired |
| 0.5.4 | 12 Nov 2026 | No rules fired |
| 0.5.3 | 12 Nov 2026 | Not shown |
| 0.5.2 | 11 Nov 2026 | Not shown |
Findings for v0.5.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.5.6; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Status: early / alpha. Synthetic data only. This is not a clinical or compliance claim. License: Apache-2.0.
Read the chart broadly. Write only what a human approved.
Agents read freely; every write waits for human approval.
claude mcp add lastehr --env FHIR_BACKEND=memory --env LASTEHR_MCP_WRITES=proposal -- npx -y @lastehr/mcp
npx -y @lastehr/mcp init --demo
The buttons install the config init --demo --client cursor prints: FHIR_BACKEND=memory, LASTEHR_MCP_WRITES=proposal, and npx -y pinned to the version that ran init. No account, token, or Docker. Approved writes vanish when the process exits. The Claude Code line sets the same variables.
Full setup for a backend you operate: Start here.
init without --demo prints a client configuration for a backend you operate and exits. It does not start a server, register the client, or contact a FHIR endpoint.
npx -y @lastehr/mcp init
npx -y @lastehr/mcp init --client claude-code
npx -y @lastehr/mcp init --client cursor
init accepts --client json (the default), claude-code, or cursor. A Medplum token, or this repository's local HAPI stack via FHIR_BACKEND=hapi and FHIR_BASE_URL, is below. Docker is required for HAPI; the first image pull can take several minutes.
Default output:
{
"mcpServers": {
"lastehr": {
"command": "npx",
"args": [
"-y",
"@lastehr/mcp"
],
"env": {
"MEDPLUM_ACCESS_TOKEN": "<replace-with-a-least-privilege-token>"
}
}
}
}
That JSON is stdout. On a terminal, stderr adds next steps: one read prompt, one write prompt that reaches the approval gate, https://github.com/cbetz/last-ehr, and https://github.com/cbetz/last-ehr/issues. LASTEHR_QUIET=1, CI=true, or a non-terminal stdout or stderr omits them. Those lines are not part of the configuration. The stdio server does not print them.
--client cursor adds "type": "stdio". --client claude-code prints
claude mcp add lastehr -- npx -y @lastehr/mcp plus comments. That
command does not set LASTEHR_MCP_WRITES. The generated command is pinned
to the version that ran init. The example above leaves that pin off.
Replace <replace-with-a-least-privilege-token>. doctor treats that
placeholder as a present access token and does not contact a server. Only
doctor --connect reaches a server.
The package engine range in packages/mcp/package.json is
^22.18.0 || >=24.2.0.
Set "LASTEHR_MCP_WRITES": "proposal" in env to enable the approval gate.
The write tools are add_note, record_observation,
record_superseding_observation, and create_task. They appear only in
clients that declare MCP elicitation (form; a bare elicitation capability
counts, and URL-only elicitation does not).
The in-process store at the top of this page needs no account and no Docker.
This repository's local HAPI stack is the other no-account backend. Set
FHIR_BACKEND=hapi and FHIR_BASE_URL or HAPI_BASE_URL. No Medplum
token. The stack has no auth, Compose binds it to loopback, and it is for
synthetic records only.
Node 22.18+ (or 24.2+) and a running Docker daemon:
git clone https://github.com/cbetz/last-ehr.git
cd last-ehr
npm install
npm run demo:local
demo:local starts HAPI and Postgres, seeds synthetic patients, and opens
the fixed walkthrough at http://localhost:3000/demo.
It does not create or read .env.local. The first image pull can take
several minutes. Press Ctrl-C to stop Next.js. npm run demo:local:down
removes the stack.
In the configuration init printed, replace the env block with:
"env": {
"FHIR_BACKEND": "hapi",
"FHIR_BASE_URL": "http://localhost:8080/fhir"
}
Keep the rest, including "type": "stdio" when --client cursor printed it.
Save it where the client reads MCP config (for Cursor,
~/.cursor/mcp.json or .cursor/mcp.json). With FHIR_BACKEND=hapi, the
server does not read MEDPLUM_*.
The Claude Code line does not carry those variables. Export them in the shell that launches Claude Code:
export FHIR_BACKEND=hapi
export FHIR_BASE_URL=http://localhost:8080/fhir
After HAPI is up, this check prints no patient records:
FHIR_BACKEND=hapi FHIR_BASE_URL=http://localhost:8080/fhir npx -y @lastehr/mcp doctor --connect
doctor --connect checks FHIR R4 metadata and a count-only Patient
search. It does not check other resource permissions, writes, or a client's
approval UI.
npm run mcp:demo is a separate checkout-only lab, outside the
@lastehr/mcp package. It exposes search_patients and
show_patient_info for four fixture patients. See the
MCP guide.
Local stack failures: Troubleshooting the local lab.
Last EHR can be the approval gate in front of the Epic FHIR sandbox and the
Oracle Health secure sandbox. The human sees the Observation those servers
accepted (Epic flowsheet code plus encounter, Oracle legal-authenticator
performer and an allowlisted vital), and the agent gets a read-back diff
after the save. Synthetic sandbox patients only. This is not a clinical or
compliance claim. The adapters stay behind
LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1 because those sandboxes do not
support delete: an approved write persists, and the safety eval cannot
clean up. Ten-minute setup is in
docs/adapters/epic-cerner.md.
export LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1
export FHIR_BACKEND=epic
export LASTEHR_CLIENT_ID='your-non-production-client-id'
export LASTEHR_PRIVATE_KEY_PATH="$PWD/lastehr-sandbox.pem"
export LASTEHR_KEY_ID='lastehr-epic-1'
export LASTEHR_ENCOUNTER='Encounter/eMT95RPaM-HxLc3NeIA5qlQ3'
Then ask: Record a heart rate of 72 bpm for patient erXuFYUfucBZaryVksYEcMg3.
The card shows flowsheet code 8 and LOINC 8867-4 before anything is
saved. Oracle uses FHIR_BACKEND=oracle-health, LASTEHR_SCOPES, and an
oral temperature (8331-1) with LASTEHR_PERFORMER.
Those sandboxes are in the published @lastehr/mcp package.
npx -y @lastehr/mcp init --backend epic
npx -y @lastehr/mcp init --client claude-code --backend oracle
npx -y @lastehr/mcp doctor
init --backend epic or oracle prints placeholder env
(LASTEHR_BACKEND, LASTEHR_CLIENT_ID, LASTEHR_PRIVATE_KEY_PATH,
LASTEHR_KEY_ID, LASTEHR_JWKS_URL, and LASTEHR_ENCOUNTER or
LASTEHR_PERFORMER plus LASTEHR_SCOPES for Oracle) and the setup steps.
doctor checks the key, JWKS kid, token exchange, granted scopes, and
search scope without printing secrets. npx tsx scripts/sandbox-proof
stays a checkout script; the published CLI does not include it.
These are optional. The published MCP package and the local synthetic stack above are the first path.
| Goal | Start here |
|---|---|
| Test an MCP (stdio) implementation of the write protocol | npx @lastehr/agent-write-conformance — conformance guide |
| Have an assistant draft synthetic work, then review it separately | npm run work:demo — Assistant Work Lab. Add --agent --model-env .env.local only when a model key is already configured. |
| Connect an external MCP assistant to durable synthetic work | Work MCP connector: npm run --silent work:mcp -- --print-config |
| Deploy the web app | Quickstart: Vercel, with your own Medplum project and model key |
| Run the web app locally | Quickstart: Medplum, or npm run demo:local for the fixed synthetic walkthrough |
| Open the hosted synthetic demo | https://www.lastehr.com/demo — no sign-up. Ask Find patients named Smith, then Record a heart rate of 72 bpm for Maria Garcia, and inspect the approval card before anything is saved. |
| Read the protocol | Approval-Gated Agent Writes on FHIR, v0.1 draft |
| See the FHIR read surface | FHIR coverage |
| Inspect two read-only tools on four fixture patients | npm run mcp:demo -- --client claude-code from a checkout. Not the published package. |
| Connect native Grok Bot to synthetic work | Grok Bot with Last EHR |
| Deploy a dedicated synthetic Work service | Hosted Synthetic Work |
| Run the synthetic safety-mechanics check | npm run eval — evaluation guide. This checks proposal, approval, denial, and cleanup mechanics. |
Read the chart broadly. Write only what a human approved. Last EHR is the agent layer for a headless FHIR EHR. It does three things, and the write protocol is only one of them.
It reads the chart broadly. 25 of US Core 9.0.0's 27 readable resource types, across 23 patient-scoped sections, following references so authors, encounters, and provenance stop being dead pointers. Counted in the open, with the ceiling published rather than implied, in FHIR coverage.
It is built so the agent cannot fake an absence. "She has never had a flu shot" is the answer a chart agent must never invent, so a read reports when its window was capped, when a reference lookup was refused, and when a code filter matched nothing in a section that does hold records. Filters that a section cannot apply are refused with the legal values instead of silently dropped. These are safety-boundary tests, not best-effort behavior.
Every write is a proposal. Show the exact resource, require an explicit human decision, commit exactly what was reviewed, and record what created it. That half is a small protocol, Approval-Gated Agent Writes on FHIR (v0.1 draft): Proposal → Decision → Commit → Audit. Two implementations run here, a web approval card and MCP elicitation-gated write tools, plus a conformance suite that checks implementations with its own FHIR reads. Independent implementations and criticism are invited.
Five FHIR backends sit behind one interface. This repository is the reference implementation: bring your own FHIR backend and model key for a real agent (Medplum for the authenticated path, or any verified adapter for synthetic evaluation), or start with the zero-key local synthetic walkthrough.
Last EHR is a layer, not an EHR. It runs on top of a headless FHIR backend (Medplum for authenticated use; HAPI FHIR, Firely Server, Aidbox, or Oystehr for synthetic evaluation) and talks to it over the FHIR API. It is not the system of record and never bundles or forks the backend. The web agent has no separate chart database, but processes chart data and sends chart context to the configured model provider. The opt-in local Work Lab persists synthetic requests, run progress, proposals, and decisions. See the HIPAA deployment groundwork before planning a clinical deployment.
Status: early / alpha. APIs, structure, and scope will change. Use synthetic data only. · License: Apache-2.0
Try the live demo: no sign-up, synthetic data, and every write goes through the approval gate.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.