npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lastehr/mcp

v0.3.1

Published

FHIR chart tools for MCP clients: read-only by default, with an opt-in elicitation-gated write profile where a human approves each proposed write.

Downloads

1,063

Readme

@lastehr/mcp

FHIR chart tools for MCP clients, over a Medplum project or the Last EHR repository's local HAPI evaluation stack (FHIR_BACKEND=hapi, synthetic data only).

Read-only by default, and the reads are the same ones the Last EHR web agent uses: search patients, show a whole chart, read any of 23 patient-scoped chart sections with filters, and read a document's text. One opt-in, LASTEHR_MCP_WRITES=proposal, adds elicitation-gated write proposals a human approves per action. Nothing is ever saved without that explicit approval, and the write tools are hidden from clients that cannot render approvals.

The registry metadata lives in server.json and is published alongside each verified npm release.

Install

npx -y @lastehr/mcp init

The command prints a portable MCP configuration. For Claude Code, print the registration command instead:

npx -y @lastehr/mcp init --client claude-code

Start the stdio server with:

npx -y @lastehr/mcp

Check the installed package version without configuring a backend:

npx -y @lastehr/mcp --version

Configuration

Set one authentication method before starting the server:

MEDPLUM_ACCESS_TOKEN=...

or:

MEDPLUM_CLIENT_ID=...
MEDPLUM_CLIENT_SECRET=...

Set MEDPLUM_BASE_URL for a self-hosted Medplum deployment. For the repository's local no-auth HAPI stack, set FHIR_BACKEND=hapi and FHIR_BASE_URL (or HAPI_BASE_URL) instead — local, synthetic data only. Run npx -y @lastehr/mcp doctor to validate configuration without starting MCP.

Safety boundary

By default the package exposes search_patients, show_patient_info, read_chart_section, and read_document, all with the MCP readOnlyHint.

Those reads share one implementation with the web agent, which is deliberate: each of their honesty properties came from a real false negative found against a live FHIR server, and a second implementation would have re-earned them. A reply tells you what it could not see, and an empty result is never proof of absence:

| Field | Meaning | | --- | --- | | truncated | The server's window came back full, so older records may exist beyond what was read. Measured at the window, not at the row count. | | codeFilterUnmatched | The section does hold records; none of them carry the code you filtered by. Text-only CodeableConcepts cannot match a coded search. | | includeUnsupported | The backend refused the reference lookup. Not the same as there being no references. | | unreadable (documents) | The document exists and its contents were not read: a scan, or a body stored as a pointer rather than inline. |

Chart free text arrives wrapped in <chart_text> tags. That content is data, never instructions. read_document decodes an inline text attachment and never dereferences Attachment.url, so it makes no request to an address the FHIR server chose.

With LASTEHR_MCP_WRITES=proposal it additionally offers add_note, record_observation, record_superseding_observation, and create_task as proposals: the exact fields are shown to the human through MCP elicitation and nothing is saved unless they approve; every approved write is tagged https://lastehr.com/mcp|approved-proposal and carries the standard AIAST security label ("Artificial Intelligence asserted") in meta.security, and LASTEHR_WRITE_PROVENANCE=true also emits a Provenance resource naming the agent as author and the reviewer as verifier. Read access can still return PHI. Use a least-privilege identity, review the MCP client's data handling and model-provider agreements, and never treat this package as an authorization layer.

See https://www.lastehr.com/docs/mcp for the complete setup and support boundary.