Skip to main content
MCP server CX Codex

Apple Health — Claude Code MCP server: features and setup

This local MCP server reads Apple Health CSV exports and answers questions about sleep, workouts, and health metrics. Use it to inspect records, run queries, or create summaries.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env HEALTH_DATA_DIR=<HEALTH_DATA_DIR> --env MAX_MEMORY_MB=<MAX_MEMORY_MB> --env CACHE_SIZE=<CACHE_SIZE> --transport stdio apple-health -- npx -y @neiltron/apple-health-mcp
Open on GitHub

What Apple Health does

The server works with Apple Health CSV files on your computer. Its tools expose the data schema, run DuckDB analytical queries, and create weekly, monthly, or custom summaries. It requires Node.js 22 or later and an export made with Simple Health Export CSV. Native export.xml files are unsupported, so that format will not work.

Set HEALTH_DATA_DIR to the directory containing the unzipped CSV files. The server reads them in place and makes no network requests or uploads of the export. On the first request for a table, it loads that table’s full history into an in-memory database, which is rebuilt whenever the process starts. An export that exceeds MAX_MEMORY_MB fails rather than spilling health rows to disk. Results sent back to the client may still reach its configured model provider.

Use health_schema to inspect tables, columns, units, and sample rows. health_query accepts one DuckDB analytical statement from the SELECT family; health_report produces summaries. SQL safeguards do not isolate the process. Run it through a trusted local MCP client and do not expose it to untrusted network clients. Reports summarize recorded measurements; they are not medical advice.

What it helps with

  • inspect tables and fields in an Apple Health export
  • compare sleep records across a chosen period
  • analyze workout entries with DuckDB
  • create a weekly or monthly health summary

Example prompts for the agent

  • Show me the tables and fields in my Apple Health export.
  • Compare my sleep records across recent weeks.
  • Create a monthly summary of workouts and health metrics.

How to install Apple Health

Platform CLI

claude mcp add --env HEALTH_DATA_DIR=<HEALTH_DATA_DIR> --env MAX_MEMORY_MB=<MAX_MEMORY_MB> --env CACHE_SIZE=<CACHE_SIZE> --transport stdio apple-health -- npx -y @neiltron/apple-health-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Apple Health

How do I install Apple Health in Claude Code?

Set HEALTH_DATA_DIR to the directory with your unzipped CSV export, then run claude mcp add apple-health-mcp -e HEALTH_DATA_DIR=<HEALTH_DATA_DIR> -- npx -y @neiltron/apple-health-mcp.

What does the Apple Health MCP server do?

It reads Apple Health CSV exports and lets an MCP client inspect their schema, run DuckDB analysis, and produce summaries of recorded health data.

Which Apple Health export format does it support?

Use a CSV export created with Simple Health Export CSV. The server does not read native export.xml files and requires Node.js 22 or later.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor