
Apple Health Mcp
io.github.davidmosiah由 GitHub 帳號 davidmosiah 發布v0.5.0更新於 Oct 24, 2026
Unofficial local-first MCP server for Apple Health export data.
概覽
在本機執行的 MCP 伺服器,讀取 Apple 健康匯出檔,讓助理彙整活動、睡眠、心率、HRV 與運動資料。
- 可以做什麼
- 檢查連線狀態、能力清單、代理清單與隱私稽核,並盤點匯出檔中可用的記錄類型與日期涵蓋範圍。重新掃描監看資料夾,把最新的匯出提升為目前資料並更新摘要。依類型與時間範圍讀取記錄和運動,回傳彙總統計或個別記錄。產生每日與每週健康摘要,並提供每日與每週回顧提示詞。
- 適用情境
- 當你希望助理根據自己的 Apple 健康歷史進行分析時使用,例如每日或每週健康簡報、比較步數、睡眠、心臟指標與運動的習慣和趨勢,而不必從健康 App 手動抄數字。它只讀取匯出檔,不適用於即時 HealthKit 資料。
- 執行需求
- 需要 Node.js 20 以上版本,透過 npx 在本機執行。需要從 iPhone 健康 App 匯出的資料(export.xml、解壓後的資料夾或 export.zip),由 APPLE_HEALTH_EXPORT_PATH 指定。可選用 APPLE_HEALTH_PRIVACY_MODE(預設 summary)、APPLE_HEALTH_TIMEZONE,以及作為投放資料夾的 APPLE_HEALTH_WATCH_PATH。不需帳號、權杖或 OAuth。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Apple Health Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Apple Health MCP
Give your AI agent your Apple Health activity, sleep, HRV and workouts — from your local export.zip.
Local-first MCP server — tokens never leave your machine.
[npm version] [npm downloads] [License MIT] [Site]
[GitHub stars] [Built for MCP] [Hermes one-command setup] [Apple Health]
⚡ 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.
HTTP (v2 stateless)
Default is stdio. Optional Streamable HTTP — no session id, JSON responses, loopback only:
Env: APPLE_HEALTH_MCP_HOST, APPLE_HEALTH_MCP_PORT, APPLE_HEALTH_MCP_TRANSPORT=http.
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:
Wait a few minutes. AirDrop or transfer the zip to this machine.
2. Configure and verify:
Or let the CLI find the newest local export in Downloads, Desktop or Documents, copy it into managed local storage, and save that path:
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:
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:
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:
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.
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,limit.limitcaps the returned list only: in the defaultsummaryprivacy mode theaggregateblock (count_by_type,units,date_range,numeric) is computed over every record matching the filter, andtruncated/limit_applied/matched_counttell you whether the list itself was cut. The statistics live undernumeric(numeric.min/numeric.max/numeric.sum/numeric.average/numeric.count), not at the top ofaggregate— see What a payload looks likeapple_health_list_workouts— bounded workouts bystart,end,limit. Same contract:limitcaps the returned list only, and insummaryprivacy mode theaggregatetotals (count_by_activity,date_range,total_duration_minutes,total_distance,distance_units,total_energy_kcal,workout_count) cover every workout matching the filter, withtruncated/limit_applied/matched_countreporting whether the list was cut
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
What a list call costs
limit bounds the output, not the work. In the default summary privacy mode the aggregate has to describe every matching record, so the scan cannot stop at the cap — it streams export.xml to the end. Narrowing with type, start or end does not shorten it: a match could still sit in the last byte, so the file is read in full either way.
Measured on synthetic exports (Node 23, macOS, warm page cache), for one apple_health_list_records call in summary mode:
Roughly 33 ms per MB, linear in file size. A cold first read of a large export — before the OS has the file cached — costs noticeably more (~29 s was observed for 336 MB).
Practical guidance:
- Identical repeat queries are free. Results are memoized in memory per export file, keyed on path + size + mtime. Promoting a new export (or
apple_health_reimport) invalidates them, so a stale export is never served. apple_health_daily_summary,apple_health_weekly_summaryandapple_health_data_inventoryshare a separate snapshot cache and were already paying one full parse; they are not affected by this.- Need a quick page rather than statistics?
privacy_mode: "structured"or"raw"stops the scan atlimitand returns in about a millisecond — at the cost of returning individual records instead of an aggregate. apple_health_list_workoutsreaches the end of the file in every mode, because workouts are sparse: an export rarely holds enoughWorkoutelements to fill even the default page of 50.incremental_cache: trueis never memoized — it advances a persistent per-category cursor, so each call must actually run.
What a payload looks like
Synthetic values, real shape. npm run test:readme-contract calls the actual server against the repo fixture and fails if any key below stops existing — or if the server starts returning a key this section does not show.
records is empty in summary mode by design — the aggregate replaces the individual samples. count still reports how many records the scan paged in; matched_count is the full match set the aggregate covers.
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
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
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
Test with MCP Inspector:
Optional local HTTP transport:
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
See also
The full Delx Wellness connector library:
One-command setup for Hermes — preconfigures every connector above plus wellness skills + onboarding: delx-wellness-hermes.
📧 Contact & Support
- 📨 [email protected] — 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.
Skill or MCP
Same package, two doors. MCP registers tools on stdio/HTTP. The skill can drive the same tools through the CLI when the client has no MCP:
Copy skill/SKILL.md into your agent skills dir.
0.8.0 — candidate (2026-11-02)
This is a release candidate, not evidence of an npm publication. Existing installations are not updated automatically.
Migration and security boundaries
- HTTP transport accepts loopback only. LAN addresses and wildcard binds are rejected; use stdio or a local loopback client instead.
- Wellness profiles are validated, limited to 256 KiB, and protected with a cooperative lock. Oversized or invalid existing profiles must be corrected before use. Symbolic links, including dangling links and legacy profile paths, are rejected. These checks do not guarantee safety against a hostile local filesystem or non-cooperating processes.
- MCP inputs have a 10,000-element budget and HTTP bodies are limited to 1 MiB; compressed request bodies are rejected. Previously accepted oversized requests may now fail; reduce request sizes rather than disabling validation.
- Dependency fixes are included. Upgrade explicitly after publication and restart the connector; old installations retain their previous behavior.
來源:README.md,提交 161e1f8
工具
0版本歷史
1- v0.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分