Skip to content
VS Code

Last EHR — Medplum for VS Code

io.github.cbetz/last-ehr

FHIR chart tools for MCP: read-only by default, with elicitation-gated, human-approved writes.

client:VS Code transport:stdio runtime:npm

Install Last EHR — Medplum in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "medplum-access-token",
      "description": "MEDPLUM_ACCESS_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "medplum-client-id",
      "description": "MEDPLUM_CLIENT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "medplum-client-secret",
      "description": "MEDPLUM_CLIENT_SECRET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "medplum-base-url",
      "description": "MEDPLUM_BASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-backend",
      "description": "LASTEHR_BACKEND",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-experimental-fhir-adapters",
      "description": "LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-client-id",
      "description": "LASTEHR_CLIENT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-private-key",
      "description": "LASTEHR_PRIVATE_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-private-key-path",
      "description": "LASTEHR_PRIVATE_KEY_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-key-id",
      "description": "LASTEHR_KEY_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-jwks-url",
      "description": "LASTEHR_JWKS_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-scopes",
      "description": "LASTEHR_SCOPES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-fhir-base-url",
      "description": "LASTEHR_FHIR_BASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-token-url",
      "description": "LASTEHR_TOKEN_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-encounter",
      "description": "LASTEHR_ENCOUNTER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lastehr-performer",
      "description": "LASTEHR_PERFORMER",
      "password": true
    }
  ],
  "servers": {
    "last-ehr": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@lastehr/mcp"
      ],
      "env": {
        "MEDPLUM_ACCESS_TOKEN": "${input:medplum-access-token}",
        "MEDPLUM_CLIENT_ID": "${input:medplum-client-id}",
        "MEDPLUM_CLIENT_SECRET": "${input:medplum-client-secret}",
        "MEDPLUM_BASE_URL": "${input:medplum-base-url}",
        "LASTEHR_BACKEND": "${input:lastehr-backend}",
        "LASTEHR_EXPERIMENTAL_FHIR_ADAPTERS": "${input:lastehr-experimental-fhir-adapters}",
        "LASTEHR_CLIENT_ID": "${input:lastehr-client-id}",
        "LASTEHR_PRIVATE_KEY": "${input:lastehr-private-key}",
        "LASTEHR_PRIVATE_KEY_PATH": "${input:lastehr-private-key-path}",
        "LASTEHR_KEY_ID": "${input:lastehr-key-id}",
        "LASTEHR_JWKS_URL": "${input:lastehr-jwks-url}",
        "LASTEHR_SCOPES": "${input:lastehr-scopes}",
        "LASTEHR_FHIR_BASE_URL": "${input:lastehr-fhir-base-url}",
        "LASTEHR_TOKEN_URL": "${input:lastehr-token-url}",
        "LASTEHR_ENCOUNTER": "${input:lastehr-encounter}",
        "LASTEHR_PERFORMER": "${input:lastehr-performer}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Last EHR — Medplum in other clients