The Apple Health MCP server enables users to query their Apple Health data using SQL through DuckDB, powered by a natural language interface. It provides tools for executing SQL queries, generating automated health reports, and caching results efficiently, while supporting lazy loading of configurable time windows. The server solves the problem of accessing and analyzing Apple Health data by accepting CSV exports from the Simple Health Export app and making that data queryable through standard SQL syntax.
An MCP (Model Context Protocol) server for querying Apple Health data using SQL. Built with DuckDB for fast, efficient health data analysis.
[!NOTE]
This project currently relies on the Simple Health Export CSV app by Eric Wolter. See Exporting Data below for more info on how best to use the app.This is currently the easiest way I could find to quickly and reliably get Apple Health data exported in CSV format. If you have ideas of better ways to import data, please submit an issue.
No installation required! Use directly with npx via Claude Desktop or other MCP clients.
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"apple-health": {
"command": "npx",
"args": ["@neiltron/apple-health-mcp"],
"env": {
"HEALTH_DATA_DIR": "/path/to/your/health/export"
}
}
}
}
HEALTH_DATA_DIR (required): Path to your Apple Health CSV export directoryMAX_MEMORY_MB (optional): Maximum memory usage in MB (default: 1024)CACHE_SIZE (optional): Number of cached query results (default: 100){
"mcpServers": {
"apple-health": {
"command": "npx",
"args": ["@neiltron/apple-health-mcp"],
"env": {
"HEALTH_DATA_DIR": "/Users/yourname/Downloads/HealthAll_2025-07-202_01-04-39_SimpleHealthExportCSV",
"MAX_MEMORY_MB": "2048"
}
}
}
}
To use get your data:
All button in the app to download all data for your desired time range (default 1 month).HEALTH_DATA_DIR value in your MCP config. See Example Configuration above.health_schema: Get information about available tables and their structurehealth_query: Execute SQL queries directly on your health datahealth_report: Generate comprehensive health reportsThe server expects Apple Health data exported as CSV files with the following naming pattern:
HKQuantityTypeIdentifier*.csv - Quantitative health metricsHKCategoryTypeIdentifier*.csv - Categorical health dataHKWorkoutActivityType*.csv - Workout and activity dataEach CSV file should have these columns:
type: The specific health metric typesourceName: Source device/appstartDate: Start timestamp (UTC)endDate: End timestamp (UTC)value: The measurement valueunit: Unit of measurementFor local development:
# Clone and install dependencies
git clone https://github.com/neiltron/apple-health-mcp.git
cd apple-health-mcp
npm install
# Build the project
npm run build
# Type checking
npm run typecheck
MAX_MEMORY_MB or use shorter time windowshkquantitytypeidentifierheartrate)Contributions are welcome! Please ensure:
MIT
hovecapital/read-only-local-postgres-mcp-server
cocaxcode/database-mcp
io.github.infoinlet-marketplace/mcp-mysql
io.github.cybeleri/database-admin
io.github.yash-0620/postgres-mcp-secured