health-export-mcp
This server lets AI agents query Apple Health data (190+ metrics) via natural language or structured tool calls, returning trends, comparisons, and structured JSON exports. It operates locally with no external dependencies, ensuring privacy and read-only access.
Check status (
get_mcp_status): Verify the bridge is connected; see data source, metric/workout counts, and latest data date. Recommended as a first call.Discover metrics (
list_metrics): Browse all available Apple Health metrics with units, day counts, and date ranges.Retrieve daily data (
get_health_metrics): Fetch daily values for a specific metric (e.g.step_count,hrv,sleep_analysis) or all metrics over a date range, with aggregation options (avg, sum, min, max, latest).Analyze trends (
get_trends): Compare a recent N-day window vs. the prior N days — returns change, percent change, and direction (up/down/flat).Compare periods (
compare_periods): Pit two arbitrary date ranges (Period A vs. B) against each other for a metric, returning aggregates and the delta.Export structured JSON (
get_structured_export): Get clean JSON for selected metrics and a date range, ready for an agent's context window or a notebook.Natural-language queries (
query_health_data): Ask plain-English questions like "average HRV last month" and receive structured results without needing exact tool parameters.
It integrates natively with MCP-compatible agents (Claude Desktop, Cursor, VS Code, etc.) and supports non-MCP tools (ChatGPT, Gemini, n8n, Home Assistant) via webhook. Data is sourced from the companion "Health Export AI" iOS app, which exports Apple Health data to iCloud, a local folder, or directly to the server.
Allows querying Apple Health data (190 metrics) through natural language, enabling AI agents to analyze personal health metrics.
Reads exported Apple Health data from a Dropbox folder, enabling access from synced files.
Provides MCP tools for Hermes AI agents to query personal health data in natural language.
Allows Home Assistant to receive Apple Health data via webhook for automations and monitoring.
Reads exported Apple Health data from iCloud Drive, providing access to synced health metrics.
Enables n8n workflows to receive Apple Health data via webhook for integration into custom automations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@health-export-mcpCompare my HRV this week vs last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
health-export-mcp — Apple Health MCP server for AI agents
Query your Apple Health data from Claude, ChatGPT, Cursor, OpenClaw, Hermes — and any other AI agent.
health-export-mcp is an open-source, zero-dependency Model Context Protocol (MCP) server that lets any MCP-compatible AI agent query your Apple Health / HealthKit data — 190 metrics as clean JSON — in plain language. Local-first, read-only, no accounts, and no developer server in the path. It's the open-source server for the Health Export AI iOS app — available on the App Store.
Ask your agent: "Compare my HRV this week vs last week and tell me if I'm recovering." — it calls the tools and answers from your actual numbers.
What is health-export-mcp?
It's an MCP server that turns your Apple Health export into a tool your AI agent can query in natural language — HRV, sleep, resting heart rate, steps, workouts, VO₂ max, and 180+ more.
Who it's for: anyone who wants their AI to reason over their real health data instead of a stale CSV.
What it isn't: a cloud service. There's no developer server in the path — your data goes only where you point it.
Setup: point the server at your exported data and add it to your AI client.
Try it with no iPhone needed:
git clone https://github.com/PhilipAD/health-export-mcp.git && cd health-export-mcp && npm testwrites a 14-day sample cache and exercises every tool.
Related MCP server: Apple Health MCP Server
Connect Apple Health to your AI agent — Quickstart
1. Get your Apple Health data flowing
The companion iOS app Health Export AI exports your Apple Health data — read-only, automatic, private. For this MCP server, export to a destination it can read:
Destination | Notes |
iCloud Drive (default) | Your Mac reads the synced folder automatically |
Local folder | Any folder that syncs to your Mac (Dropbox, Google Drive, OneDrive, …) |
LAN (HTTP / WebSocket) | Direct push to the server — great over Tailscale |
Using a non-MCP tool (ChatGPT, n8n, Home Assistant)? The app can also POST to a webhook those tools read directly — see Works with.
2. Add the server to your agent
Fastest — auto-configure:
git clone https://github.com/PhilipAD/health-export-mcp.git
cd health-export-mcp
node apply-mcp-config.mjs # detects installed clients and writes the config for youManual — Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"health-export": {
"command": "node",
"args": ["REPLACE_WITH_ABSOLUTE_PATH/server.mjs"],
"env": { "HEALTH_DATA_DIR": "~/Library/Mobile Documents/iCloud~ai~healthexport~app/Documents" }
}
}
}Get the absolute path to paste above:
node -e "console.log(process.cwd()+'/server.mjs')"(run inside the repo). Or skip JSON entirely — draghealth-export.mcpbinto Claude Desktop → Settings → Extensions.
Cursor / VS Code: node gen-deeplinks.mjs prints one-click install links.
opencode / OpenClaw / Hermes: see AGENTS.md for the exact block — same shape, one per client.
3. Ask your agent
Restart the client and try:
"Use health-export: what's my average HRV this week vs last week?"
Works with Claude, Cursor, ChatGPT, OpenClaw, Hermes
Client / Agent | Integration | How |
Claude Desktop | Native MCP |
|
Cursor | Native MCP | One-click deeplink, or |
opencode | Native MCP |
|
OpenClaw | Native MCP | Add the server block to your MCP config |
Hermes | Native MCP | Add the server block to your agent's MCP config |
VS Code (Copilot / Continue) | Native MCP | One-click deeplink |
ChatGPT · Gemini · Grok | Webhook* | Consume the app's webhook export |
n8n · Home Assistant | Webhook* | Trigger automations on the exported JSON |
*MCP clients query this server directly over stdio. ChatGPT / Gemini / Grok / n8n / Home Assistant don't speak MCP — they consume the same Apple Health data via the iOS app's token-authenticated webhook export.
The 7 MCP tools
Tool | What it does |
| Health check — source, metric/workout counts, latest data date. Call first. |
| Every available metric with unit, day count, and date range. |
| Daily values for a metric (or all) over a date range + an aggregate (avg/sum/min/max/latest). |
| Recent N-day window vs the prior N days — change, % change, direction. |
| A metric across two arbitrary date periods (A vs B). |
| Clean JSON for chosen metrics/range — drop straight into context. |
| Natural-language convenience: "average HRV last month" → routed structured results. |
Coverage: 190 Apple Health metrics across activity, heart, HRV, mobility, respiratory, body, sleep, hearing, and nutrition — plus workouts.
Example AI queries
"What has my resting heart rate done over the last 30 days?"
"Compare my deep sleep this week vs last week."
"Is my VO₂ max trending up or down this quarter?"
"Give me a clean JSON export of HRV, RHR and sleep for the last 14 days."
"Correlate my step count with my sleep duration this month."Use cases
AI health coach — let an agent reason over your real HRV, resting heart rate, and sleep to suggest when to push and when to recover, grounded in your actual numbers instead of generic advice.
Training-load analysis — pull workouts, VO₂ max, and heart-rate trends so your agent can flag overreaching, plot fitness progression, and pace a training block.
Sleep correlations — have your agent correlate deep-sleep duration against steps, caffeine, late workouts, or screen time to find what actually moves your sleep quality.
Quantified-self dashboards — feed clean JSON for any metric set and date range straight into a notebook, spreadsheet, or LLM-built dashboard for your own self-tracking.
Personal research & experiments — run n-of-1 experiments (supplement, routine, or protocol changes) and let an agent compare before/after periods across 190 metrics to see what changed.
The app that feeds it
Privacy & security
Read-only. The server only reads your exported data — it never touches HealthKit and never writes back.
Local-first. It runs on your machine over stdio. There is no developer server in the path.
Optional pairing. Set
PAIRING_SECRETto the code the iOS app shows (Settings → Agent pairing) to gate access.Auditable. Zero dependencies and a few hundred lines of readable JavaScript — read every line.
Signed releases. Hosted artifacts are minisign-signed and checksummed — see Verifying releases.
Verifying releases
The server artifacts hosted at healthexport.dev/mcp/ (used by the setup skill) are minisign-signed, and every download is SHA-256 checksummed. The signing public key is published in this repo (minisign.pub) and in SKILL.md — pin it from here, not only from the website, so a compromise of the website alone cannot swap both an artifact and its key.
PUBKEY='RWS6TxVWSKUblYkx7Db6ZpmvHALwHpznZpjaED/FlZj+PpxSlel0MxHZ' # = minisign.pub in this repo
curl -fsSL https://healthexport.dev/mcp/SHA256SUMS -o SHA256SUMS
curl -fsSL https://healthexport.dev/mcp/SHA256SUMS.minisig -o SHA256SUMS.minisig
minisign -Vm SHA256SUMS -P "$PUBKEY" || { echo "signature INVALID — do not run"; exit 1; } # fail closed
curl -fsSL https://healthexport.dev/mcp/server.mjs -o server.mjs
shasum -a 256 --ignore-missing -c SHA256SUMS || { echo "checksum mismatch — do not run"; exit 1; }The pinned, checksum-verified download above is the locked-down path. npx health-export-mcp instead resolves the latest version published to npm at run time (npm provides its own package integrity). Full security overview: https://healthexport.dev/security. Report vulnerabilities to security@healthexport.dev.
Requirements
Node.js ≥ 18 (
node -v).A folder containing a
.health-cache.jsonexported by Health Export AI — or runnpm testto generate a sample one.An MCP-compatible client (Claude Desktop, Cursor, opencode, OpenClaw, Hermes, VS Code) — or any tool that can read the webhook export.
FAQ
How do I get my Apple Health data into Claude / ChatGPT / my AI agent?
Install health-export-mcp, export your Apple Health data with the Health Export AI iOS app (to iCloud, a folder, or your LAN), then add the MCP server to your AI client. Your agent can then query your Apple Health metrics in natural language. (Non-MCP tools like ChatGPT read the app's webhook export instead.)
Is my health data sent to a server? Not to us. The MCP server runs locally and reads only the export files or endpoints you configure — there's no developer server in the path. Where your iOS export is delivered (iCloud, your LAN, a webhook) is entirely your choice.
Which agents are supported? Any MCP client — Claude Desktop, Cursor, opencode, OpenClaw, Hermes, VS Code — natively. ChatGPT, Gemini, Grok, n8n, and Home Assistant consume the same data via webhook.
Do I need the iOS app?
The app is the easiest way to get Apple Health data off your iPhone in the format this server reads. You can also point HEALTH_DATA_DIR at any folder containing a compatible .health-cache.json.
Troubleshooting
"No metrics found" — confirm
HEALTH_DATA_DIRpoints at the folder containing.health-cache.json, and that the app has exported at least once. Runget_mcp_statusto see the resolved source and latest date.Server not visible in the client — use an absolute path to
server.mjs, ensure Node ≥18, and fully restart the client.Locked data error — the export file is protected until first unlock after reboot; unlock your device once.
Run it locally
# Node ≥18, no install needed
HEALTH_DATA_DIR=~/Library/Mobile\ Documents/iCloud~ai~healthexport~app/Documents node server.mjs
# integration test — writes a 14-day sample cache and exercises every tool
npm teststdio transport (newline-delimited JSON-RPC 2.0) — the universal MCP transport. Optionally set HEALTH_LISTEN=1 to also accept LAN pushes from the iOS app in the same process (see receiver.mjs).
How it works
The iOS app reads Apple Health (read-only) and writes a compact .health-cache.json to the destination you choose. This server reads that file and exposes the 7 tools above over MCP. No bridge, no Docker, no database — just a file and stdio.
Apple Health → Health Export AI (iOS) → .health-cache.json → health-export-mcp → MCP client → youRelated projects
Other Apple Health MCP servers in the ecosystem — worth a look depending on your setup:
neiltron/apple-health-mcp — an MCP server that runs SQL-style queries over an Apple Health export.
the-momentum/apple-health-mcp-server — an MCP server for analyzing Apple Health data exported from the Health app.
HealthyApps/health-auto-export-mcp-server — an MCP server for the Health Auto Export app's data.
How health-export-mcp differs: zero dependencies, clean structured JSON, 190 Apple Health metrics, and the widest agent support (Claude, Cursor, opencode, OpenClaw, Hermes, VS Code natively — plus ChatGPT/Gemini/Grok/n8n/Home Assistant via webhook).
Related
Companion iOS app: Health Export AI — exports 190 Apple Health metrics to your agent, automatically.
Model Context Protocol: modelcontextprotocol.io
Per-agent setup: AGENTS.md
If this helps your setup, a ⭐ makes it easier for others to find.
License
MIT — see LICENSE. Contributions welcome.
Apple Health MCP server · export Apple Health to AI · HealthKit MCP server · query Apple Health with Claude / ChatGPT / Cursor · Model Context Protocol health server · Apple Health to LLM · HRV, sleep & heart rate for AI agents.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhilipAD/health-export-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server