# HealthSQL guides

Source: https://healthsql.app/guides · Updated 2026-11-30

Every page on this site, grouped by what you want to do. Each one answers one question and is dated.

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. For an agent, the same list is in [llms.txt](https://healthsql.app/llms.txt), and the setup steps are in [agents.md](https://healthsql.app/agents.md).

## Set up

- [Set up HealthSQL: iPhone, Mac and your AI agent](https://healthsql.app/setup): Install the iPhone app, run one command on your Mac, connect your agent. With a fix for every problem the healthsql command reports.
- [Apple Health MCP server for Claude, Codex and Cursor](https://healthsql.app/mcp): A local, read-only MCP server for your whole Apple Health record: two tools, SQL over SQLite, nothing on the network. Setup for every MCP client.
- [HealthSQL database schema: views, columns, example SQL](https://healthsql.app/docs/schema): Reference for the HealthSQL SQLite database: every view and column, the Health type behind each daily column, the raw tables, units and example queries.
- [HealthSQL export format (v1): the files in iCloud Drive](https://healthsql.app/docs/format): What the HealthSQL iPhone app writes to iCloud Drive: deflated JSON lines, one line per record, Health's daily totals, deletions and status.json.
- [HealthSQL help: common questions and answers](https://healthsql.app/help): Answers to common questions about HealthSQL: setup, freshness, which records are included, privacy, price, agents and removing it.

## Agents

- [Connect Claude to Apple Health: iPhone, Desktop, Code](https://healthsql.app/claude): Claude's Apple Health connection works only in the Claude iPhone app, in the US, on paid plans. How to give Claude Desktop and Claude Code your Health data.
- [Connect Apple Health to Claude Code: shell or MCP](https://healthsql.app/claude-code): Give Claude Code your whole Apple Health record. Install the healthsql command, then Claude runs SQL from the shell or over MCP. Steps and prompts.
- [Apple Health in Codex: MCP server or shell](https://healthsql.app/codex): Give OpenAI's Codex your Apple Health record: install the healthsql command, run healthsql connect codex, and Codex queries it with SQL over MCP or the shell.
- [Apple Health in Cursor: add the MCP server](https://healthsql.app/cursor): Give Cursor's agent your Apple Health record: healthsql connect cursor adds a local MCP server to ~/.cursor/mcp.json. Two read-only tools, SQL over SQLite.
- [Apple Health with a local model: LM Studio, Jan, Goose](https://healthsql.app/local-models): Use your Apple Health data with a model that runs on your Mac, so the rows never leave it. Which local apps speak MCP, and how to add the healthsql server.
- [Apple Health for an always-on agent on your Mac](https://healthsql.app/personal-agents): Give an agent that runs on your Mac all day, such as OpenClaw or Hermes Agent, your Apple Health record over MCP or the shell, kept current from your iPhone.

## Wearables

- [Oura data for AI agents, through Apple Health](https://healthsql.app/oura): Your AI agent can read what the Oura app writes to Apple Health: sleep stages, heart rate, steps, workouts. What Oura sends, what it keeps, and the SQL.
- [Garmin data for AI agents, through Apple Health](https://healthsql.app/garmin): Your AI agent can read what Garmin Connect writes to Apple Health: steps, sleep, heart rate, workouts and more. What Garmin sends, what it keeps, and the SQL.
- [WHOOP data for AI agents, through Apple Health](https://healthsql.app/whoop): Your AI agent can read what WHOOP writes to Apple Health: sleep, workouts, heart rate, resting heart rate, SpO2. What WHOOP sends, what it keeps, and the SQL.
- [Strava activities for AI agents: two routes](https://healthsql.app/strava): Strava has its own MCP connector for Claude and Gemini. Or read the activities Strava writes to Apple Health with SQL, next to the rest of your Health data.

## Your data

- [Let an AI agent read your sleep and HRV data](https://healthsql.app/sleep-hrv): Give an AI agent your Apple Health sleep stages, HRV and resting heart rate as SQL: one row per night, one row per day, with example queries it can run.
- [Apple Health data to CSV or a spreadsheet, one command](https://healthsql.app/apple-health-csv): Turn your Apple Health record into CSV for Excel, Numbers or Google Sheets with healthsql query --csv: daily totals, workouts or any SQL query.
- [A daily Apple Health note in Obsidian, by your agent](https://healthsql.app/obsidian): Have an AI agent write a daily health note in your Obsidian vault from your Apple Health data: a prompt to paste, the note it writes, and a daily run.
- [Get Apple Health data into a SQLite database](https://healthsql.app/apple-health-database): HealthSQL keeps your whole Apple Health record in a local SQLite file, current from your iPhone via iCloud Drive. Views, example SQL, export.xml compared.
- [Apple Health on a Mac: what Apple offers, what works](https://healthsql.app/apple-health-on-mac): Apple makes no Health app for the Mac, and Mac apps cannot read HealthKit. How to get your Health data onto a Mac for AI agents and SQL.
- [Does Apple Health have an API? HealthKit, explained](https://healthsql.app/apple-health-api): HealthKit, Apple's only API for Health data, works inside apps on iPhone, iPad and Watch, not on the web or a Mac. How to get a local API for your agents.
- [Export Apple Health data to your Mac automatically](https://healthsql.app/export-apple-health-automatically): Health wakes the HealthSQL app for new data; it writes to your iCloud Drive and your Mac reads it as SQLite. What automatic means on iOS, and other ways.

## Compare

- [HealthSQL vs Health Auto Export: features, price, MCP](https://healthsql.app/vs/health-auto-export): Health Auto Export sends Apple Health data to many places in many formats. HealthSQL keeps your whole record as a local SQL database for agents.
- [Health Auto Export alternatives, by what you need](https://healthsql.app/alternatives/health-auto-export): Alternatives to Health Auto Export for CSV files, workouts, Markdown notes, AI agents and self-hosted databases, with prices and how data reaches a computer.
- [HealthSQL blog: Apple Health data and AI agents](https://healthsql.app/blog/): Answers about Apple Health data and AI agents: double-counted steps, what ChatGPT Health and Claude don't reach, export.xml, automatic export on iOS.
- [HealthSQL privacy: your health data stays yours](https://healthsql.app/privacy): HealthSQL has no server and no account. Your Health records go to your own iCloud Drive, then to your computer. We never receive them.
