Apple Health MCP Server
Local-first Apple Health MCP server for questions about your sleep, workouts and heart data.
Apple Health scores 75 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 3 tools. Filed under Databases. GitHub shows 579 stars. Package registries report about 107 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
75 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Where the 75 comes from
22 + 20 + 9 + 10 + 4 + 10 = 75. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 9 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "neiltron-apple-health-mcp": { "command": "npx", "args": [ "-y", "@neiltron/apple-health-mcp@1.4.5" ], "env": { "HEALTH_DATA_DIR": "", "MAX_MEMORY_MB": "2048", "CACHE_SIZE": "100" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
HEALTH_DATA_DIR | Required | Path to the Apple Health CSV export directory |
MAX_MEMORY_MB | Optional | Maximum memory usage in megabytes |
CACHE_SIZE | Optional | Maximum number of cached query results |
Tools3Tool docs quality grade D
All capabilitieshealth_querytoolRun one DuckDB SELECT-family analytical statement with JSON, CSV, or summary output
health_reporttoolGenerate a weekly, monthly, or custom health summary
health_schematoolDiscover table names, columns, units, and sample rows
About
Apple Health MCP Server
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
- Node.js 22 or newer
- An Apple Health CSV export created with Simple Health Export CSV
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:
{
"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
| Variable | Required | Default | Purpose |
|---|---|---|---|
HEALTH_DATA_DIR | Yes | — | Directory containing the exported CSV files |
MAX_MEMORY_MB | No | 2048 | DuckDB memory limit in megabytes |
CACHE_SIZE | No | 100 | Maximum number of cached query results |
Export health data
- Install and open Simple Health Export CSV on your iPhone.
- Select All and choose the time range to export.
- Transfer the archive to the computer running your MCP client.
- Unzip it and set
HEALTH_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.
Tools
| Tool | Purpose |
|---|---|
health_schema | Discover table names, columns, units, and sample rows |
health_query | Run one DuckDB SELECT-family analytical statement with JSON, CSV, or summary output |
health_report | Generate 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
sourceNamewhere appropriate. - Health reports summarize recorded data and are not medical advice.
Development
git clone https://github.com/neiltron/apple-health-mcp.git
cd apple-health-mcp
bun install
npm test
npm run typecheck
npm run build
See Architecture for the code layout, data lifecycle, and implementation constraints. See Release procedure for publishing and recovery steps.
License
MIT
Frequently asked questions
What is Apple Health MCP Server?
Local-first Apple Health MCP server for questions about your sleep, workouts and heart data.
How do I install Apple Health MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Apple Health MCP Server runs locally from the npm package @neiltron/apple-health-mcp with the command npx -y @neiltron/apple-health-mcp@1.4.5.
Is Apple Health MCP Server free and open source?
Yes. Apple Health MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Apple Health MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Apple Health MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does Apple Health MCP Server provide?
Apple Health MCP Server provides 3 tools: health_query, health_report, and health_schema. See the full tool list for descriptions and parameters.
How is Apple Health MCP Server's trust score calculated?
Apple Health MCP Server scores 75 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.