Show HN: Apple Health MCP Server
31–40 of 53 posts
Re: Show HN: Apple Health MCP Server
#32if RubyLLM.with_tools(...).ask("Do my health metrics indicate I am stressed?") model = 'claude-4-opus' else model = 'claude-4-sonnet' end
Re: Show HN: Apple Health MCP Server
#33I am once again wishing screen time data was in Apple Health :( Exporting that is even worse.
One could pretty easily wrap an MCP server around the ScreenTime activity SQLite database file on MacOS. You could use DuckDB like this server does. I’ve found good value in making purpose-build MCP servers like that with the general model: Data DuckDB MCP LLM With verbose description for the LLM of an “sql” tool endpoint for it to use to explore.
https://github.com/AgentDank/screentime-mcp
It's pretty crazy what it can do! I'll put examples once I can scrub personal info. But it has browsing history too. Sensitive data, so please be careful!!
Re: Show HN: Apple Health MCP Server
#34This is really cool - I recently worked on a tool that I installed on my iPhone, which extracts all health data nightly to CSV and then to a cloud database. 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 1…
Re: Show HN: Apple Health MCP Server
#35Re: Show HN: Apple Health MCP Server
#36Is there any type of advocacy or laws anywhere to push Apple to make data like this intercompatible?
Re: Show HN: Apple Health MCP Server
#37For 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.)
Re: Show HN: Apple Health MCP Server
#38There is a native export function in Health but it generates about 1-2 GB of XML per year, since the schema is extremely verbose, so it takes a while. On the other hand, it’s very literally self-describing. But no need for handing access to Health to more or less dubious apps. I also think you can „export“ select data points to „CSV“ using a ten step Shortcut. Might be quicker.
> But no need for handing access to Health to more or less dubious apps I mean, it's been vetted by Apple, right? If they did their job then it should be fine. This isn't the Play Store you're dealing with; it's the App Store. I kinda dig the "simple utility app that does one job well" format, tbh.
Re: Show HN: Apple Health MCP Server
#39Earlier quoted context omitted.
One could pretty easily wrap an MCP server around the ScreenTime activity SQLite database file on MacOS. You could use DuckDB like this server does. I’ve found good value in making purpose-build MCP servers like that with the general model: Data DuckDB MCP LLM With verbose description for the LLM of an “sql” tool endpoint for it to use to explore.
OK, I said it was easy and proved that by doing so in a few hours ;) I did have my sample code, but that was open source too. https://github.com/AgentDank/screentime-mcp It's pretty crazy what it can do! I'll put examples once I can scrub personal info. But it has browsing history too. Sensitive data, so please be careful!!
This morning I kept pushing and started getting Claude into an human-agentic loop of suggesting MCP tool description and pre-flight SQL changes (for views). I'd ask it a some MCP queries, have it examine the SQL mistakes (e.g. CoreData vs UNIX timestamps, tricky queries), then evolved it. Since the endpoint is SQL, it can generate SQL to generate better SQL....
I had some human intelligence in that (and surely at the outset), but right now mostly I'm building and restarting Claude Desktop, then prompting:
"i have integrated those changes. examine my habits of concurrent browsing. identify statistical patterns in the timing and correlation of the destinations. after you do that, look at the issues you had and present new tool descriptions and sql migration. test the sql migrations before final presentation"
Tool Desc: https://github.com/AgentDank/screentime-mcp/blob/main/intern...
SQL Migration : https://github.com/AgentDank/screentime-mcp/blob/main/intern...
Re: Show HN: Apple Health MCP Server
#40Looking at the code (and "for the future..." note about LLM generated queries), you cannot ask arbitrary questions? Is that correct?