Set up health4.ai: Google Sheet first, database if you want it
Your Apple Health data goes to a destination you own: a Google Sheet in your own Drive (the easiest option, a few minutes) or your own Supabase/Postgres database (about 15 minutes, for power users). health4.ai has no account and no server, and does not keep a copy.
Path: HealthKit on your iPhone → your Sheet or database → your AI in Claude, Claude Code, or Cursor. Full detail lives in docs/SETUP.md. Prefer a comparison first? See Apple Health MCP vs Health Auto Export.
The iOS app is free and live on the App Store: download it now.
Easy path: Google Sheet
- Download health4.ai and open it.
- Choose Save to Google Sheets and sign in with Google. The app creates one spreadsheet in your Drive with one row per day (steps, sleep, heart rate, HRV, workouts and more). It uses the
drive.filescope, so it only sees files it creates. - Allow Health access, then follow the in-app setup checklist. Sync History shows what was written and Your Sources lists every device and app writing to Health.
- Open the sheet in Google Drive. Share it with an AI assistant that has Google Drive access, or download it as CSV and give it to any AI assistant. Want your AI to query live data over MCP? Use the database option below.
Background sync is best-effort: iOS decides when the app runs, so tap sync in the app if you need fresh data now. If iOS shares only recent Health data, the app warns you.
Power users: your own database
Skip this checklist if the Google Sheet is enough. Use it when you want every HealthKit sample in Postgres, queryable by any MCP client.
- 1Create a Supabase project
Free tier at supabase.com. The database option needs Supabase Auth + Edge Functions: plain Postgres alone is not enough.
- 2Create the health tables
Paste and run health4.ai/schema.sql in the SQL editor. Do not use
supabase db pushon a fresh project. - 3Deploy the ingest function
git clone https://github.com/jefflitt1/health4ai.git cd health4ai supabase functions deploy healthkit-ingest --project-ref <ref> --no-verify-jwtAlso create your Auth user (Authentication → Users) and copy the UID.
- 4Install the iOS app and choose the database
Download health4.ai from the App Store. Once installed: enter Project URL + anon key, sign in, start sync.
- 5Install the local MCP server
cd health4ai/mcp-server pip install -r requirements.txt cp .env.example .env - 6Point MCP at your database
The app's Connect Your AI screen has copy-paste MCP config for Claude Desktop, Claude Code, and Cursor.
DATABASE_URL=postgresql://... # transaction pooler, database password HEALTHKIT_USER_ID=<your auth UID> - 7Connect Claude or Cursor
{ "mcpServers": { "health4ai": { "command": "python", "args": ["/path/to/health4ai/mcp-server/main.py"], "env": { "DATABASE_URL": "postgresql://...", "HEALTHKIT_USER_ID": "<your auth UID>" } } } }Claude Desktop / Claude Code config, or
~/.cursor/mcp.json. An npx one-liner is not published yet: clone + Python is the supported path. - 8Ask Claude for a health summary
In Claude Code run
/mcpand confirmhealth4aiis connected with 11 tools. Then ask: "Give me a health summary for the last 7 days." Tool reference: /mcp-tools.
Need more detail?
Full SETUP.md on GitHub → · Docs hub