← Back to directory
A

Apple Health MCP Server

Community
Query your Apple Health export locally with SQL
GitHub source repository ↗
★ 567 Stars Category · Other Very popular
67FMRS · C

A local-first Apple Health MCP server that queries a local CSV export read-only through DuckDB, exposing three tools: health_schema, health_query, and health_report. It reads files in place without uploading the export or making network requests, though query results returned to the client may be sent to that client's model provider. Best suited to users who already export with Simple Health Export CSV and value local data handling; it does not support the native export.xml and offers no persistent incremental import. Reports are not medical advice.

Reliability
11/20
Security and permissions
15/20
Maintenance
12/20
Documentation
15/20
Setup experience
14/20
Read the FMRS scoring method →

A local-first MCP server that lets AI assistants answer questions about your sleep, workouts, activity, and heart data from a local CSV export. It queries health data read-only through DuckDB and does not upload the export or make network requests. It requires Node.js 22 or newer and an Apple Health CSV export created with Simple Health Export CSV; the native export.xml format is not currently supported.

Tools

health_schema
Discover table names, columns, units, and sample rows
health_query
Run a read-only SELECT query with JSON, CSV, or summary output
health_report
Generate a weekly, monthly, or custom health summary

Setup

  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.
  5. In 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"
}
}
}
}

  1. Restart the client after changing its configuration. Other MCP clients can use the same command, arguments, environment, and stdio transport.
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"
      }
    }
  }
}

Fit and risk

Best for

  • Users who want health data to stay local rather than pass through a third-party server
  • Users who already have an Apple Health CSV export from Simple Health Export CSV
  • Quantified-self practitioners who are comfortable with SQL and DuckDB
  • Claude Desktop users working from a trusted MCP client

Not for

  • Users who only have the native Apple Health export.xml and have not converted it to CSV
  • Users who do not want query results potentially sent to the model provider configured in their MCP client
  • Anyone treating health reports as medical advice or diagnosis
  • Users who need persistent incremental import or a database reused across processes

Required permissions

  • Read the Apple Health CSV export files in the directory given by HEALTH_DATA_DIR
  • DuckDB processes data in memory, bounded by MAX_MEMORY_MB
  • The server itself makes no network requests and does not upload the export; however, query results returned to your MCP client may be sent to that client's configured model provider

Risks and side effects

  • Every tool can reach the whole configured history, so only start this server from an MCP client you trust with that data
  • Health data is sensitive; once query results are sent to a model provider they leave the local environment
  • The first request that needs a table loads that table's full CSV history, with no date window
  • Tables are held in memory; an export that does not fit within MAX_MEMORY_MB fails with an explicit error instead of spilling to disk
  • Device overlap can produce duplicate-looking measurements, so queries may need to account for sourceName
  • Health reports summarize recorded data and are not medical advice

Troubleshooting

  1. Verify Node.js is version 22 or newer
  2. Check that HEALTH_DATA_DIR points to the unzipped CSV export directory
  3. Confirm the export was created with Simple Health Export CSV; the native export.xml format is not supported
  4. If you hit a memory error, raise MAX_MEMORY_MB (roughly 1 GiB covers a two-year multi-table export)
  5. Restart the MCP client after changing its configuration
  6. Start with health_schema, since table names depend on the files in your export
  7. When you see duplicate-looking measurements, account for sourceName in queries

Use cases

Let an AI assistant answer questions about sleep, workouts, activity, and heart data
Explore the Apple Health data model yourself with read-only SQL
Generate weekly, monthly, or custom health summaries
Discover the tables and columns in your export with health_schema

Supported clients

Claude DesktopFull support