Show HN: Apple Health MCP Server (github.com)
This is an MCP server to chat with Apple Health data. I built it because I'm working on (yet another) personal trainer tool that keeps track of my workout goals, etc. and does scheduling for me. Part of that is weekly check-ins. I thought pairing those check-ins with sensor data could be useful, so here we are.
It seems there isn't a way to automate access to Apple Health data, so this relies on an iOS app that can quickly/easily export key data to CSV. So the process at the moment is to export the data every Sunday before doing a check-in. More steps than I'd like, but in practice isn't a big lift.
Under the hood this is mostly a thin wrapper around duckdb.
There's a video of it in action here: https://x.com/realtron/status/1947710791521591514
26 comments
[ 7.3 ms ] story [ 58.4 ms ] threadI work on an iOS health app, and I'd love to try integrating this. It'd help eliminate the step of having to manually export to a CSV every Sunday.
Feel free to shoot me an email if you want to collaborate!
This was quite straightforward once you understand the permissions. I wonder why the OP didn’t do this and was instead using a simple health export CSV?
The main concern I had with releasing this or turning it into a tool was data security.
I have been swimming 1500m x 365 days of the year for the last 7 years. My use case was to build a personalised dashboard for my daily swimming and heart rate data to track detailed progress beyond what Apple offers. Having the ability to query this data with AI could be quite useful, rather than relying on manual reports.
Does it include health records (eg from Epic)?
if RubyLLM.with_tools(...).ask("Do my health metrics indicate I am stressed?") model = 'claude-4-opus' else model = 'claude-4-sonnet' end
For getting Apple Health data into duckdb, I’ve used this in the past: https://github.com/dogsheep/healthkit-to-sqlite. (You can load the SQLite database directly in duckdb.)
Looking at the code (and "for the future..." note about LLM generated queries), you cannot ask arbitrary questions? Is that correct?
I have a proof of concept here that turns the Apple Health export xml file into a timeseries .parquet that you can then load into clickhouse or duckdb.
https://github.com/atlaslib/atlas
I love the use of a notebook as an updating dashboard here. One of my demos before this MCP server was an evidence.dev dashboard.
All that said, I’ll try to add some examples to the readme.