Skip to content

HealthKite MCP

HealthKite MCP is an iOS app that turns your iPhone into a small read-only, authenticated LAN endpoint for your own Apple Health data. Run it on your home Wi-Fi, point an AI agent at it, and get clean HealthKit-native JSON back without a cloud backend.

It is free, the wire format is HealthKit-native (Apple’s own identifier vocabulary, no invented schema), and the companion MCP server is open-source under MIT — paste the config into Claude Code, Codex, Cursor, or any MCP-aware tool and ask your agent direct questions about your workouts, sleep, and vitals.

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.

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 + parallel t and v arrays) 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.

Three pieces:

  1. 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.
  2. Authenticated LAN transport — Bonjour/mDNS discovery plus a NWListener HTTP/1.1 endpoint protected by TLS-PSK. The pairing secret is never sent as a bearer token.
  3. healthkite-mcp — Rust MCP server, MIT-licensed, public on GitHub. Stdio transport, installed with Cargo on the same machine as your agent.
[ Claude Code / Codex / Cursor / ... ]
│ stdio (JSON-RPC)
healthkite-mcp (Rust, MIT)
│ Bonjour discovery + TLS-PSK
HealthKite MCP iOS app (LAN)
│ HealthKit
Apple HealthKit

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.