Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Last EHR — Medplum

MCP server by cbetz Community

Last EHR is an MCP server that lets an AI assistant read a FHIR chart and propose writes that a human must approve before anything is saved. It is aimed at developers and teams building agent workflows on FHIR backends, and it is in early alpha with synthetic data only.

  • Score 75
  • 4 stars
  • 122 a week
  • Apache-2.0
  • Updated

Install Last EHR — Medplum

Built from the published package, never by AI.

claude mcp add last-ehr-medplum -- npx -y @lastehr/mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Last EHR — Medplum in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the last-ehr-medplum block.

About

Last EHR is the agent layer for a headless FHIR EHR. It reads the chart across 25 of US Core 9.0.0's 27 readable resource types and follows references, and it reports when a read was capped or a lookup was refused. Every write is treated as a proposal. The human sees the exact resource, makes an explicit decision, and the approved content is committed and recorded. The gate follows a published draft protocol, Approval-Gated Agent Writes on FHIR, and a conformance suite tests implementations. The published package runs with a Medplum access token, or with a local no-auth HAPI FHIR stack for synthetic records. Experimental Epic and Oracle Health sandbox adapters are available behind a flag. The project is intended for developers and evaluators working with synthetic data. The source states it is not a clinical or compliance tool.

Written from the project's README and checked against it.

Tools it gives your assistant

  • Chart readsSearches patients, views a patient chart, and reads one filtered chart section.
  • Reference followingFollows references so authors, encounters, and provenance are returned with the read.
  • Approved writesProposes notes, observations, and follow-up tasks that save only after a human approves them.
  • Write conformance checkTests an MCP stdio server's approval gate with independent FHIR reads.
  • Connection checkRuns doctor --connect to check FHIR R4 metadata and a count-only Patient search.

What you need

  • Node.js 22.18+ or 24.2+
  • Docker daemon for the local HAPI stack
  • Medplum project and access token for the authenticated path
  • Model API key for a real agent
  • Epic or Oracle Health sandbox credentials for the experimental adapters
SettingNeededWhat it is
MEDPLUM_ACCESS_TOKENEnvironment variable, secretOptionalFHIR 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_IDEnvironment variableOptionalFHIR 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_SECRETEnvironment variable, secretOptionalFHIR 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_URLEnvironment variableOptionalFHIR 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_BACKENDEnvironment variableOptionalepic, 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_ADAPTERSEnvironment variableOptionalSet to 1 to enable LASTEHR_BACKEND epic, oracle, or smart.
LASTEHR_CLIENT_IDEnvironment variableOptionalSMART Backend Services client id. Not a secret.
LASTEHR_PRIVATE_KEYEnvironment variable, secretOptionalPKCS#8 PEM for SMART private_key_jwt. Never log it.
LASTEHR_PRIVATE_KEY_PATHEnvironment variableOptionalPath to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY.
LASTEHR_KEY_IDEnvironment variableOptionalJWT kid. Must match the public JWKS.
LASTEHR_JWKS_URLEnvironment variableOptionalhttps URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional.
LASTEHR_SCOPESEnvironment variableOptionalSpace-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration.
LASTEHR_FHIR_BASE_URLEnvironment variableOptionalFHIR base URL. Epic and Oracle default to their public sandboxes when unset.
LASTEHR_TOKEN_URLEnvironment variableOptionalSMART token URL. Epic and Oracle default to their public sandboxes when unset.
LASTEHR_ENCOUNTEREnvironment variableOptionalEncounter/{id} added to Epic observations when the tool call omits encounter.
LASTEHR_PERFORMEREnvironment variableOptionalPractitioner/{id} filed as legal authenticator on Oracle observations.

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • Find patients named Smith
  • Record a heart rate of 72 bpm for Maria Garcia
  • Show the chart for a synthetic patient

Good to know

  • Early alpha; APIs and scope will change.
  • Use synthetic data only. Not a clinical or compliance claim.
  • Epic and Oracle adapters stay behind LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1 and cannot delete sandbox writes.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Last EHR — Medplum

All alternatives →
Mirobody thetahealth
96

Standardizes lab test names to LOINC codes and units to UCUM, and symptoms and diagnoses to ICPC-3, offline and with no API key. Built for people who want their health records on their own machine and queryable by an AI agent over MCP.

AAA Local 1.9k
Ruview ruvnet
94

RuView is a WiFi sensing platform and MCP server that uses low-cost ESP32 sensors to detect people, breathing and heart rate. It is for developers and operators who want room sensing without cameras or wearables.

AAA Local 106k
tooluniversemims-harvard
90

ToolUniverse is an MCP server that gives AI assistants access to more than 2,700 scientific tools for life science, research and literature. It is aimed at AI scientists, researchers and developers building research systems.

AAA Local 1.8k
Mirobody thetahealth
90

Mirobody is a self-hosted engine that turns lab reports, wearable data and genetic files into a single health record. Its built-in MCP server lets an AI assistant query that record and trace each number back to its source file. It is for people who want their health data on their own machine.

AAA Local 1.9k
Scansci PDF Rimagination
88

ScanSci PDF gets academic papers for AI agents. Give it a DOI, arXiv ID, article link, reference list or research question, and it searches candidate sources and tries to fetch accessible full texts. It is for students, researchers and labs.

AAA Local 1.3k
Dsh Wensu hui-xu-ai
87

Searches CNKI and Web of Science through an MCP server, returning records with impact factors. It can also open a paper in the user's signed-in browser and read its full text. Built for researchers who want AI answers on science topics backed by the source article.

AAC Local 5k/wk

Compare with Mirobody, Ruview or tooluniverse

Last EHR — Medplum: common questions

How does the approval gate work?

The agent proposes a write and shows the exact resource. Nothing is saved until a human explicitly approves it, and the approved content is what gets committed.

Can I try it without an account?

The source describes a no-account local path that runs a HAPI FHIR stack with synthetic patients through Docker. The published package can also print client configuration without creating an account.

Which FHIR backends are supported?

Medplum is the supported backend for authenticated deployments. HAPI FHIR, Firely Server, Aidbox, and Oystehr are used for synthetic evaluation, and Epic and Oracle Health sandboxes are experimental.

How do I install Last EHR — Medplum?

In Claude Code run claude mcp add last-ehr-medplum -- npx -y @lastehr/mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Last EHR — Medplum the official server?

Last EHR — Medplum is a community project by cbetz, not verified by a company domain.

Is Last EHR — Medplum free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is Last EHR — Medplum safe to use?

It scores 75 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Last EHR — Medplum?

Similar MCP servers: Mirobody, Ruview, tooluniverse, Mirobody.

Does Last EHR — Medplum work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Last EHR — Medplum Install

Add to stack

Loading.