Your agent asks in SQL and gets Apple Health's own numbers back: steps, heart rate, HRV, sleep stages, workouts, weight and every other type Health records. It works with Claude Code, Codex, Claude Desktop, Cursor and any other agent that has a shell or speaks MCP. There is no server and no account: the files travel through your own iCloud Drive.
How it works
- On your iPhone, the HealthSQL app reads every record in Apple Health, with your permission, and writes it to the app's folder in your own iCloud Drive.
- iCloud Drive brings those files to your Mac, signed in to the same Apple Account. HealthSQL has no server; the files go nowhere else.
- On your Mac,
healthsql, one Python file, turns the files into a SQLite database at~/Library/Application Support/HealthSQL/health.db. Each command first reads any new files, so an answer is as fresh as the phone's last export. - Your agent runs
healthsql query "SELECT ..."from a shell, or calls the same thing over MCP from Claude Desktop, Cursor or another MCP client.
To set up the computer, give your agent this line, or follow the setup guide:
Set up HealthSQL on this computer so you can read my Apple Health data. Follow https://healthsql.app/agents.md and tell me what my record covers when you are done.What you can ask
Ask in your own words; the agent writes the SQL.
- "How has my resting heart rate changed since I started running in March?"
- "Do I sleep less on nights after I train late?"
- "My average steps per week this year, with the best and worst weeks."
- "Chart my VO2 max next to my long runs."
- "What was my average heart rate on each of my last ten rides?"
Daily numbers come from Apple Health's own daily totals, the numbers the Health app shows. When your Watch, your iPhone and a ring all count the same walk, Health counts it once, and so does HealthSQL. Read why a plain sum counts steps two or three times.
Price
- Free: the full export, each time you open the app.
- $14.99, once: the export runs by itself when Health has new data. One purchase through the App Store. No subscription, no account.
- The
healthsqlcommand is free. It is one file you can read before you run it: healthsql.
The limits
- iOS lets no app read Health while the iPhone is locked. New data reaches your Mac after you next unlock the phone. Automatic means soon after an unlock, not every minute. What automatic can mean on iOS.
- The first export takes minutes. Years of history can be millions of records. Keep the app open until it finishes; after that, each export carries only what is new.
- On iOS 27 you can share only the past 30 days. Then HealthSQL has only those 30 days, and the app says so. Choose "All Recorded Data and Future Data" to give it the whole record.
- Some records are not in the export: clinical records, medications, vision prescriptions, ECG voltages, heartbeat series and audiograms. ECG results (the classification and average heart rate) are in.
- It is not a Health app for the Mac. It has no charts. It gives your agents and SQL tools the data, and an agent can draw the chart.
- The rows your agent reads go to its model provider. The database stays on your Mac, but whatever an agent reads enters its context, so the company that runs the model (Anthropic, OpenAI or another) receives those rows. A model that runs on your Mac keeps them there.
Questions
Does HealthSQL see my health data?
No. HealthSQL has no server and no account, and we never receive your health data. Your records go from Health to the app's folder in your iCloud Drive, then to your Mac. Read the privacy page.
Which agents work with it?
Any agent that can run a command or start a local MCP server: Claude Code, Codex, Claude Desktop, Cursor and others. See the Apple Health MCP server guide.
Does it work outside the US?
Yes. Nothing in HealthSQL depends on your country. Claude's and ChatGPT's own Apple Health connections are US-only as of November 2026; what they do not reach.
What do I need?
An iPhone with iOS 18 or later, and a Mac signed in to the same Apple Account with iCloud Drive on and Python 3.9 or later. The setup guide has the steps.