Health Export MCP
About
Query 190 Apple Health / HealthKit metrics from any MCP agent — zero-dependency, read-only, local-first
Details
- Author
- philipad
- Categories
- Other
Jump to
Setup
Install Health Export MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/philipad/health-export-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
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-mcpis an open-source,zero-dependencyModel Context Protocol (MCP)server that lets any MCP-compatible AI agent query yourApple Health / HealthKitdata,190 metricsas 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 theMetricBridgeiOS 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 youractual numbers.
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 theirrealhealth 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 whereyoupoint it.
- Setup:point the server at your exported data and add it to your AI client.
Just exported and the Mac has not seen it yet?iCloud can take a few minutes to sync the file across, so a check 60 seconds after tapping Run in the app can still show the old timestamp.get_mcp_statusreportslastDataDateand the intradaylastWrite, which is the quickest way to tell "still syncing" from "never arrived".
Try it with no iPhone needed:node server.mjs --demoserves a deterministic synthetic dataset (400 days, workouts, events, sleep sessions) with every answer watermarked as synthetic. Or runnpm testto write a sample cache and exercise every tool.
Connect Apple Health to your AI agent, Quickstart
The companion iOS appMetricBridgeexports your Apple Health data, read-only, automatic, private. For this MCP server, export to a destination it can read:
Using a non-MCP tool (ChatGPT, n8n, Home Assistant)? The app can also POST to awebhookthose tools read directly, seeWorks with.
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 you
Manual, Claude Desktop(~/Library/Application Support/Claude/claude_desktop_config.json):
{ "mcpServers": { "health-export": { "command": "npx", "args": ["-y", "health-export-mcp"], "env": { "HEALTH_DATA_DIR": "~/Library/Mobile Documents/iCloud~ai~healthexport~app/Documents" } } } }
npxfetches the published package at run time (npm verifies package integrity), it runs anywhere, no clone or absolute path needed. Prefer to pin a vetted local checkout instead? Use"command": "node", "args": ["REPLACE_WITH_ABSOLUTE_PATH/server.mjs"], get the path withnode -e "console.log(process.cwd()+'/server.mjs')"inside the repo. Or skip JSON entirely, draghealth-export.mcpbintoClaude Desktop → Settings → Extensions.
Cursor / VS Code:node gen-deeplinks.mjsprints one-click install links.opencode / OpenClaw / Hermes:seeAGENTS.mdfor the exact block, same shape, one per client.
"Use health-export: what's my average HRV this week vs last week?"
Works with Claude, Cursor, ChatGPT, OpenClaw, Hermes
*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-authenticatedwebhookexport.
Full reference with request/response examples:healthexport.dev/mcp.
Coverage:190 Apple Health metrics across activity, heart, HRV, mobility, respiratory, body, sleep, hearing, and nutrition, plus workouts. Data answers carry honestcoverageblocks, and single-metric answers list logged events inside the window assegmentBoundariesso an average across a medication start or life change cannot masquerade as one regime.
The daily cache (.health-cache.json) and workouts cache are joined by optional context files, all read-only and all optional:health-events.json(the logging surface),health-profile.json(opt-in context),health-sessions.json(sleep sessions),health-cycles.json(observed cycle starts),health-days.json(timezone change log). An absent file is reported asavailable:falsewith a note, never as "no data". Formats:docs/SCHEMA-CONTRACTS.md.
Two patterns worth knowing:query a parent's Apple Health from your own AI(consent-first, the parent's phone is the authority) andlogging data into Apple Health via Shortcuts(the server and app stay strictly read-only).
The server ships 22 prompts overprompts/list/prompts/get: daily brief, weekly review, doctor visit prep, what changed since my last visit, sleep quality and regularity, HRV trend, training and race week reviews, zone minutes, n-of-1 experiment, medication before/after, GLP-1 dose-step compare, sobriety milestone, shift block compare, travel-honest monthly review, cycle-aware trend read, caregiver check-in, glucose day summary, long-term activity narrative, data coverage audit, and a profile-aware context bootstrap. Every prompt leads with coverage honesty and never turns data into diagnosis.
node server.mjs --demo(orHEALTH_DEMO=1) serves a deterministic synthetic dataset: ~15 metrics over 400 days, 30 workouts with intervals, 8 events, a profile, 60 sleep sessions, cycle starts and a timezone change, anchored to a fixed date with a seeded PRNG. Every answer carriesdemo: trueand a[SYNTHETIC DEMO DATA]text prefix, so demo output can never pass for a real export.
node server.mjs --doctor # diagnostics: files, sizes, schema, freshness, pairing node server.mjs status --max-age 24 # exit 0 if data is fresh, 1 if stale (cron gate) node server.mjs receive # standalone LAN receiver (binds 127.0.0.1 by default) node server.mjs --help
"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."
- 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.
MetricBridge, exports your Apple Health to your agent, automatically.
- 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 isno developer serverin the path.
- Optional pairing.SetPAIRING_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, seeVerifying releases.
The server artifacts hosted athealthexport.dev/mcp/(used by thesetup skill) areminisign-signed, and every download isSHA-256 checksummed. The signing public key is publishedin this repo(minisign.pub) and inSKILL.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-mcpinstead 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 tosecurity@healthexport.dev.
- Node.js ≥ 18(node -v).
- A folder containing a.health-cache.jsonexported byMetricBridge, 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.
How do I get my Apple Health data into Claude / ChatGPT / my AI agent?Installhealth-export-mcp, export your Apple Health data with theMetricBridgeiOS 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 pointHEALTH_DATA_DIRat any folder containing a compatible.health-cache.json.
- "No metrics found", confirmHEALTH_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 anabsolutepath toserver.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.
# 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 test
stdio transport (newline-delimited JSON-RPC 2.0), the universal MCP transport. Optionally setHEALTH_LISTEN=1to also accept LAN pushes from the iOS app in the same process (seereceiver.mjs).
The iOS app reads Apple Health (read-only) and writes a compact.health-cache.json(plus optional context files) to the destination you choose. This server reads those files and exposes the 14 tools above over MCP. No bridge, no Docker, no database: just files and stdio.
Apple Health → MetricBridge (iOS) → .health-cache.json → health-export-mcp → MCP client → you
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.
Howhealth-export-mcpdiffers: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).
- Companion iOS app:MetricBridge, 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.
MIT, seeLICENSE. 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.
Transaction-complete hotel booking over MCP — 300K+ properties, real hotel confirmation numbers, loyalty points, secure checkout. Hotels are merchant of record. Builders set their own booking fee via Stripe Connect. Built on proven distribution infrastructure.
An MCP server for AI video generation. MCP server for AI video generation. Lets Claude, ChatGPT, OpenClaw , Hermes & other agents create AI videos and publish them to YouTube, TikTok, Instagram etc..
Institutional research and manager diligence reports on hedge funds, venture capital and private equity managers. Summary of filings, personnel changes, media screening and social signals delivered to you in minutes.
ALTER - identity infrastructure for the AI economy
D2C eCommerce fulfillment platform: manage orders, inventory, shipments, campaigns, and billing via AI agents
Apigene MCP Gateway is the runtime layer that connects AI agents to APIs and MCP servers via Model Context Protocol.
MCP to interface with multiple blockchains, staking, DeFi, swap, bridging, wallet management, DCA, Limit Orders, Coin Lookup, Tracking and more.
MCP server for Bitnovo Pay integration with AI agents. Provides cryptocurrency payment capabilities through Bitnovo Pay API. Features include payment creation, status checking, QR code generation, and webhook management with support for multiple tunnel providers (ngrok, zrok, manual).
Shop for gift cards, esims, phone topups. Pay with cards and crypto.
You built it, now get users! GoToMarket MCP server
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



