health-md-standard

EIR Healthcare Viewer MCP Server

Model Context Protocol (MCP) server for viewing and analyzing EIR (Electronic health Information Record) files in AI conversations.

Overview

This MCP server allows users to load .eir healthcare files directly into any MCP-compatible AI application (Claude Desktop, ChatGPT, etc.) and have natural conversations about their health data.

Features

Quick Start

Installation

npm install -g eir-mcp-server
# or
pip install eir-mcp-server

Configuration

Add to your MCP client (Claude Desktop, etc.):

{
  "mcpServers": {
    "eir-healthcare": {
      "command": "eir-mcp-server",
      "args": []
    }
  }
}

Usage

  1. Load EIR file: โ€œLoad my healthcare data from patient-2024.eirโ€
  2. Query data: โ€œWhat medications am I currently taking?โ€
  3. Analyze trends: โ€œHow has my HbA1c changed over time?โ€
  4. Get insights: โ€œWhat are my main health risks?โ€

MCP Tools

load_eir_file

Load an EIR healthcare file into the conversation context.

Parameters:

Returns:

query_medications

Get current medications and treatment details.

Parameters:

query_lab_results

Retrieve lab results with filtering options.

Parameters:

query_conditions

Get medical conditions and diagnoses.

Parameters:

analyze_timeline

Generate clinical timeline and care journey analysis.

Parameters:

validate_eir_file

Validate EIR file format and content.

Parameters:

generate_summary

Create comprehensive health summary for AI analysis.

Parameters:

Example Conversations

Loading and Basic Queries

User: Load my healthcare data from ~/health/birger-2024.eir

AI: I've loaded your healthcare data (privacy level: pseudonymized). I can see:
- 2 active medical conditions (Type 2 Diabetes, Hypertension) 
- 2 current medications (Metformin, Lisinopril)
- Recent lab results showing excellent diabetes control (HbA1c: 6.8%)
- 15 clinical events over the past year

What would you like to know about your health data?

User: How is my diabetes management going?

AI: Your diabetes management is going exceptionally well! Here's what I see:

**Blood Sugar Control:**
- HbA1c improved dramatically: 8.2% โ†’ 6.8% (now at target <7%)
- Latest fasting glucose: 118 mg/dL (near normal range)
- Trend: Consistently decreasing since starting metformin

**Treatment Response:**
- Metformin 500mg twice daily - excellent adherence (90%+)
- No reported side effects
- 7kg weight loss since diagnosis (78kg current)

**Key Achievements:**
โœ… Met HbA1c target in just 4 weeks
โœ… Sustainable weight loss
โœ… No hypoglycemic episodes
โœ… Good blood pressure control

Your endocrinologist Dr. Smith noted "excellent response to lifestyle and metformin" at your last visit. Keep up the great work!

Trend Analysis

User: Show me how my lab values have changed over time

AI: Here's your lab trend analysis:

**Hemoglobin A1C (Diabetes Control):**
๐Ÿ“‰ Dec 2023: 8.2% (diagnostic)
๐Ÿ“‰ Jan 2024: 7.4% (improving) 
๐Ÿ“‰ Feb 2024: 6.8% (target achieved!)
Trend: -1.4% in 2 months (excellent improvement)

**Blood Pressure:**
๐Ÿ“‰ Aug 2023: 158/96 (high, pre-treatment)
๐Ÿ“‰ Dec 2023: 145/88 (improving)
๐Ÿ“‰ Feb 2024: 126/78 (well controlled)
Trend: 32/18 mmHg reduction (great response to lisinopril)

**Weight Management:**
๐Ÿ“‰ Oct 2023: 85kg (BMI 31.2)
๐Ÿ“‰ Feb 2024: 78kg (BMI 28.7)
Trend: -7kg in 4 months (sustainable pace)

**Clinical Insight:** Your multi-faceted approach (medication + lifestyle) is working excellently. All major health metrics trending in the right direction!

Risk Assessment

User: What should I be watching out for health-wise?

AI: Based on your health data, here are key areas to monitor:

**Immediate Priorities:**
1. **Cardiovascular Risk** - You have diabetes + controlled hypertension
   - Current LDL: 128 mg/dL (target <100 for diabetics)
   - Consider statin discussion with your doctor
   - Keep up excellent BP control (current: 126/78)

2. **Diabetes Complications Prevention**
   - Annual diabetic eye exam (scheduled โœ…)
   - Foot exams (last exam normal โœ…)
   - Kidney function monitoring (current eGFR >60 โœ…)

**Positive Factors:**
โœ… Excellent diabetes control (HbA1c 6.8%)
โœ… No medication side effects
โœ… Strong healthcare team (endocrinologist + primary care)
โœ… Good medication adherence

**Recommended Actions:**
- Continue current diabetes management
- Discuss cholesterol treatment at next visit
- Maintain weight loss momentum (goal BMI <25)
- Keep up regular monitoring schedule

**Red Flags to Watch For:**
- Frequent hypoglycemia episodes
- Rapid weight gain/loss
- Vision changes
- Foot injuries or numbness

Your proactive approach and excellent clinical response suggest low risk for complications. Keep doing what you're doing!

Privacy and Security

Privacy Levels

Security Features

GDPR/HIPAA Compliance

Swedish Healthcare Integration

1177 Vรฅrdguiden Support

Regional Integration

Development

Contributing

git clone https://github.com/BirgerMoell/eir-mcp-server
cd eir-mcp-server
npm install
npm run dev

Testing

# Run tests
npm test

# Test with sample EIR file
npm run test:sample

# Validate EIR files
npm run validate examples/*.eir

API Documentation

Full API documentation available at: https://docs.eir.space/mcp-server

Roadmap

Version 1.1 (Q2 2024)

Version 2.0 (Q3 2024)

Support


EIR MCP Server - Healthcare data that actually works with AI. ๐Ÿฅ๐Ÿค–๐Ÿ’™