Health Export MCP logo

Health Export MCP

by io.github.PhilipAD

Reads local Apple Health exports and provides 190 metrics, workouts, sleep, events, and analysis tools over MCP.

Install Health Export MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "io-github-philipad-health-export-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "health-export-mcp"
      ],
      "env": {
        "HEALTH_DATA_DIR": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

io.github.PhilipAD/health-export-mcp reads Apple Health/HealthKit exports produced by the MetricBridge iOS app and exposes the data as read-only MCP tools. It supports daily metrics, trends, period comparisons, workouts, sleep sessions, events, profile context, cycle context, intraday data, structured exports, and metric correlations. Data stays on the machine or destination you configure, such as iCloud Drive, a local synced folder, or a LAN endpoint. Reach for it when an MCP client needs to answer questions from current personal health data without sending the data through a hosted developer service.

Use cases

  • Query personal Apple Health metrics from an MCP agent
  • Compare HRV, sleep, or resting heart rate across periods
  • Review workouts and sleep sessions with date filters
  • Relate logged events to changes in health metrics
  • Test health-data workflows with synthetic exports

Key features

  • 190 Apple Health metrics with coverage details
  • Trend and arbitrary-period comparisons
  • Workout, sleep, event, profile, and cycle queries
  • Intraday hourly data and structured JSON export
  • Read-only local file access
  • Synthetic demo dataset

Tools14

What Health Export MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

23/24 checks healthy over the last 89d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · health-export-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars11Stargazers on the source repository.
npm downloads3.2kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Tools exposed14Callable tools this server registers over MCP.
Directory activity13 viewsConfig copies, upvotes, and views on AllMCPs.

How Health Export MCP works

What io.github.PhilipAD/health-export-mcp does

Apple Health data becomes queryable JSON for MCP-compatible agents. The server reads an export directory rather than connecting directly to an Apple account or HealthKit, and supports 190 health metrics along with workouts and optional context files.

The companion MetricBridge iOS app exports the source data to a destination the server can read. Supported destinations include iCloud Drive, a local folder, and LAN delivery over HTTP or WebSocket. The server is read-only and local-first: an agent queries the files available at the configured location, while the data remains under the operator's control.

How it works

The server runs over MCP, with stdio configuration examples for Claude Code and Claude Desktop. An MCP client invokes tools that read the current export. Start with get_mcp_status to confirm the bridge, inspect available files, and check the latest data date. list_metrics then shows metric names, units, coverage, and date ranges before a query is made.

Daily metric queries include coverage information so an agent can distinguish a genuinely long history from a short file. Trend and period-comparison tools return changes and percentage changes. Correlation results describe alignment rather than causation and withhold the coefficient when fewer than 10 aligned pairs are available.

A demo mode supplies deterministic synthetic data without an iPhone or export. It includes 400 days of sample data, workouts, events, and sleep sessions, with results marked as synthetic.

Setup and configuration

Install Node.js 18 or newer, make Apple Health data available through MetricBridge, and set HEALTH_DATA_DIR to the exported folder. For a typical iCloud setup, the server can be added to Claude Code with npx -y health-export-mcp and the directory passed through that environment variable. The path should be quoted when it contains spaces.

Claude Desktop accepts the same command and environment in an mcpServers configuration block. Cursor and VS Code installation links can be generated with node gen-deeplinks.mjs. A cloned repository can also run node apply-mcp-config.mjs to detect clients and write configuration. The package has no runtime dependencies; a local checkout can be started with Node directly.

Use npx -y health-export-mcp --demo to test the server with synthetic data. After an iOS export, iCloud synchronization may take several minutes; the status response exposes the latest data date, while intraday data includes its latest write time.

Tools and capabilities

  • Inspect bridge health, data freshness, available metrics, units, coverage, and date ranges.
  • Retrieve one or all metrics over a date range with average, sum, minimum, maximum, or latest aggregation.
  • Compare recent and prior windows, arbitrary periods, or periods anchored around a logged event.
  • Export selected metrics as paginated structured JSON.
  • Read the current hourly intraday window from the iOS app's hourly automation output.
  • Query workouts with activity, date, and pagination filters, including optional heart-rate, power, interval, route, and running-dynamics fields when exported.
  • Read sleep sessions, logged events, opted-in profile fields, and cycle context derived from logged period starts.
  • Calculate Pearson correlation between daily metrics with optional lags from zero through three days.

Limitations and notes

Intraday data is replaced on each hourly automation run, so it represents the current within-day window rather than historical hourly data. Use daily metric queries for day-level history. Sleep sessions are attributed to the waking day, and split nights are returned as separate sessions when the export contains them.

Cycle context uses logged period starts and provides a coarse observed phase; it is not predictive and does not estimate ovulation. Missing context fields indicate that the user withheld them or did not enable them. An absent events file means no event export is available, not that no events occurred.

For long exports, request specific metrics and dates. Structured results are paginated, and the cursor must be supplied to retrieve later pages. Metric aggregates cover the full requested range even when returned points are rolled up. Correlation describes association in the exported data, not a causal relationship.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Health Export MCP

io.github.PhilipAD/health-export-mcp is an MCP server that reads Apple Health/HealthKit exports created by the MetricBridge iOS app. Its main tools query metrics, compare periods, inspect trends, retrieve workouts and sleep sessions, list events, export structured JSON, and analyze relationships between daily metrics locally.

Install it with Node.js 18 or newer and start it through `npx -y health-export-mcp`, setting `HEALTH_DATA_DIR` to the Apple Health export folder. Claude Code and Claude Desktop configuration examples are supported, while Cursor and VS Code links can be generated from a clone.

Yes, Cursor is supported through native MCP configuration. Run `node gen-deeplinks.mjs` from a clone to print one-click installation links, or add the server to Cursor's MCP configuration with its stdio command and `HEALTH_DATA_DIR` environment variable.

Run `npx -y health-export-mcp --demo` to use a deterministic synthetic dataset. The demo contains 400 days of sample metrics, workouts, events, and sleep sessions, and its results are marked as synthetic.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHealth Export MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/io-github-philipad-health-export-mcp?style=directory)](https://allmcps.com/mcp/io-github-philipad-health-export-mcp)
HTML Embed
<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>