PluginBench
MCP Server
Active
MIT

Apple Health MCP Server

io.github.neiltron/apple-health-mcp

Query your Apple Health data locally with SQL—sleep, workouts, heart metrics.

What is the Apple Health MCP server?

The Apple Health MCP server is a local-first tool that lets you query Apple Health data using SQL and DuckDB. It reads CSV exports from the Simple Health Export app and provides tools for schema discovery, read-only queries, and health summaries without uploading your data.

This server bridges Apple Health and AI agents by exposing your health data (sleep, workouts, heart rate, etc.) through SQL queries. All processing happens locally on your machine—your data never leaves your device. Use it to ask questions about trends, generate summaries, or integrate health insights into workflows.

How to install Apple Health

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • HEALTH_DATA_DIR
    required

    Path to the Apple Health CSV export directory

  • MAX_MEMORY_MB

    Maximum memory usage in megabytes

  • CACHE_SIZE

    Maximum number of cached query results

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "apple-health-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@neiltron/apple-health-mcp"
      ],
      "env": {
        "HEALTH_DATA_DIR": "<YOUR_HEALTH_DATA_DIR>",
        "MAX_MEMORY_MB": "<YOUR_MAX_MEMORY_MB>",
        "CACHE_SIZE": "<YOUR_CACHE_SIZE>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • health_schema — Discover table names, columns, units, and sample rows from your Apple Health export.
  • health_query — Run read-only SELECT queries against your health data with JSON, CSV, or summary output.
  • health_report — Generate weekly, monthly, or custom health summaries from your recorded data.

Use cases

  • Ask about sleep patterns, workout frequency, or heart rate trends over weeks or months.
  • Generate a weekly health summary to track progress toward fitness goals.
  • Query specific metrics (e.g., average steps per day, total workout duration) using SQL.
  • Discover correlations between different health measurements in your data.
  • Export health insights as JSON or CSV for further analysis.

Apple Health MCP server FAQ

What is the Apple Health MCP server?

It's a local-first tool that lets you query your Apple Health data using SQL. It reads CSV exports from the Simple Health Export app and provides tools to discover your data schema, run queries, and generate health summaries—all without uploading your data.

Is it free?

Yes, the Apple Health MCP server is open-source and MIT-licensed. You only need Node.js 22+ and the Simple Health Export CSV app (available on the App Store).

How do I install it in Claude Desktop?

Add the server to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json with the npx command and set HEALTH_DATA_DIR to your unzipped health export directory. Restart Claude Desktop after configuration.

Does it upload my health data?

No. The server runs entirely on your machine and reads CSV files locally. It never uploads your export or makes network requests, though query results sent to Claude may be processed by Anthropic's servers.

What health data can I query?

You can query any data included in your Apple Health CSV export: sleep, workouts, heart rate, steps, and other metrics. Table names depend on what's in your export.

What are the system requirements?

Node.js 22 or newer, and a CSV export from the Simple Health Export app (native Apple Health XML is not supported). The default 2GB memory limit works for ~2 years of multi-table data.

README (reference)

Source of truth, from the repository.

Apple Health MCP Server

npm version License: MIT

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.

Requirements

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

VariableRequiredDefaultPurpose
HEALTH_DATA_DIRYes—Directory containing the exported CSV files
MAX_MEMORY_MBNo2048DuckDB memory limit in megabytes
CACHE_SIZENo100Maximum number of cached query results

Export health data

  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.

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

ToolPurpose
health_schemaDiscover table names, columns, units, and sample rows
health_queryRun a read-only SELECT query with JSON, CSV, or summary output
health_reportGenerate 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.

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 sourceName where 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.

License

MIT

Related MCP servers

Model Context Protocol server for Clypt — submit podcast URLs, receive clips and trailer.

0
TypeScript
MIT
View repository →
TETerrarium logo

Terrarium

Maintained

Human visual review for agent-built HTML: publish artifacts, pull anchored comments, push fixes.

2
View repository →

Run Neo4j Graph Data Science algorithms through Claude, Cursor, and other LLMs via MCP.

96
Python
MIT
View repository →

Manage Neo4j Aura database instances via natural language through Claude and other MCP clients.

979
Python
MIT
View repository →

Run Cypher queries against Neo4j databases using natural language.

979
Python
MIT
View repository →

Create, validate, and visualize Neo4j graph data models with interactive tools and Arrows.app integration.

979
Python
MIT
View repository →