{
  "$schema": "https://mcpkg.dev/schemas/install-manifest/v1.json",
  "name": "io.github.cbetz/last-ehr",
  "slug": "io.github.cbetz.last-ehr",
  "title": "Last EHR — Medplum",
  "summary": "FHIR chart tools for MCP: read-only by default, with elicitation-gated, human-approved writes.",
  "version": "0.5.6",
  "serverKey": "last-ehr",
  "pageUrl": "https://mcpkglabs.com/tool/io.github.cbetz.last-ehr",
  "installMdUrl": "https://mcpkglabs.com/tool/io.github.cbetz.last-ehr/install.md",
  "trust": {
    "score": 94,
    "grade": "A",
    "smokeStatus": "works",
    "status": "active",
    "verifiedAt": "2026-12-01T13:01:48.958000061Z"
  },
  "methods": [
    {
      "id": "npm",
      "label": "npm (npx)",
      "transport": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "--package=@lastehr/mcp@0.5.6",
        "lastehr-mcp"
      ],
      "clients": [
        {
          "client": "claude-code",
          "label": "Claude Code",
          "kind": "cli",
          "content": "claude mcp add last-ehr -- npx -y --package=@lastehr/mcp@0.5.6 lastehr-mcp"
        },
        {
          "client": "claude-desktop",
          "label": "Claude Desktop",
          "kind": "json",
          "location": "claude_desktop_config.json",
          "content": "{\n  \"mcpServers\": {\n    \"last-ehr\": {\n      \"args\": [\n        \"-y\",\n        \"--package=@lastehr/mcp@0.5.6\",\n        \"lastehr-mcp\"\n      ],\n      \"command\": \"npx\"\n    }\n  }\n}"
        },
        {
          "client": "cursor",
          "label": "Cursor",
          "kind": "json",
          "location": "~/.cursor/mcp.json",
          "content": "{\n  \"mcpServers\": {\n    \"last-ehr\": {\n      \"args\": [\n        \"-y\",\n        \"--package=@lastehr/mcp@0.5.6\",\n        \"lastehr-mcp\"\n      ],\n      \"command\": \"npx\"\n    }\n  }\n}"
        },
        {
          "client": "vscode",
          "label": "VS Code",
          "kind": "json",
          "location": ".vscode/mcp.json",
          "content": "{\n  \"servers\": {\n    \"last-ehr\": {\n      \"args\": [\n        \"-y\",\n        \"--package=@lastehr/mcp@0.5.6\",\n        \"lastehr-mcp\"\n      ],\n      \"command\": \"npx\",\n      \"type\": \"stdio\"\n    }\n  }\n}"
        },
        {
          "client": "codex",
          "label": "Codex CLI",
          "kind": "toml",
          "location": "~/.codex/config.toml",
          "content": "[mcp_servers.last-ehr]\ncommand = \"npx\"\nargs = [\"-y\", \"--package=@lastehr/mcp@0.5.6\", \"lastehr-mcp\"]"
        }
      ],
      "requires": [
        "Node.js 18+"
      ]
    }
  ],
  "env": [
    {
      "name": "MEDPLUM_ACCESS_TOKEN",
      "required": false,
      "secret": true,
      "description": "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).",
      "help": "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).",
      "placeholder": "<MEDPLUM_ACCESS_TOKEN>"
    },
    {
      "name": "MEDPLUM_CLIENT_ID",
      "required": false,
      "secret": false,
      "description": "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).",
      "help": "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).",
      "placeholder": "<MEDPLUM_CLIENT_ID>"
    },
    {
      "name": "MEDPLUM_CLIENT_SECRET",
      "required": false,
      "secret": true,
      "description": "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).",
      "help": "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).",
      "placeholder": "<MEDPLUM_CLIENT_SECRET>"
    },
    {
      "name": "MEDPLUM_BASE_URL",
      "required": false,
      "secret": false,
      "description": "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).",
      "help": "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).",
      "placeholder": "<MEDPLUM_BASE_URL>"
    },
    {
      "name": "LASTEHR_BACKEND",
      "required": false,
      "secret": false,
      "description": "epic, oracle, or smart. Requires LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1. Sandbox writes are approval-gated and persist because those sandboxes do not support delete.",
      "help": "epic, oracle, or smart. Requires LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS=1. Sandbox writes are approval-gated and persist because those sandboxes do not support delete.",
      "placeholder": "<LASTEHR_BACKEND>"
    },
    {
      "name": "LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS",
      "required": false,
      "secret": false,
      "description": "Set to 1 to enable LASTEHR_BACKEND epic, oracle, or smart.",
      "help": "Set to 1 to enable LASTEHR_BACKEND epic, oracle, or smart.",
      "placeholder": "<LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS>"
    },
    {
      "name": "LASTEHR_CLIENT_ID",
      "required": false,
      "secret": false,
      "description": "SMART Backend Services client id. Not a secret.",
      "help": "SMART Backend Services client id. Not a secret.",
      "placeholder": "<LASTEHR_CLIENT_ID>"
    },
    {
      "name": "LASTEHR_PRIVATE_KEY",
      "required": false,
      "secret": true,
      "description": "PKCS#8 PEM for SMART private_key_jwt. Never log it.",
      "help": "PKCS#8 PEM for SMART private_key_jwt. Never log it.",
      "placeholder": "<LASTEHR_PRIVATE_KEY>"
    },
    {
      "name": "LASTEHR_PRIVATE_KEY_PATH",
      "required": false,
      "secret": false,
      "description": "Path to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY.",
      "help": "Path to the PKCS#8 PEM. Alternative to LASTEHR_PRIVATE_KEY.",
      "placeholder": "<LASTEHR_PRIVATE_KEY_PATH>"
    },
    {
      "name": "LASTEHR_KEY_ID",
      "required": false,
      "secret": false,
      "description": "JWT kid. Must match the public JWKS.",
      "help": "JWT kid. Must match the public JWKS.",
      "placeholder": "<LASTEHR_KEY_ID>"
    },
    {
      "name": "LASTEHR_JWKS_URL",
      "required": false,
      "secret": false,
      "description": "https URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional.",
      "help": "https URL of the public JWKS. doctor checks that LASTEHR_KEY_ID is present. Optional.",
      "placeholder": "<LASTEHR_JWKS_URL>"
    },
    {
      "name": "LASTEHR_SCOPES",
      "required": false,
      "secret": false,
      "description": "Space-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration.",
      "help": "Space-delimited SMART scopes. Required for Oracle. Omit for Epic unless overriding the app registration.",
      "placeholder": "<LASTEHR_SCOPES>"
    },
    {
      "name": "LASTEHR_FHIR_BASE_URL",
      "required": false,
      "secret": false,
      "description": "FHIR base URL. Epic and Oracle default to their public sandboxes when unset.",
      "help": "FHIR base URL. Epic and Oracle default to their public sandboxes when unset.",
      "placeholder": "<LASTEHR_FHIR_BASE_URL>"
    },
    {
      "name": "LASTEHR_TOKEN_URL",
      "required": false,
      "secret": false,
      "description": "SMART token URL. Epic and Oracle default to their public sandboxes when unset.",
      "help": "SMART token URL. Epic and Oracle default to their public sandboxes when unset.",
      "placeholder": "<LASTEHR_TOKEN_URL>"
    },
    {
      "name": "LASTEHR_ENCOUNTER",
      "required": false,
      "secret": false,
      "description": "Encounter/{id} added to Epic observations when the tool call omits encounter.",
      "help": "Encounter/{id} added to Epic observations when the tool call omits encounter.",
      "placeholder": "<LASTEHR_ENCOUNTER>"
    },
    {
      "name": "LASTEHR_PERFORMER",
      "required": false,
      "secret": false,
      "description": "Practitioner/{id} filed as legal authenticator on Oracle observations.",
      "help": "Practitioner/{id} filed as legal authenticator on Oracle observations.",
      "placeholder": "<LASTEHR_PERFORMER>"
    }
  ],
  "expectedTools": [
    "search_patients",
    "show_patient_info",
    "read_chart_section",
    "read_document"
  ],
  "agentSteps": [
    "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."
  ],
  "generatedAt": "2026-12-01T13:01:48.958000061Z"
}
