HL7 Tools — Parser, Validator, FHIR R4 Converter
About
Parse, explain, validate, generate, diff, and convert HL7 v2 messages. Supports versions 2.3-2.8 with 600+ CARISTIX field definitions. Bidirectional HL7 v2 to FHIR R4 conversion. 9 tools.
Details
- Author
- easysolutions906
- Downloads
- 361
- Categories
- Other
Jump to
- Parse raw HL7 v2 messages into JSON
- Explain messages with human-readable field descriptions
- Validate messages against 20+ message types
- Generate realistic test messages for common types
- Diff two HL7 messages field by field
- Convert HL7 v2 to FHIR R4 and back
- Look up segment/field definitions for versions 2.3–2.8
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
HL7 Tools — Parser, Validator, FHIR R4 ConverterCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install with npm install, then run in HTTP mode on port 3200 using npm run dev or in stdio mode for MCP clients using npm start. The server provides nine MCP tools (e.g., hl7_parse, hl7_validate, hl7_to_fhir) and a full REST API for each operation.
hl7_parse
Parse a raw HL7 v2 pipe-delimited message into structured JSON with named fields, data types, and descriptions. Supports versions 2.3 through 2.8.
hl7_explain
Parse an HL7 v2 message and return a human-readable explanation of every segment, field name, data type, and value. Great for understanding unfamiliar messages.
hl7_validate
Validate an HL7 v2 message: checks required segments for the message type, required fields, timestamp formats, and segment ordering. Returns issues with severity levels (error/warning/info).
hl7_generate
Generate a sample HL7 v2 message with realistic but fake test data. Supported types: ADT^A01, ADT^A08, ADT^A04, ORM^O01, ORU^R01, SIU^S12, MDM^T02, DFT^P03, VXU^V04
hl7_diff
Compare two HL7 v2 messages and return all differences: version, message type, segment additions/removals, and field-level changes with named fields.
hl7_to_fhir
Convert an HL7 v2 message to a FHIR R4 Bundle. Maps PID->Patient, PV1->Encounter, DG1->Condition, OBX->Observation, OBR->DiagnosticReport, AL1->AllergyIntolerance, IN1->Coverage, RXA->Immunization, ORC->ServiceRequest, MSH->MessageHeader.
fhir_to_hl7
Convert a FHIR R4 Bundle back to an HL7 v2 message. Maps Patient->PID, Encounter->PV1, Condition->DG1, Observation->OBX.
hl7_segments
List all known HL7 v2 segments with their field counts. Use to discover available segments for a given version.
hl7_field_info
Look up a specific HL7 field definition by segment and field number. Returns the field name, data type, optionality, repetition, and description. Example: segment="PID", field=3 returns "Patient Identifier List".
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"hl7 tools \u2014 parser, validator, fhir r4 converter": {
"hl7": {
"command": "npx",
"args": [
"-y",
"@easysolutions906/hl7-tools"
]
}
}
}
}
McpServers
{
"hl7": {
"command": "npx",
"args": [
"-y",
"@easysolutions906/hl7-tools"
]
}
}
HL7 Tools — MCP Server + REST API
HL7 v2.x parser, viewer, validator, test message generator, and FHIR R4 converter.Features
- Parse raw HL7 v2 pipe-delimited messages into structured JSON with named fields - Explain messages with human-readable field descriptions (CARISTIX-style) - Validate messages against segment/field requirements for 20+ message types - Generate realistic test messages for ADT, ORM, ORU, SIU, MDM, DFT, VXU - Diff two HL7 messages to find field-level differences - Convert HL7 v2 to FHIR R4 Bundles (10 resource mappings) - Convert FHIR R4 Bundles back to HL7 v2 - Look up any segment or field definition across versions 2.3–2.8Supported Segments (20 with full definitions)
MSH, EVN, PID, PD1, NK1, PV1, PV2, IN1, GT1, DG1, ORC, OBR, OBX, AL1, SCH, NTE, FT1, PR1, RXA, RXEQuick Start
``bash
npm install
npm run dev # HTTP mode on port 3200
npm start # stdio mode (for MCP clients)
`
MCP Tools
| Tool | Description |
|------|-------------|
| hl7_parse | Parse HL7 v2 message to structured JSON |
| hl7_explain | Human-readable explanation of every field |
| hl7_validate | Validate message structure and required fields |
| hl7_generate | Generate sample messages with fake data |
| hl7_diff | Compare two messages field by field |
| hl7_to_fhir | Convert HL7 v2 to FHIR R4 Bundle |
| fhir_to_hl7 | Convert FHIR R4 Bundle to HL7 v2 |
| hl7_segments | List all segments and field counts |
| hl7_field_info | Look up a specific field definition |
REST API
`
POST /parse — Parse a message
POST /explain — Explain a message
POST /validate — Validate a message
POST /generate — Generate a test message
POST /diff — Diff two messages
POST /to-fhir — Convert HL7 to FHIR
POST /to-hl7 — Convert FHIR to HL7
GET /segments — List segments (?version=2.5.1)
GET /field — Field info (?segment=PID&field=3)
GET /health — Health check
GET / — API info
``Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



