Self-hosted · MCP server · open source
A personal health record your AI assistant can read safely
Health OS is an open-source, self-hosted personal health record. Your lab results, diagnoses, medications, wearable data and food log live in your own Postgres, and any MCP client, with a local model or a cloud assistant, works with them through 38 guarded tools. It is not a medical device and does not give medical advice.
A model should not decide what is dangerous
Letting an LLM read medical records is useful and risky. In Health OS the risky decisions are deterministic code the model cannot argue with: critical values, medication questions, crisis messages. Extracted data is only a draft until you approve it.
What Health OS does
Python · AGPL-3.0 licence · version 0.3.0
Lab results from PDF or photo
The model extracts values, Health OS normalises names and units, and the panel is staged as pending. Nothing counts as fact until you approve it.
Safety net in code
Critical values alert at once, drug-interaction questions are refused and sent to a doctor or pharmacist, and a crisis tool returns a fixed response with hotlines.
Trends and anomalies
Mann-Kendall trends with a slope per year, anomalies against your own baseline, a screening calendar, a weekly report and a brief for a doctor visit.
Food log
Meals with a 41-nutrient profile, share of daily needs, deficiency and excess flags, and meal templates.
Wearables
Imports from an Apple Health export and from Garmin.
38 MCP tools
Read tools query approved data only, write tools go into pending, and the safety rules are sent to every client on connect.
Local-first
Postgres 16 with pgvector on your own machine. A one-command Docker demo ships with a fictional patient.
Try the demo
git clone https://github.com/andronaft/health-os && cd health-os
make demo # throwaway database with a fictional patient, Docker only
Questions
Where is my health data stored?
In a Postgres database that you run yourself. Health OS does not send it anywhere; what your MCP client and its model see depends on the client you choose.
Does it work with local models?
It speaks standard MCP over stdio, so any MCP client can connect. The server is tested with the official MCP Python client; end-to-end runs with a local model are not verified yet.
Is Health OS a medical device?
No. It is not a medical device and does not give medical advice. Alerts and reminders are only a signal to contact a doctor.
Can the assistant tell me whether two drugs interact?
No. Drug-interaction questions are refused and redirected to a doctor or pharmacist. Only deterministic checks run, such as total daily paracetamol.
What licence is it under?
AGPL-3.0. You can run and modify it freely; a hosted service built on it must share its changes.
Read more
How and why I built it, and my other tools.