Reads local Apple Health exports through MCP, providing metrics, trends, workouts, sleep, events, and other read-only health data.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Health Export MCP.
get_mcp_statusHealth check: data source, how many metrics/workouts are available, which optional context files exist, and the most recent data date. Call this first to confirm the bridge is connected.
list_metricsList every available Apple Health metric with its unit, day count, and date range. Use this to discover metric names before querying.
get_health_metricsGet values for a metric (or all metrics) over an optional date range, with an aggregate (avg/sum/min/max/latest). The core data-retrieval tool. Every result carries a `coverage` block giving the metric's real firstDate/lastDate/days: check it before trusting a long window, and note that `aggregate` is always computed over the full range even when `points` are rolled up. Single-metric answers also list any logged point events inside the window as segmentBoundaries.
get_trendsCompare the most recent N-day window against the prior N days for a metric: change, percent change and direction (up/down/flat). Also returns `daysAvailable` and `windowSatisfied`: if windowSatisfied is false the file does not hold enough history for the window you asked for, and the comparison is over less data than requested. Logged point events inside the compared span are listed as segmentBoundaries.
compare_periodsCompare a metric between two arbitrary date periods (A vs B): each aggregate plus the change and percent change. Pass periodA/periodB explicitly, or pass anchor {eventId, days} to build both periods around a logged event (the before/after question, with the event day excluded from both sides).
get_structured_exportReturn clean structured JSON for the chosen metrics/date range. Paginated: the result carries `nextCursor` when more metrics remain; pass it back as `cursor` for the next page. Prefer naming the metrics you need and a date range; calling it bare over a full history is a lot of data.
io.github.PhilipAD/health-export-mcp MCP server gives an MCP client structured, read-only access to Apple Health data exported by the MetricBridge iOS app. It covers 190 metrics across areas such as activity, heart, HRV, mobility, respiratory measurements, body data, sleep, hearing, and nutrition. Workouts are exposed separately, with exported fields preserved when available.
The server also reads optional context files. These can contain logged events, user-approved profile fields, clustered sleep sessions, observed cycle starts, hourly data, and timezone changes. Missing optional files are reported as unavailable or absent; they should not be interpreted as proof that no event or profile item exists.
The MCP process reads files from a directory selected through configuration and responds over stdio to the connected client. The usual data flow is an Apple Health export from MetricBridge to iCloud Drive, another folder synchronized to the computer, or a LAN destination that the server can read. No account or developer-hosted server is required for the MCP connection, and the server does not mutate the health data.
Call get_mcp_status first to verify the source, available metric and workout counts, optional context files, and latest data date. list_metrics then reveals metric names, units, date coverage, and available day counts. Query results include coverage details, which helps identify whether a requested date range is fully represented. Aggregates apply to the complete requested range even if returned points are rolled up.
The tool set supports daily metric queries, recent-versus-prior trend comparisons, arbitrary period comparisons, event-anchored before-and-after comparisons, paginated structured exports, and a natural-language routing tool. Additional tools cover intraday hourly data, events, opted-in profile fields, workouts, sleep sessions, cycle context, and Pearson correlations with optional lags. Correlations describe alignment in the available data and do not establish causation.
Install or run the published package with Node.js 18 or newer. A Claude Desktop configuration can start it with npx -y health-export-mcp and set HEALTH_DATA_DIR to the exported-data directory. The repository also includes an automatic configuration script that detects supported clients, while Claude Desktop can use the provided MCP bundle. Cursor and VS Code installation links can be generated from the repository; other documented clients use the same MCP server configuration shape.
MetricBridge is the documented source for Apple Health exports. Its destinations include iCloud Drive, a local folder synchronized by another service, and LAN delivery. Synchronization may delay the newest file, so get_mcp_status can be used to distinguish an old synced timestamp from a source that has never delivered data.
For testing, the repository documents node server.mjs --demo, which serves a deterministic synthetic dataset containing health history and related records. Synthetic responses are marked as such. The repository also documents npm test for writing a sample cache and exercising the tools.
The server is read-only and answers only from the files available to it. A long requested window may contain less history than expected; inspect coverage, daysAvailable, and windowSatisfied before relying on comparisons. Intraday data is replaced on each hourly automation run, so it represents a current within-day view rather than historical hourly storage.
Cycle context is derived from logged period starts and supplies a coarse observed phase; it is not predictive and does not estimate ovulation. Sleep sessions are assigned to the waking day, and split nights remain separate records. Workout fields such as heart rate, power, running dynamics, intervals, or route availability appear only when the export contains them. Profile data reflects only fields the user opted to share. The io.github.PhilipAD/health-export-mcp MCP server is therefore best suited to analysis of an available local export, not to filling gaps or inferring unrecorded health information.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/io-github-philipad-health-export-mcp)<a href="https://allmcps.com/mcp/io-github-philipad-health-export-mcp"><img src="https://allmcps.com/api/badge/io-github-philipad-health-export-mcp?style=directory" alt="Health Export MCP on AllMCPs" /></a>