Last EHR — Medplum MCP Server

Read-only Medplum chart search and patient context for MCP clients.

Remote serverstreamable-httpGo

What is the Last EHR — Medplum MCP Server?

Read-only Medplum chart search and patient context for MCP clients.

The short version

Five FHIR backends sit behind one interface. This repository is the reference implementation: bring your own FHIR backend and model key for a real agent (Medplum for the authenticated path, or any verified adapter for synthetic evaluation), or start with the zero-key local synthetic walkthrough.

  • Authentication, multi-tenancy, and access control are delegated to your Medplum project (Project = tenant, ProjectMembership = user, AccessPolicy = RBAC). Last EHR doesn't reimplement any of that, and writes are bounded by your AccessPolicy

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Last EHR — Medplum MCP Server

{
  "mcpServers": {
    "last-ehr": {
      "command": "npx",
      "args": ["-y", "@lastehr/agent-write-conformance"],
      "env": {
        "OPENAI_API_KEY": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "MODEL_ID": "your-value",
        "NEXT_PUBLIC_MEDPLUM_BASE_URL": "your-value",
        "MEDPLUM_BASE_URL": "your-value",
        "MEDPLUM_CLIENT_ID": "your-value",
        "MEDPLUM_CLIENT_SECRET": "your-value",
        "NEXT_PUBLIC_MEDPLUM_GOOGLE_CLIENT_ID": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
OPENAI_API_KEYCredential the server authenticates with.Yes
ANTHROPIC_API_KEYCredential the server authenticates with.Yes
MODEL_IDConfiguration value read at startup.Optional
NEXT_PUBLIC_MEDPLUM_BASE_URLEndpoint or connection string the server talks to.Yes
MEDPLUM_BASE_URLEndpoint or connection string the server talks to.Yes
MEDPLUM_CLIENT_IDConfiguration value read at startup.Optional
MEDPLUM_CLIENT_SECRETCredential the server authenticates with.Yes
NEXT_PUBLIC_MEDPLUM_GOOGLE_CLIENT_IDConfiguration value read at startup.Optional

Frequently asked questions

Read-only Medplum chart search and patient context for MCP clients. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.