π₯ MCP Server for AWS HealthLake (Mocked)
LocalAbout π₯ MCP Server for AWS HealthLake (Mocked)
An open-source MCP server that provides mocked AWS HealthLake and FHIR data for clinical models. It bundles structured context, supports model registration, and includes a mock invocation endpoint.
Key features
- 01Mocked AWS HealthLake FHIR APIs
- 02FHIR and NLP context bundles
- 03Model registration and tailored context
- 04Mock model invocation endpoint
- 05Audit logging
Use cases
- 01Testing clinical model workflows with mock patient data
- 02Registering models and retrieving tailored patient context
- 03Exercising model invocation and audit flows
MCP support
The MCP server exposes patient context bundles and model-related endpoints using mocked AWS HealthLake data. AWS integration is not yet implemented.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
We havenβt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ₯ 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_AWSflag 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.