What that means in practice
- Workout activity type →
"HKWorkoutActivityTypeRunning", not"running". - Quantity sample type identifiers →
"HKQuantityTypeIdentifierHeartRate", not"hr"or"heart_rate". - Workout metadata keys →
"HKMetadataKeyIndoorWorkout","HKAverageMETs","HKWeatherTemperature"— verbatim from Apple’s metadata dictionaries. - Source revision shape → preserves Apple’s
HKSourceRevisionstructure (source.name,source.bundleIdentifier,version,productType,operatingSystemVersion). - Units → strings produced by
HKUnit.string(). Heart rate is"count/min", distance is"m", energy is"kcal". No conversion to user preference at the wire layer. - Dates → ISO 8601 UTC (
2026-05-09T16:11:50Z) at top levels; integer seconds offsets inside columnar sample arrays.
Why
Five reasons, in priority order:- Self-documenting. A consumer who doesn’t know HealthKite MCP can still parse the JSON by looking up
HKQuantityTypeIdentifierRunningPowerin Apple’s HealthKit documentation. Zero app-specific docs required. - Future-proof. When Apple ships a new workout activity type or quantity identifier next year, it just appears in the output with its canonical name. No HealthKite MCP release needed to “support” it.
- Legally clean. Field names are descriptions of Apple’s API surface, not borrowed from any competing product’s schema.
- Lossless. Without unit conversion, no rounding error. Without aggregation, every sample is preserved. Receivers do their own conversion or rollup if they want.
- Architecturally honest. The JSON is what HealthKit returned, with provenance hoisted to deduplicate. Nothing more, nothing less.
Anatomy of a workout
sampleEncoding: "columnar-v1"— see Columnar encoding.sourcesarray withsrcindices — see Provenance hoisting.workoutActivityTypeas the full Apple enum string — see above. We don’t shorten to"running".
What HealthKite MCP does NOT do
- We do not bucket heart rate into Min/Avg/Max per minute. The full per-sample series is preserved.
- We do not convert distance, weight, or temperature to user-preferred units. The iOS UI converts for display; the wire data stays in HealthKit-native units.
- We do not add derived metrics (sleep score, training load, time-in-zone). Receivers compute those if they want.
- We do not dedupe upstream data quality issues (e.g., a third-party app writing duplicate samples). What HealthKit gave us is what you get.
Comparison to Health Auto Export
Health Auto Export (HAE) is the paid commercial product in the same space. Different design choices:| HAE | HealthKite MCP | |
|---|---|---|
| Field names | invented (heartRateData, activeEnergy, walkingAndRunningDistance) | Apple’s (HKQuantityTypeIdentifierHeartRate, etc.) |
| Heart rate series | bucketed Min/Avg/Max | every raw sample |
| Units | converted to user pref (mi/km, lb/kg) | HealthKit-native always |
| Sample shape | per-sample dict (~250 B per sample) | columnar (~10 B per sample) |
| Typical 30-min run | ~1.2 MB | ~80 KB |
| License | closed | open MCP (MIT) |
| Cost | freemium | free |