Apple Health MCP
Local-first MCP server that reads Apple Health export files (export.xml/zip) and exposes activity, sleep, HRV, and workout data to AI agents, keeping all data on your machine.
README
<!-- delx-wellness header v2 --> <h1 align="center">Apple Health MCP</h1>
<div align="center"> <img src="assets/banner.png" alt="Apple Health MCP — Apple Health MCP for AI agents" width="85%" /> </div>
<h3 align="center"> Give your AI agent your Apple Health activity, sleep, HRV and workouts — from your local export.zip.<br> Local-first MCP server — <strong>tokens never leave your machine</strong>. </h3>
<p align="center"> <a href="https://www.npmjs.com/package/apple-health-mcp-unofficial"><img src="https://img.shields.io/npm/v/apple-health-mcp-unofficial?style=for-the-badge&labelColor=0F172A&color=10B981&logo=npm&logoColor=white" alt="npm version" /></a> <a href="https://www.npmjs.com/package/apple-health-mcp-unofficial"><img src="https://img.shields.io/npm/dm/apple-health-mcp-unofficial?style=for-the-badge&labelColor=0F172A&color=0EA5A3&logo=npm&logoColor=white" alt="npm downloads" /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/LICENSE-MIT-22C55E?style=for-the-badge&labelColor=0F172A" alt="License MIT" /></a> <a href="https://wellness.delx.ai/connectors/apple-health"><img src="https://img.shields.io/badge/SITE-wellness.delx.ai-0EA5A3?style=for-the-badge&labelColor=0F172A" alt="Site" /></a> </p>
<p align="center"> <a href="https://github.com/davidmosiah/apple-health-mcp/stargazers"><img src="https://img.shields.io/github/stars/davidmosiah/apple-health-mcp?style=for-the-badge&labelColor=0F172A&color=FBBF24&logo=github" alt="GitHub stars" /></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/BUILT_FOR-MCP-7C3AED?style=for-the-badge&labelColor=0F172A" alt="Built for MCP" /></a> <a href="https://github.com/davidmosiah/delx-wellness-hermes"><img src="https://img.shields.io/badge/HERMES-one--command_setup-10B981?style=for-the-badge&labelColor=0F172A" alt="Hermes one-command setup" /></a> <a href="https://github.com/davidmosiah/delx-wellness"><img src="https://img.shields.io/badge/Apple%20Health-FA243C?style=for-the-badge&labelColor=0F172A&logoColor=white&logo=apple&logoColor=white" alt="Apple Health" /></a> </p>
⚡ One-command install with Delx Wellness for Hermes:
npx -y delx-wellness-hermes setup— preconfigures this connector and the other 8 in a dedicated Hermes profile.Or wire it standalone into Claude Desktop / Cursor / ChatGPT Desktop — see the install section below.
<!-- /delx-wellness header v2 -->
Local-first MCP server that reads your Apple Health export and exposes it to AI agents.
Unofficial project. Not affiliated with, endorsed by or supported by Apple Inc. Apple Health is a trademark of Apple Inc. This package reads exports you generate yourself from the Apple Health app.
No live HealthKit access. This connector reads
export.xml/export.zipfiles exported from your iPhone. A native iOS HealthKit bridge is a separate future component.
Built by David Mosiah for people who use Claude, Cursor, Hermes, OpenClaw or other MCP-compatible agents to think about long-term health and activity trends — without copy-pasting numbers from the Health app.
Part of Delx Wellness, a registry of local-first wellness MCP connectors.
If this connector helps your agent workflow, please star the repo. Stars make the project easier for other AI builders to discover and help Delx keep shipping local-first wellness infrastructure.
Why this exists
Apple Health is the most complete personal health dataset most people own — years of activity, heart rate, sleep, workouts, body measurements, even ECGs. But Apple does not expose a public cloud API. The data lives on the iPhone behind HealthKit, and the only practical way to bring it off-device today is the Health Export feature inside the Health app.
This package reads that export locally — either the raw export.xml, the unzipped folder, or the export.zip — and exposes Apple Health through the Model Context Protocol. No tokens, no OAuth, no cloud sync. The export never leaves your machine.
Setup in 60 seconds
1. Export your Apple Health data on iPhone:
Health app → tap your profile picture → Export All Health Data
Wait a few minutes. AirDrop or transfer the zip to this machine.
2. Configure and verify:
npx -y apple-health-mcp-unofficial setup --export-path /path/to/export.zip
npx -y apple-health-mcp-unofficial doctor
Or let the CLI find the newest local export in Downloads, Desktop or Documents, copy it into managed local storage, and save that path:
npx -y apple-health-mcp-unofficial setup --auto-import
Supported export paths:
/path/to/export.zip/path/to/apple_health_export/(unzipped folder)/path/to/export.xml(raw export file)
Keep it fresh — watch a folder (no macOS needed):
Apple Health is a manual export, so the usual pain is that your data goes stale the moment you stop re-running setup. Point the connector at a folder you drop new exports into:
npx -y apple-health-mcp-unofficial setup --watch-path /path/to/health-exports
Now every time you export from your iPhone and drop the new export.zip (or export.xml, or unzipped apple_health_export/) into that folder, the connector auto-promotes the newest one to be the active export — on server startup and live while it runs — and refreshes the cached summaries. You can also trigger a re-scan on demand with the apple_health_reimport tool. This is the cross-platform recurring-refresh path; a fully live HealthKit bridge still needs a native macOS/iOS component.
Then add this to your MCP client config:
{
"mcpServers": {
"apple_health": {
"command": "npx",
"args": ["-y", "apple-health-mcp-unofficial"]
}
}
}
For Claude Desktop, run setup --client claude --export-path /path/to/export.zip and the snippet is written for you.
Try it with your agent
Three things to ask first:
Use apple_health_connection_status to check setup, then run apple_health_daily_summary.
Give me a 5-line wellness brief for today.
Call apple_health_data_inventory first. What Apple Health signals and date ranges
are available in this export?
Call apple_health_weekly_summary with response_format=json. Compare steps,
sleep, workouts and heart signals across the last 7 days.
Use the apple_health_weekly_review prompt, days=14.
Find the biggest habit pattern and suggest one experiment.
Data availability
This package parses Apple Health exports from the Health app. When this README says raw, it means the upstream XML record fields — not raw HealthKit data.
| Data | Available | Notes |
|---|---|---|
| Activity (steps, distance, energy, exercise) | ✓ | Standard HKQuantityType records |
| Heart rate (resting + samples) | ✓ | Recorded HR samples and resting HR |
| Sleep analysis + sleep stages | ✓ | When iPhone/Watch logs sleep |
| Workouts + sport metadata | ✓ | All HKWorkout entries |
| Body measurements (weight, BMI, body fat) | ✓ | When the user logs them |
| HRV (SDNN) + breathing rate | ✓ | When Watch supports them |
| ECG records | ✓ (metadata) | Apple Watch ECG events; raw waveform requires PDF export |
| Live HealthKit access | — | Apple does not expose a public live API |
| iCloud Health sync | — | Not exposed by export files |
Tools
Start with these:
apple_health_connection_status— verify export path before reading dataapple_health_data_inventory— discover available record types, date coverage, sources count and stale export riskapple_health_daily_summary— daily wellness brief from export dataapple_health_weekly_summary— weekly comparison and habit signals
Diagnostics
apple_health_capabilities,apple_health_agent_manifest,apple_health_privacy_audit
Records
apple_health_list_records— bounded records bytype(e.g.HKQuantityTypeIdentifierStepCount),start,end,limitapple_health_list_workouts— bounded workout records
Keeping data fresh
apple_health_reimport— re-scan the watch folder (APPLE_HEALTH_WATCH_PATH) and promote the newest export, refreshing summaries; passcheck_only: trueto preview without promoting
Prompts
apple_health_daily_review— daily wellness review with non-medical framingapple_health_weekly_review— weekly habit signals and trend comparison
Resources
apple-health://capabilities,apple-health://agent-manifestapple-health://inventory,apple-health://summary/daily,apple-health://summary/weekly
Privacy & security
- Apple Health exports are highly sensitive personal health data. Keep them local.
- Never commit
export.xml/export.zipto GitHub, paste raw exports into chat, or upload them to issues. - The export path is read-only; the MCP never modifies your export.
APPLE_HEALTH_PRIVACY_MODEdefaults tosummaryfor this connector (more conservative than other Delx Wellness connectors) since the dataset is rich and sensitive. In summary mode, low-level list tools return aggregates instead of individual records. Raw record dumps are opt-in.- This is not medical advice. The server exposes data you exported yourself for personal AI workflows, not diagnosis or emergency monitoring.
Configuration
APPLE_HEALTH_EXPORT_PATH=/path/to/export.zip # or export.xml or apple_health_export/
APPLE_HEALTH_PRIVACY_MODE=summary # summary | structured | raw
APPLE_HEALTH_TIMEZONE=America/Fortaleza # local-day summaries; defaults to UTC unless setup saves a timezone
APPLE_HEALTH_WATCH_PATH=/path/to/health-exports # optional: auto-reimport the newest export dropped here
setup writes these settings into ~/.apple-health-mcp/config.json with 0600 permissions.
setup --auto-import scans common local folders for the newest Apple Health export and copies it to ~/.apple-health-mcp/exports/ with 0600 permissions. This automates the local import step after you transfer the export from the iPhone. Fully live HealthKit sync still requires a separate native bridge; this Node MCP intentionally reads local exports only.
setup --watch-path <dir> (or APPLE_HEALTH_WATCH_PATH) makes the connector treat a folder as a drop zone. On startup, while running (via filesystem events), and whenever the apple_health_reimport tool is called, it promotes the newest Apple Health export found there — export.xml, export.zip, an apple_health_export/ directory, or any *apple*health*.zip — to be the active export and clears the snapshot + incremental caches so the next summary reflects the new data. apple_health_connection_status reports the watch folder state and warns when a newer export is waiting.
Hermes / remote setup
npx -y apple-health-mcp-unofficial setup --client hermes --export-path /path/to/export.zip
npx -y apple-health-mcp-unofficial doctor --client hermes
hermes mcp test apple_health
After Hermes config changes, use /reload-mcp or hermes mcp test apple_health. Don't restart the gateway for normal export access.
If the Hermes server runs on a different machine than your iPhone, transfer the export there and point --export-path at it. The export file should be chmod 600.
Requirements
- Node.js 20+
- An Apple Health export from your iPhone (Health app → profile → Export All Health Data)
Development
git clone https://github.com/davidmosiah/apple-health-mcp.git
cd apple-health-mcp
npm install
npm test
npm run build
Test with MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js
Optional local HTTP transport:
APPLE_HEALTH_MCP_TRANSPORT=http APPLE_HEALTH_MCP_PORT=3000 node dist/index.js
curl http://127.0.0.1:3000/health
Links
- npm: https://www.npmjs.com/package/apple-health-mcp-unofficial
- Docs site: https://wellness.delx.ai/connectors/apple-health
- GitHub: https://github.com/davidmosiah/apple-health-mcp
- Delx Wellness registry: https://github.com/davidmosiah/delx-wellness
- Connector quality standard: https://github.com/davidmosiah/delx-wellness/blob/main/docs/connector-quality-standard.md
- Apple Health export how-to: https://support.apple.com/guide/iphone/share-health-and-fitness-data-iph27f6325b2/ios
<!-- delx-wellness see-also -->
See also
The full Delx Wellness connector library:
| Provider | Package | Repo |
|---|---|---|
| WHOOP | whoop-mcp-unofficial |
whoop-mcp |
| Oura | oura-mcp-unofficial |
ouramcp |
| Garmin | garmin-mcp-unofficial |
garminmcp |
| Strava | strava-mcp-unofficial |
strava-mcp |
| Fitbit | fitbit-mcp-unofficial |
fitbitmcp |
| Withings | withings-mcp-unofficial |
withingsmcp |
| Apple Health | apple-health-mcp-unofficial |
apple-health-mcp |
| Polar | polar-mcp-unofficial |
polarmcp |
| Nourish (nutrition) | wellness-nourish |
wellness-nourish |
One-command setup for Hermes — preconfigures every connector above plus wellness skills + onboarding: delx-wellness-hermes.
<!-- /delx-wellness see-also -->
📧 Contact & Support
- 📨 support@delx.ai — general questions, integration help, partnerships
- 🐛 Bug reports / feature requests — GitHub Issues
- 🐦 Updates — @delx369 on X
- 🌐 Site — wellness.delx.ai
License
MIT — see LICENSE.
Disclaimer
This software is provided as-is. It is not a medical device, does not provide medical advice, and should not be used for diagnosis, treatment or emergency monitoring. Always consult qualified professionals for medical concerns.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。