Apple Health

io.github.neiltronPublished by GitHub account neiltronv1.4.5Updated Nov 3, 2026

Local-first Apple Health MCP server for questions about your sleep, workouts and heart data.

VerifiedSTDIODesktop onlyLocation & LifestyleData & Analytics

Overview

AI-generated overview

Local MCP server that lets an assistant query your exported Apple Health sleep, workout and heart data with SQL and generate health summaries.

What you can do
  • Discover the tables, columns, units and sample rows of the health export
  • Run one DuckDB analytical SELECT statement with JSON, CSV or summary output
  • Generate weekly, monthly or custom health reports from recorded data
When to use it
Use it when you have an Apple Health CSV export on your computer and want an assistant to answer questions about sleep, workouts, heart data or other recorded metrics, or to produce periodic summaries.
Requirements
Runs locally over stdio via npx, so Node.js 22 or newer is needed. Requires an Apple Health CSV export made with Simple Health Export CSV, unzipped, with its directory set in HEALTH_DATA_DIR. Optional MAX_MEMORY_MB (default 2048) and CACHE_SIZE (default 100). No account or API key.
Before you install
Every tool can reach the full history in the export, so only connect it from an MCP client you trust with that data. Results returned to the client may be sent to that client's configured model provider. Safeguards limit file access and disable network and temp storage but do not isolate the process; do not expose it to untrusted network clients. Reports are not medical advice.

Installation

In SourceWeft

  1. Open Apple Health in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Apple Health MCP Server

[npm version] [License: MIT]

Query Apple Health data from an MCP client using SQL and DuckDB. The server runs locally, reads CSV exports on demand, and provides tools for schema discovery, analytical queries, and health summaries.

Requirements

The native Apple Health export.xml format is not currently supported.

Configure an MCP client

For Claude Desktop, add the following to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "apple-health": {      "command": "npx",      "args": ["-y", "@neiltron/apple-health-mcp"],      "env": {        "HEALTH_DATA_DIR": "/path/to/your/unzipped/health-export"      }    }  }}

Restart the client after changing its configuration. Other MCP clients can use the same command, arguments, environment, and stdio transport.

Environment variables

VariableRequiredDefaultPurpose
HEALTH_DATA_DIRYes—Directory containing the exported CSV files
MAX_MEMORY_MBNo2048DuckDB memory limit in megabytes
CACHE_SIZENo100Maximum number of cached query results

Export health data

  1. Install and open Simple Health Export CSV on your iPhone.
  2. Select All and choose the time range to export.
  3. Transfer the archive to the computer running your MCP client.
  4. Unzip it and set HEALTH_DATA_DIR to the resulting directory.

The server reads the files in place. It does not upload the export or make network requests, although query results returned to your MCP client may be sent to that client's configured model provider.

Tools

ToolPurpose
health_schemaDiscover table names, columns, units, and sample rows
health_queryRun one DuckDB SELECT-family analytical statement with JSON, CSV, or summary output
health_reportGenerate a weekly, monthly, or custom health summary

Start with health_schema; table names depend on the files in your export. See Querying Apple Health data for the data model and working examples.

health_query accepts one DuckDB analytical statement. See Query safeguards for supported statements and restricted operations.

Query safeguards

The server limits DuckDB file access to HEALTH_DATA_DIR. It also disables network access and temporary disk storage, and it locks the database settings. The data directory stays readable and writable so the importer can read CSV files.

These controls reduce accidental side effects from generated SQL. They do not isolate the process. Run the server through a local stdio MCP client. Do not expose it to an untrusted network client. Use process or OS isolation if the server must accept untrusted SQL.

History and memory

The first request that needs a table loads that table's full CSV history. There is no date window, so a query can reach as far back as the export goes.

Because every tool can reach the whole configured history, only start this server from an MCP client you trust with that data.

Loaded tables are held in memory, and DuckDB is given the MAX_MEMORY_MB limit described above. Roughly 1 GiB covers a two-year multi-table export, so the 2048MB default leaves headroom; raise MAX_MEMORY_MB for a larger export. The server never spills health rows to a temporary directory on disk, so an export that does not fit in the limit fails with an explicit error instead.

Other current limitations:

  • Only the Simple Health Export CSV layout is supported.
  • The DuckDB database is in memory and is rebuilt for each server process, so each launch reloads from the CSV files. Persistent incremental import is planned future work, not current behavior.
  • Device overlap can produce duplicate-looking measurements; queries should account for sourceName where appropriate.
  • Health reports summarize recorded data and are not medical advice.

Development

bash
git clone https://github.com/neiltron/apple-health-mcp.gitcd apple-health-mcpbun install
npm testnpm run typechecknpm run build

See Architecture for the code layout, data lifecycle, and implementation constraints. See Release procedure for publishing and recovery steps.

License

MIT

Source: README.md at commit 5b0320d

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

2
  1. v1.4.5LatestSep 20, 2026
  2. v1.4.1Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts