What you can do
Ask an agent about your day
Drop the MCP config into your agent. Then ask things like “How did I sleep last week?” or “Was my Sunday tempo run faster at the same heart rate than last week’s?” — the agent calls the LAN endpoints and answers.
Share a workout to ChatGPT
Tap any workout → Share → ChatGPT. The receiving app gets the full columnar JSON, ~80 KB for a 30-minute run, byte-identical to what the LAN server returns.
POST workouts to a webhook
Configure a push endpoint in Settings. Tapping a workout’s Send to Endpoint POSTs the same JSON to your Home Assistant, n8n, or custom server.
Bulk export a date range
The Export tab packages workouts, sleep sessions, quantity series, and daily snapshots between two dates into one JSON file, then hands it to the iOS share sheet.
Why it exists
Apple HealthKit has no Apple-hosted API. If you want your data off the phone — for analysis, an agent, a coach, a backup, a dashboard — you need an app to read HealthKit and emit it. Most apps in this space invent their own JSON schema and convert units to user preference, which is lossy and not portable. HealthKite MCP’s design rules:- HealthKit-native field names. Every key in the JSON is Apple’s own identifier (
HKQuantityTypeIdentifierHeartRate,HKWorkoutActivityTypeRunning,HKMetadataKeyHeartRateMotionContext). Look them up in Apple’s docs; no app-specific vocabulary. - HealthKit-native units. Quantities stay in the unit HealthKit handed us — meters, kilograms, count/min, kcal. No “lb vs kg” conversion at the wire layer. Display units are a separate concern for the iOS UI only.
- Lossless. Per-sample resolution, no Min/Avg/Max bucketing, no aggregation tricks.
- Compact. Sample series use a columnar shape (
unit+ paralleltandvarrays) that’s ~10x smaller than per-sample-dict JSON without losing a single value. - Read-only. No writes back into HealthKit. The app cannot mutate your data.
- No backend. The server lives on your phone. No cloud, no telemetry, no account. Your iPhone is the API.
How it’s built
Three pieces:- HealthKite MCP iOS app — Swift / SwiftUI, native HealthKit integration. Hosts the LAN server while in the foreground. Closed-source (for now), but the wire format and MCP integration are fully documented and reproducible.
- Authenticated LAN transport — Bonjour/mDNS discovery plus a
NWListenerHTTP/1.1 endpoint protected by TLS-PSK. The pairing secret is never sent as a bearer token. healthkite-mcp— Rust MCP server, MIT-licensed, public on GitHub. Stdio transport, installed with Cargo on the same machine as your agent.
Next steps
Quickstart
Toggle on the LAN server, install the MCP, and ask your first agent question — in under 3 minutes.
Wire format
The design rules behind the JSON shape: HealthKit-native vocabulary, columnar samples, hoisted provenance.
API reference
Every endpoint with request shape and response shape.
MCP integration
The canonical config block for Claude Code, Codex, Cursor, and other MCP-aware harnesses.