Apple Health MCP

by neiltron

Not rated
GitHub

About

Query Apple Health data using natural language and SQL.

Details

Author
neiltron
Categories
Database, Other

Setup

Install Apple Health MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/neiltron/apple-health-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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, read-only queries, and health summaries.

- Node.js 22 or newer
- An Apple Health CSV export created withSimple Health Export CSV

The native Apple Healthexport.xmlformat is not currently supported.

For Claude Desktop, add the following to~/Library/Application Support/Claude/claude_desktop_config.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, andstdiotransport.
- Install and open Simple Health Export CSV on your iPhone.
- SelectAlland choose the time range to export.
- Transfer the archive to the computer running your MCP client.
- Unzip it and setHEALTH_DATA_DIRto 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.

Start withhealth_schema; table names depend on the files in your export. SeeQuerying Apple Health datafor the data model and working examples.

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 theMAX_MEMORY_MBlimit described above. Roughly 1 GiB covers a two-year multi-table export, so the 2048MB default leaves headroom; raiseMAX_MEMORY_MBfor 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.

- 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 forsourceNamewhere appropriate.
- Health reports summarize recorded data and are not medical advice.

git clone https://github.com/neiltron/apple-health-mcp.git cd apple-health-mcp bun install npm test npm run typecheck npm run build

SeeArchitecturefor the code layout, data lifecycle, and implementation constraints.

An AI-powered gateway for managing over 40 data sources like Alibaba Cloud and mainstream databases, featuring NL2SQL, code generation, and data migration.

Interact with AskTable SaaS or local deployments to query data sources using natural language.

A nutrition analysis platform integrating Canada's Food Guide recipes with Health Canada's official nutrition databases.

Interact with CrateDB using natural language for Text-to-SQL queries and documentation retrieval.

MCP servers that give AI clients safe, structured access to SQL databases. One installable package per database engine. Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.

Enables AI assistants to query, read, and move data on DICOM servers such as PACS and VNA for medical imaging.

Interact with DROMA drug-omics association analysis databases using natural language.

Enables AI assistants to query data from DataFocus using natural language.

Provides read-only access to Apache Iceberg tables via Apache Impala, allowing LLMs to inspect schemas and execute queries.

Data intelligence platform - query your database in natural language, build dashboards, and set up automated alerts that monitor your metrics 24/7.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.