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.
Agenten stärken
Der eigene Befehl des Herausgebers. Kein PlugMCP-Endpunkt.
Host a copy with our keys and logs.
npx -y @neiltron/[email protected]Claude Code hat keinen Installationslink für einen lokalen Befehl. Kopieren Sie den Befehl unten und führen Sie ihn in einem Terminal aus.
HEALTH_DATA_DIR=<value> MAX_MEMORY_MB=<value> CACHE_SIZE=<value> claude mcp add neiltron-apple-health-mcp -- npx -y @neiltron/apple-health-mcp@1.4.5In einem Terminal ausführen.
{ "mcpServers": { "neiltron-apple-health-mcp": { "command": "npx", "args": [ "-y", "@neiltron/[email protected]" ], "env": { "HEALTH_DATA_DIR": "<value>", "MAX_MEMORY_MB": "<value>", "CACHE_SIZE": "<value>" } } }}claude_desktop_config.json
Remote-URL oder ein Befehl auf Ihrem Rechner? Worin sich die beiden Installationen unterscheiden
Auf PlugMCP ausführen
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
StartenVom Herausgeber
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.
Local-first Apple Health MCP server. Lets AI assistants answer questions about your sleep, workouts, activity and heart data from a local export.
The native Apple Health export.xml format 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, and stdio transport.
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.
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.
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.
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:
sourceName where appropriate.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.
MIT
Local-first Apple Health MCP server. Lets AI assistants answer questions about your sleep, workouts, activity and heart data from a local export.
{ "mcpServers": { "neiltron-apple-health-mcp": { "command": "npx", "args": [ "-y", "@neiltron/[email protected]" ], "env": { "HEALTH_DATA_DIR": "<value>", "MAX_MEMORY_MB": "<value>", "CACHE_SIZE": "<value>" } } }}Tools
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
Der Herausgeber nennt diese Umgebungsvariablen: HEALTH_DATA_DIR, MAX_MEMORY_MB, CACHE_SIZE.
Apple Health läuft lokal über stdio.
Zuletzt geprüft: 2026-11-17. Local-first Apple Health MCP server. Lets AI assistants answer questions about your sleep, workouts, activity and heart data from a local export.