apple-health-mcp-server

Query Apple Health XML export data with natural language via MCP tools.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill apple-health-mcp-server-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: apple-health-mcp-server
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/apple-health-mcp-server
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill apple-health-mcp-server-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Apple Health exports arrive as massive XML files that are difficult to query or analyze without writing custom parsing code and SQL. This Skill parses the export, loads it into a queryable database, and exposes MCP tools so an LLM can answer health data questions in natural language. ## Core Features & Use Cases - XML Import & Storage: Parse Apple Health XML exports and load records into DuckDB, Elasticsearch, or ClickHouse backends. - Natural Language Health Queries: Search records, generate statistics, and analyze trends through MCP tools like search_records, generate_statistics, and analyze_trends without writing SQL. - Use Case: Ask your AI assistant "What were my average daily steps last month?" and it calls generate_statistics on HKQuantityTypeIdentifierStepCount with daily aggregation to return a month-long activity summary. ## Quick Start Set up the Apple Health MCP server with my export.xml file using the DuckDB backend and show me my step count trends for the last 30 days.

Frequently Asked Questions about apple-health-mcp-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Apple Health data with natural language?▼

Install the apple-health-mcp-server, point it at your Apple Health export XML, and register it in your MCP client configuration. The LLM then calls tools like search_records and generate_statistics to answer health questions without SQL.

How to import Apple Health XML export into a database?▼

Set APPLE_HEALTH_EXPORT_PATH to your unzipped export.xml, choose a STORAGE_BACKEND (duckdb, elasticsearch, or clickhouse), then run python -m apple_health_mcp_server.import_data to parse and load the records.

DuckDB vs Elasticsearch vs ClickHouse for Apple Health data?▼

DuckDB is the default local file backend suited for personal use. Elasticsearch fits scalable full-text search workloads, while ClickHouse targets analytics-heavy queries on large datasets.

Does the Apple Health MCP server work with Claude Desktop?▼

Yes, it works with any MCP-compatible client including Claude Desktop and Cursor. Add a mcpServers entry with the python command, module arguments, and environment variables to claude_desktop_config.json.

Why does Apple Health data import fail with file not found?▼

The export ZIP must be unzipped first, and APPLE_HEALTH_EXPORT_PATH must point to the actual export.xml inside the apple_health_export folder. Verify the path with ls and check that the environment variable is set.

Why are queries slow on large Apple Health datasets?▼

DuckDB can slow down on very large exports. Switch STORAGE_BACKEND to ClickHouse for analytics workloads or Elasticsearch for search, and add indexes on record type and start_date columns.