Last EHR — Medplum logo

Last EHR — Medplum

Read-only-by-default MCP tools for searching Medplum patients and reading bounded FHIR chart context.

Install Last EHR — Medplum

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "last-ehr-medplum": {
      "command": "npx",
      "args": [
        "-y",
        "@lastehr/agent-write-conformance"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @lastehr/agent-write-conformance

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 25d ago.

Overview

Last EHR — Medplum MCP server gives MCP clients bounded, read-only-by-default access to Medplum patient and chart data over FHIR. Its tools search patients, show patient information, read filtered chart sections, and read documents; approved writes are available only through an opt-in elicitation flow. Use it when an agent needs patient context from a Medplum project without granting unrestricted chart mutations.

Use cases

  • Search Medplum patients by name
  • Read bounded FHIR chart sections
  • Give an agent patient context
  • Review proposed chart writes before approval

Key features

  • Patient search over Medplum FHIR data
  • Patient information and chart-section reads
  • Document retrieval
  • Reference-aware chart context
  • Human-approved write proposals
  • Explicit reporting of bounded or refused reads

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

5/5 checks healthy over the last 35d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1h ago via OSV.dev · @lastehr/agent-write-conformance (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
npm downloads16Package downloads in the last 30 days.
Last commit14d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Last EHR — Medplum works

What Last EHR — Medplum does

Last EHR — Medplum provides an MCP interface for reading patient records from a Medplum-backed FHIR EHR. It is an agent layer rather than an EHR or system of record: data remains in the connected FHIR backend, and the service does not store its own copy of protected health information.

The default MCP surface is read-only. Agents can search for patients, display patient information, inspect a bounded chart section with filters, and retrieve a document. The implementation is designed to report safety-relevant conditions instead of implying that a record is absent. For example, it can indicate when a read window was capped, a reference lookup was declined, or a code filter found no matches in a section that contains records.

The Last EHR — Medplum MCP server belongs in the Biology, Medicine and Bioinformatics category and is intended for patient-context workflows that need structured FHIR-backed reads.

How it works

MCP tools call the connected FHIR API. For authenticated use, Medplum supplies the project context, authentication, tenancy, and access control. Last EHR does not replace Medplum’s Project, ProjectMembership, or AccessPolicy model; the connected token and Medplum policy determine what the agent can access.

The chart-reading surface covers 25 of the 27 readable US Core 9.0.0 resource types across 23 patient-scoped sections. References can be followed so related authors, encounters, and provenance are not left as unresolved identifiers. Unsupported filters are rejected with the permitted values rather than silently ignored.

Writes are not part of the default read flow. When enabled, the agent proposes an exact FHIR resource, a human makes an explicit decision, and only an approved proposal is committed. MCP write proposals use elicitation to obtain that decision. This approval boundary prevents an agent from directly saving a change, but it does not verify that the proposed clinical content is correct.

Setup and configuration

Install and initialize the MCP package with npx -y @lastehr/mcp init --client claude-code, then configure a least-privilege Medplum token before connecting to a real project. The repository also provides a local MCP demo using a synthetic HAPI FHIR stack; that path is intended for fixture data and does not require FHIR or Medplum credentials.

The local lab is restricted to synthetic fixture patients. It is useful for inspecting the MCP read surface, but it is not generic HAPI support and is not a path for handling PHI. The project describes Last EHR as early and alpha, so APIs, structure, and scope may change.

Tools and capabilities

  • Search patients with search_patients.
  • Display patient context with show_patient_info.
  • Read a filtered chart section with read_chart_section.
  • Retrieve a document with read_document.
  • Enable elicitation-gated write proposals for approved changes.
  • Preserve bounded-read signals such as capped windows and refused filters.

Limitations and notes

Last EHR — Medplum is not a charting application, Medplum replacement, or system of record. It is a thin tool layer over a FHIR backend. Authenticated Medplum deployments are supported; the repository also identifies HAPI FHIR, Firely Server, Aidbox, and Oystehr adapters for synthetic evaluation, while other FHIR R4 backends require an adapter.

Use synthetic data while evaluating the project. The approval gate is a human review boundary, not a clinical, authorization, compliance, or safety certification. Models may still propose incorrect or fabricated facts, and the reviewer remains responsible for examining each proposed write before approval.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Last EHR — Medplum

Last EHR — Medplum is an MCP server that connects AI clients to a Medplum project through its FHIR API. Its main tools search patients, show patient information, read filtered chart sections, and read documents. It is read-only by default, with optional human-approved write proposals through MCP elicitation.

Run `npx -y @lastehr/mcp init --client claude-code` to initialize the MCP package for Claude Code. Configure a least-privilege Medplum token before connecting to a real project. The repository also includes a local synthetic HAPI demo that does not require Medplum credentials.

Yes, Cursor is named as a supported MCP client configuration. The local MCP demo can print a Claude Code or Cursor configuration, and the server exposes the same bounded chart-reading tools to the client.

Yes, the MCP interface is read-only by default. Optional writes use elicitation-gated proposals: the agent shows the exact proposed resource, a human approves or denies it, and only an approved proposal is committed.

Medplum is supported for authenticated deployments. HAPI FHIR, Firely Server, Aidbox, and Oystehr are identified as verified adapters for synthetic evaluation; other FHIR R4 backends need an adapter before they are supported.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLast EHR — Medplum AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/last-ehr-medplum?style=directory)](https://allmcps.com/mcp/last-ehr-medplum)
HTML Embed
<a href="https://allmcps.com/mcp/last-ehr-medplum"><img src="https://allmcps.com/api/badge/last-ehr-medplum?style=directory" alt="Last EHR — Medplum on AllMCPs" /></a>