apple-health
Probably the fastest Apple Health MCP server
claude mcp add --transport stdio vpetersson-apple-health-mcp-server apple-health-mcp serve --db ./health.duckdb --port 8080 --transport streamable-http
How to use
This MCP server reads and queries Apple Health export data by importing it into a DuckDB database and exposing it through an MCP interface. The server supports a range of tools for interactively exploring and analyzing health data, including listing records, querying by type and date range, obtaining statistics, and fetching workout and ECG details. Use the HTTP streamable transport to connect with AI assistants via standard MCP clients, or use stdio transport for clients that spawn the server as a subprocess.
To use, first ensure you have an Apple Health export (export.zip) and build/run the server with a DuckDB database containing the imported data. Once running, connect your MCP client to the endpoint at http://127.0.0.1:8080/mcp and issue the available tool commands such as list_record_types, query_records, get_workout_details, list_ecg_readings, and more. The included tools are designed to let you filter by date ranges, data source, and record type, enabling rich, AI-assisted querying of your health data.
How to install
Prerequisites:
- Rust toolchain (1.70+)
- Apple Health data export (export.zip) from iPhone Health app
Build and install:
cargo build --release
cp target/release/apple-health-mcp /usr/local/bin/
Prepare data export:
- Export your Apple Health data as described in the README and place the extracted export directory somewhere accessible, e.g. /path/to/apple_health_export. The export directory should contain export.xml and optional electrocardiograms/ and workout-routes/ subdirectories.
Import data into DuckDB:
apple-health-mcp import --export-dir /path/to/apple_health_export --db ./health.duckdb
Start the MCP server (streamable HTTP by default):
apple-health-mcp serve --db ./health.duckdb --port 8080 --transport streamable-http
Alternatively, for stdio transport (used by some clients), run:
apple-health-mcp serve --db ./health.duckdb --transport stdio
Additional notes
Tips and notes:
- Re-running import on the same database is safe; records are deduplicated by content hash.
- If you use stdio transport, ensure the client properly connects to stdin/stdout as per its documentation.
- The server exposes a comprehensive set of MCP tools; consult the README for the exact tool names and capabilities. If you modify the DuckDB path, ensure the process has write permissions to that file.
- When exporting large Apple Health datasets, be prepared for substantial disk usage and consider using the optional subdirectories (electrocardiograms/ and workout-routes/) to enrich your analysis.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key