OpenEHR MCP Server

# openEHR MCP Server An MCP (Model Context Protocol) server designed to interface with openEHR REST APIs, specifically the EHRbase implementation.

Local serverstdioPython

What is the OpenEHR MCP Server?

openEHR MCP Server An MCP (Model Context Protocol) server designed to interface with openEHR REST APIs, specifically the EHRbase implementation. This server

Configuration

  • A working Docker installation * Python 3 (this project was built with python 3.12, earlier versions might work) * A Python virtual environment (pip, conda or uv) * Install the required dependencies in your Python environment:

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.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
openehr_template_listList all available openEHR templates from the EHRbase server
openehr_template_getRetrieve a specific openEHR template by its unique identifier
openehr_template_example_compositionGenerate an example openEHR composition based on a specific template
openehr_ehr_createCreate a new EHR in the system
openehr_ehr_getRetrieve an EHR by its ID
openehr_ehr_listList all available EHRs in the system
openehr_ehr_get_by_subjectGet an EHR by subject ID and namespace
openehr_composition_createCreate a new openEHR composition in the Electronic Health Record
openehr_composition_getRetrieve an existing openEHR composition by its unique identifier
openehr_composition_updateUpdate an existing openEHR composition in the Electronic Health Record
openehr_composition_deleteDelete an existing openEHR composition from the Electronic Health Record
openehr_query_adhocExecute an ad-hoc AQL query against the openEHR server

How to install the OpenEHR MCP Server

{
  "mcpServers": {
    "openEHR": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--network=host",
        "-e","EHRBASE_URL=http://localhost:8080/ehrbase/rest",
        "-e","EHRBASE_JSON_FORMAT=wt_flat",
        "ctodeakai/openehr-mcp-server:latest"
      ]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • A working Docker installation * Python 3 (this project was built with python 3.12, earlier versions might work) * A Python virtual environment (pip, conda or uv) * Install the required dependencies in your Python environment:
VariableDescriptionRequired
EHRBASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use OpenEHR to openehr template list.”
  • “Use OpenEHR to openehr template get.”
  • “Use OpenEHR to openehr template example composition.”

Frequently asked questions

An EHRbase server, an openEHR template uploaded to that server, and an existing EHR with its ID for compositions.