Apple Health MCP
Lets your AI agent answer questions about your sleep, workouts, activity and heart data from a local Apple Health export.
575 stars on GitHubby neiltronLicense MITUpdated 2 months ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add apple-health -e HEALTH_DATA_DIR="<your value>" -- npx -y @neiltron/apple-health-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
HEALTH_DATA_DIR | Path to the Apple Health CSV export directory | Yes |
MAX_MEMORY_MB | Maximum memory usage in megabytes | No |
CACHE_SIZE | Maximum number of cached query results | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Show me my average sleep per night this month.
Give me a weekly health report for last week.
What it is
This server reads your Apple Health CSV export on your own computer and lets you query it with SQL through DuckDB. It offers schema discovery, analytical queries and weekly or monthly health summaries. It does not upload the export or make network requests.
What it can do
health_schema: discover tables, columns and unitshealth_query: run one DuckDB SELECT analytical statementhealth_report: weekly, monthly or custom health summary
When to use
- βΊWhen you want to see how your sleep changed over the last months
- βΊWhen you want a monthly summary of your workouts and activity
- βΊWhen you want to compare your resting heart rate over time
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
fitness-analyzerLets your agent analyze exercise data. It identifies patterns, assesses progress, and suggests personalized workouts, even linking with chronic disease data.mental-health-analyzerHelps your agent analyze mental health data and offer personalized advice. It can correlate information from sleep, exercise, and nutrition for a complete view.sleep-analyzerHelps your agent analyze sleep data. It identifies patterns, assesses quality, and suggests personalized improvements, correlating with other health data.Frequently asked questions
Is it free and open source?
Yes. It uses the MIT license.
Does my health data leave my computer?
The server does not upload it, but results returned to your MCP client may go to that client's model provider.
Which export format works?
Only the Simple Health Export CSV layout. The native export.xml is not supported.
How much memory does it use?
About 1 GiB covers a two-year export. The default limit is 2048 MB and can be raised with MAX_MEMORY_MB.
Is it medical advice?
No. The readme says reports summarize recorded data and are not medical advice.
Is it safe to expose on a network?
No. Run it through a local stdio MCP client only.
If it does not work
- βΊCheck that HEALTH_DATA_DIR points to the unzipped export folder with the CSV files.
- βΊStart with health_schema because table names depend on your export.
- βΊIf a large export fails with a memory error, raise MAX_MEMORY_MB.
5 new skills a week. 1 minute to read.