Last EHR — Medplum
v0.5.6FHIR chart tools for MCP: read-only by default, with elicitation-gated, human-approved writes.
Values you need
| Variable | What it is | |
|---|---|---|
MEDPLUM_ACCESS_TOKEN | optional secret | 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 | optional | 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_SECRET | optional secret | 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 | optional | 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 | optional | 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 | optional | Set to 1 to enable LASTEHR_BACKEND epic, oracle, or smart. |
LASTEHR_CLIENT_ID | optional | SMART Backend Services client id. Not a secret. |
LASTEHR_PRIVATE_KEY | optional secret | PKCS#8 PEM for SMART private_key_jwt. Never log it. |
LASTEHR_PRIVATE_KEY_PATH | optional | Path to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY. |
LASTEHR_KEY_ID | optional | JWT kid. Must match the public JWKS. |
LASTEHR_JWKS_URL | optional | https URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional. |
LASTEHR_SCOPES | optional | Space-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration. |
LASTEHR_FHIR_BASE_URL | optional | FHIR base URL. Epic and Oracle default to their public sandboxes when unset. |
LASTEHR_TOKEN_URL | optional | SMART token URL. Epic and Oracle default to their public sandboxes when unset. |
LASTEHR_ENCOUNTER | optional | Encounter/{id} added to Epic observations when the tool call omits encounter. |
LASTEHR_PERFORMER | optional | Practitioner/{id} filed as legal authenticator on Oracle observations. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add last-ehr -- npx -y --package=@lastehr/mcp@0.5.6 lastehr-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"last-ehr": {
"args": [
"-y",
"--package=@lastehr/mcp@0.5.6",
"lastehr-mcp"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"last-ehr": {
"args": [
"-y",
"--package=@lastehr/mcp@0.5.6",
"lastehr-mcp"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"last-ehr": {
"args": [
"-y",
"--package=@lastehr/mcp@0.5.6",
"lastehr-mcp"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.last-ehr]
command = "npx"
args = ["-y", "--package=@lastehr/mcp@0.5.6", "lastehr-mcp"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: search_patients, show_patient_info, read_chart_section, read_document.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json