πŸ₯ MCP Server for AWS HealthLake (Mocked)

by anandkiran2007

312 downloads
Not rated
GitHub

Description

# πŸ₯ MCP Server for AWS HealthLake (Mocked) This project is an **open-source Model Context Protocol (MCP) server** that connects to (mocked) AWS HealthLake data sources and provides structured, standardized context bundles for clinical models. ## βœ… Features - Mocked AWS…

About

# πŸ₯ MCP Server for AWS HealthLake (Mocked) This project is an **open-source Model Context Protocol (MCP) server** that connects to (mocked) AWS HealthLake data sources and provides structured, standardized context bundles for clinical models. ## βœ… Features - Mocked AWS HealthLake APIs (FHIR-based) - Context bundling…

Details

Author
anandkiran2007
Downloads
312
Categories
Cloud Service

- Mocked AWS HealthLake APIs based on FHIR
- Context bundling per MCP spec (FHIR + NLP)
- Model registration and tailored context delivery
- Mocked model invocation endpoint
- Audit logging
- Optional USE_AWS flag for future AWS integration

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name πŸ₯ MCP Server for AWS HealthLake (Mocked)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, create a Python virtual environment, install dependencies with pip install -r requirements.txt, and run the server locally with uvicorn app.main:app --reload. By default the server runs in mock mode; set the environment variable USE_AWS=true to prepare for future AWS integration (AWS mode is not yet implemented). Access the interactive documentation at http://localhost:8000/docs.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83c\udfe5 mcp server for aws healthlake (mocked)": {
            "ahl-mcp-server": {
                "command": "python3",
                "args": [
                    "-m",
                    "venv",
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "ahl-mcp-server": {
        "command": "python3",
        "args": [
            "-m",
            "venv",
            "venv"
        ]
    }
}

πŸ₯ MCP Server for AWS HealthLake (Mocked)

This project is an open-source Model Context Protocol (MCP) server that connects to (mocked) AWS HealthLake data sources and provides structured, standardized context bundles for clinical models.

βœ… Features

- Mocked AWS HealthLake APIs (FHIR-based)
- Context bundling per MCP spec (FHIR + NLP)
- Model registration and tailored context delivery
- Mocked model invocation endpoint
- Audit logging
- Optional USE_AWS flag for future AWS integration

---

πŸš€ Quick Start

1. Clone or Download

unzip mcp-server.zip
cd ahl-mcp-server

2. Install Python Dependencies

python3 -m venv venv
source venv/bin/activate        # On Windows: venv\Scripts\activate
pip install -r requirements.txt

3. Run Locally (Mock Mode)

uvicorn app.main:app --reload

Visit: http://localhost:8000/docs

---

πŸ” Endpoints

πŸ“¦ MCP Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| /context/{patient_id} | GET | Get context bundle |
| /models/register | POST | Register model info |
| /models/{model_id}/context/{patient_id} | GET | Tailored context |
| /model/invoke/{model_id}?patient_id=... | POST | Mock model prediction |

πŸ§ͺ Mock HealthLake Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| /ahl/Patient | POST | Create patient |
| /ahl/Patient/{id} | GET | Get patient |
| /ahl/Condition?patient=... | GET | Get conditions |
| /ahl/MedicationRequest?patient=... | GET | Get meds |
| /ahl/Observation?patient=... | GET | Get labs |
| /ahl/mock/add_* | POST | Add mock data (condition/med/obs) |

---

βš™οΈ Switching Between Mock and AWS Mode

By default, the app runs in mock mode.

To prepare for future AWS integration:

export USE_AWS=true

Note: AWS mode is not implemented yet but ready for integration.

---

πŸ§ͺ Run Tests

pytest tests/

---

πŸ“‚ Folder Structure

app/
β”œβ”€β”€ api/                # API endpoints
β”œβ”€β”€ core/               # Config and logging
β”œβ”€β”€ fhir/               # Placeholder for FHIR connector
β”œβ”€β”€ models/             # Pydantic models
β”œβ”€β”€ nlp/                # NLP mock enhancer
β”œβ”€β”€ services/           # Context resolver, policy logic
β”œβ”€β”€ main.py             # FastAPI entry
infra/
tests/                  # Test cases
schemas/                # MCP JSON schema
.env
requirements.txt

---

πŸ“œ License

MIT License

---

🧠 Coming Soon

- AWS HealthLake integration (boto3)
- Amazon Comprehend Medical / Bedrock models
- Dockerfile + ECS deployment
- Real-time cohort search
- SMART-on-FHIR authentication

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.