home / mcp / apple health mcp server

Apple Health MCP Server

MCP server for querying Apple Health data with natural language and SQL

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "neiltron-apple-health-mcp": {
      "command": "npx",
      "args": [
        "@neiltron/apple-health-mcp"
      ],
      "env": {
        "CACHE_SIZE": "100",
        "MAX_MEMORY_MB": "2048",
        "HEALTH_DATA_DIR": "/path/to/your/health/export"
      }
    }
  }
}

You can query your Apple Health data using SQL through an MCP server built for fast analysis with DuckDB. It loads data from a CSV export, letting you run complex queries, generate automated health reports, and cache results for repeated use.

How to use

Connect to the Apple Health MCP server from your MCP client (for example Claude Desktop). You will point your client at the MCP entry and provide access to the local Apple Health CSV export directory. Use your client’s built‑in features to run SQL queries, generate health reports on a schedule, and reuse cached results to speed up repeated analyses.

How to install

You do not need a separate installation process. Run the MCP server via your MCP client using npx. Ensure you have a local Apple Health CSV export available and set the export path in your client configuration.

{
  "mcpServers": {
    "apple_health": {
      "command": "npx",
      "args": ["@neiltron/apple-health-mcp"],
      "env": {
        "HEALTH_DATA_DIR": "/path/to/your/health/export",
        "MAX_MEMORY_MB": "2048",
        "CACHE_SIZE": "100"
      }
    }
  }
}

Additional steps and tips

Prepare your data by exporting Apple Health data to CSV files, then place them in a directory you can reference as HEALTH_DATA_DIR. The following environment variables control runtime behavior: HEALTH_DATA_DIR (required): path to the Apple Health CSV export directory; MAX_MEMORY_MB (optional): maximum memory usage in MB; CACHE_SIZE (optional): number of cached query results.

Exporting data

To collect data for the MCP server, use the Simple Health Export CSV app on iOS. Open the app, choose All to export data for your desired time range, and transfer the resulting CSV files to your computer. Unzip the files and point the MCP server’s HEALTH_DATA_DIR to the resulting folder.

Notes on usage

The MCP server provides tools to inspect the available data structures, execute SQL against your health data, and generate comprehensive health reports. It supports lazy loading with configurable time windows and smart caching to improve performance on repeated queries.

Available tools

health_schema

Get information about available tables and their structure

health_query

Execute SQL queries directly on your health data

health_report

Generate comprehensive health reports