MCP Directory

Apple Health MCP Server

Query your Apple Health data with natural language via Elasticsearch, ClickHouse, or DuckDB.

Unverified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
git clone https://github.com/the-momentum/apple-health-mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "apple-health-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--init",
        "--mount",
        "type=bind,source=<project-path>/{xml-file-name}.xml,target=/root_project/raw.xml",
        "--mount",
        "type=bind,source=<project-path>/config/.env,target=/root_project/config/.env",
        "-e",
        "ES_HOST=host.docker.internal",
        "mcp-server:latest"
      ]
    }
  }
}

Requires Docker to be installed and running.

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Docker (recommended) or uv for dependency management
  • Clone the repository and copy config/.env.example to config/.env
  • An Apple Health data export as an XML file placed on your filesystem
  • A backing store populated from the XML: Elasticsearch (make es), ClickHouse (make ch), or DuckDB (make duckdb)

About Apple Health MCP Server

An MCP server for querying Apple Health data with natural language. It imports Apple Health XML exports into Elasticsearch, ClickHouse, or DuckDB and exposes MCP tools for structure analysis, record search, type-based extraction, summaries, statistics, and trend analysis. Built on FastMCP, with Docker support and extensive .env configuration.

Tools & capabilities (18)

get_xml_structure

Analyze the structure and metadata of your Apple Health XML export (file size, tags, types).

search_xml_content

Search for specific content in the XML file (by attribute value, device, type, etc.).

get_xml_by_type

Extract all records of a specific health record type from the XML file.

get_health_summary_es

Get a summary of all Apple Health data in Elasticsearch (total count, type breakdown, etc.).

search_health_records_es

Flexible search for health records in Elasticsearch with advanced filtering and query options.

get_statistics_by_type_es

Get comprehensive statistics (count, min, max, avg, sum) for a specific health record type in Elasticsearch.

get_trend_data_es

Analyze trends for a health record type over time (daily, weekly, monthly, yearly) in Elasticsearch.

search_values_es

Search Elasticsearch for records with exactly matching values (including text).

get_health_summary_ch

Get a summary of all Apple Health data in ClickHouse (total count, type breakdown, etc.).

search_health_records_ch

Flexible search for health records in ClickHouse with advanced filtering and query options.

get_statistics_by_type_ch

Get comprehensive statistics (count, min, max, avg, sum) for a specific health record type in ClickHouse.

get_trend_data_ch

Analyze trends for a health record type over time (daily, weekly, monthly, yearly) in ClickHouse.

search_values_ch

Search ClickHouse for records with exactly matching values (including text).

get_health_summary_duckdb

Get a summary of all Apple Health data in DuckDB (total count, type breakdown, etc.).

search_health_records_duckdb

Flexible search for health records in DuckDB with advanced filtering and query options.

get_statistics_by_type_duckdb

Get comprehensive statistics (count, min, max, avg, sum) for a specific health record type in DuckDB.

get_trend_data_duckdb

Analyze trends for a health record type over time (daily, weekly, monthly, yearly) in DuckDB.

search_values_duckdb

Search DuckDB for records with exactly matching values (including text).

When to use it

  • Analyze your Apple Health data types and how much data is available
  • Summarize daily activity statistics and review recent trends
  • Summarize and compare workouts (e.g. running) across specific months
  • Surface hidden trends in health data via auto-generated queries instead of manual SQL

Security notes

Runs locally and reads your exported Apple Health XML data from your filesystem; no external API key is required. The Docker config mounts your health data file, the app directory, and your config/.env into the container. Apple Health data is sensitive personal health information, so keep your exports and config private.

Apple Health MCP Server FAQ

Which databases are supported as a backend?

Elasticsearch, ClickHouse, and DuckDB. You populate the chosen backend from your Apple Health XML export using make es, make ch, or make duckdb.

How do I get my Apple Health data in?

Export your Apple Health data as an XML file from your iPhone, place it on your filesystem (the project root by default), and import it into your chosen backend before running the server.

How do I run it with an MCP client?

Either via Docker (recommended) by building the image with make build and adding the docker-mcp-server config, or locally with uv run by adding the uv-mcp-server config. Both are stdio-based and added to your LLM client's mcpServers settings.

Does it require an API key?

No. The server runs locally against your own exported data and your chosen local/self-hosted database; no external API key is needed for the MCP server itself.

Alternatives to Apple Health MCP Server

Compare all alternatives →

Official MCP server providing persistent, file-backed knowledge-graph memory across sessions.

Verified
stdio (local)
No auth
TypeScript
9 tools
Updated 5 months agoRepo

Structured step-by-step reasoning tool for breaking problems into revisable thought sequences.

Verified
stdio (local)
No auth
TypeScript
1 tool
Updated 6 months agoRepo

Fully managed remote server for AWS docs, blogs, What's-New and Well-Architected guidance — no key.

Verified
HTTP (remote)
No auth
Hosted
6 tools
Updated 5 months agoRepo