Apple Health logo

Apple Health

Query local Apple Health CSV exports with DuckDB for schema discovery, SQL analysis, and health summaries.

Install Apple Health

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": {
    "apple-health": {
      "command": "npx",
      "args": [
        "-y",
        "@neiltron/apple-health-mcp"
      ],
      "env": {
        "HEALTH_DATA_DIR": "YOUR_VALUE_HERE",
        "MAX_MEMORY_MB": "YOUR_VALUE_HERE",
        "CACHE_SIZE": "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.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @neiltron/apple-health-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 3d ago.

Overview

The Apple Health MCP server reads Simple Health Export CSV files locally and exposes them to MCP clients through DuckDB. It provides schema discovery, SELECT-family analytical queries, and weekly, monthly, or custom reports. Use it when an agent needs to inspect or summarize an Apple Health export without uploading the source files. Node.js 22 or newer and the HEALTH_DATA_DIR environment variable are required.

Use cases

  • Inspect exported health tables and measurement units
  • Run SQL analysis across Apple Health history
  • Generate weekly or monthly health summaries
  • Compare measurements by device source

Key features

  • DuckDB analytical queries
  • Schema and sample-row discovery
  • JSON, CSV, and summary query output
  • Weekly, monthly, and custom reports
  • Local CSV processing
  • Configurable memory and result caching

Tools3

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

Self-reported~57 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.

8/8 checks healthy over the last 39d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · @neiltron/apple-health-mcp (npm)

Adoption & maintenance

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

GitHub stars575Stargazers on the source repository.
npm downloads1.2kPackage downloads in the last 30 days.
Last commit20d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed3Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Apple Health works

What the Apple Health MCP server does

The Apple Health MCP server lets an MCP-compatible client query health data exported from an iPhone. It works with the CSV directory produced by the Simple Health Export CSV app and uses DuckDB to load and analyze those files. The native Apple Health export.xml format is not supported.

The server exposes three tools:

  • health_schema identifies available tables, columns, units, and sample rows.
  • health_query runs one DuckDB analytical statement from the supported SELECT family and returns JSON, CSV, or summary output.
  • health_report creates a weekly, monthly, or custom health summary.

Table names depend on the files present in the export, so schema discovery is the recommended first request. Queries can cover the complete history in the configured export; the server does not apply a date window automatically.

How it works

The Apple Health MCP server runs locally over the stdio transport. On the first request that needs a table, it loads that table's full CSV history into an in-memory DuckDB database. Tables remain in memory while the process runs, and the database is rebuilt whenever the server starts.

The process restricts DuckDB file access to HEALTH_DATA_DIR, disables network access and temporary disk storage, and locks database settings. These measures limit SQL side effects but do not provide process isolation. The data directory remains writable so CSV files can be imported.

The server does not upload the export or make network requests. Results returned through an MCP client may still be sent to that client's configured model provider.

Setup and configuration

Install Node.js 22 or newer, create an export with Simple Health Export CSV, transfer the archive to the computer running the MCP client, and unzip it. Set HEALTH_DATA_DIR to the resulting directory. In Claude Desktop, configure the server with npx -y @neiltron/apple-health-mcp and pass the directory through the environment settings, then restart the client.

MAX_MEMORY_MB sets DuckDB's memory limit and defaults to 2048. CACHE_SIZE controls the maximum number of cached query results and defaults to 100. The export must use the supported Simple Health Export CSV layout.

Tools and capabilities

Use health_schema before writing queries because available table names vary by export. Use health_query for analytical SQL and select JSON, CSV, or summary output as appropriate. Use health_report when a predefined weekly, monthly, or custom summary is sufficient.

Limitations and notes

The Apple Health MCP server keeps loaded rows in memory and never spills them to temporary disk storage. An export that exceeds the configured memory limit fails with an explicit error; increase MAX_MEMORY_MB for larger exports. As a rough reference, the default limit is intended to leave room for an approximately two-year, multi-table export.

Device overlap can create measurements that look duplicated. Queries may need to distinguish records by sourceName. Because every tool can access the full configured history, start the process only from a client trusted with the health data. Do not expose it to an untrusted network client; use process or operating-system isolation if untrusted SQL must be accepted.

The database is not persistent or incrementally updated. Each launch reloads the CSV files. Reports summarize recorded data and are not medical advice.

Reviews

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

Frequently Asked Questions about Apple Health

Apple Health is an MCP server that connects MCP clients to CSV exports created by Simple Health Export CSV. Its main tools discover schemas, run DuckDB SELECT-family analytical queries, and generate weekly, monthly, or custom health reports. It reads the files locally and does not support Apple’s native export.xml format.

Install Node.js 22 or newer, then configure the MCP client to run `npx -y @neiltron/apple-health-mcp`. Set `HEALTH_DATA_DIR` to the unzipped directory containing the CSV export and restart the client after changing its configuration.

It supports the CSV layout produced by the Simple Health Export CSV app. The native Apple Health `export.xml` format is not currently supported. Export the desired data from the iPhone, transfer the archive, unzip it, and point `HEALTH_DATA_DIR` at the resulting directory.

Yes, Apple Health works with Claude Desktop through a local `stdio` configuration. Add the server command, package arguments, and `HEALTH_DATA_DIR` to Claude Desktop's configuration file, then restart Claude Desktop.

Yes, queries can reach as far back as the configured export because the server does not impose a date window. The first request for a table loads its full CSV history into memory, so larger exports may require increasing `MAX_MEMORY_MB`.

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 PreviewApple Health AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/apple-health?style=directory)](https://allmcps.com/mcp/apple-health)
HTML Embed
<a href="https://allmcps.com/mcp/apple-health"><img src="https://allmcps.com/api/badge/apple-health?style=directory" alt="Apple Health on AllMCPs" /></a>