Your Apple Health record, as a database your AI agents can query

HealthSQL is an iPhone app and a command-line tool that copy your whole Apple Health record into a local SQLite database on your computer, so AI agents can query it with SQL or MCP.

Read the setup guide

HealthSQL is not on the App Store yet. This page will link to it on the day it is.

Updated

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

  1. 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.
  2. iCloud Drive brings those files to your Mac, signed in to the same Apple Account. HealthSQL has no server; the files go nowhere else.
  3. 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.
  4. 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.

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

The limits

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.