Skip to main content
Glama

apple-health-mcp

MCP server that loads your Apple Health export into an in-memory SQLite database and exposes it to LLMs via the Model Context Protocol.

Quick start

uvx apple-health-mcp --input ~/Downloads/export.zip

Or install it permanently:

uv tool install apple-health-mcp
apple-health-mcp --input ~/Downloads/export.zip

Related MCP server: garmin-givemydata

Exporting your data from Apple Health

  1. Open the Health app on your iPhone

  2. Tap your profile picture (top-right)

  3. Scroll down and tap Export All Health Data

  4. Confirm — this may take a few minutes

  5. Save or AirDrop the resulting export.zip to your Mac

Claude Desktop integration

Add this to your claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "apple-health": {
      "command": "uvx",
      "args": [
        "apple-health-mcp",
        "--input",
        "/absolute/path/to/export.zip"
      ]
    }
  }
}

Restart Claude Desktop. The tools will appear in the tools menu.

MCP tools

list_metrics()

Returns every distinct record type and its count.

list_workout_types()

Returns every distinct workout activity type and its count.

summary(metric, period)

Aggregates a metric by day, week, or month. Returns count, avg, min, max, and sum.

summary("StepCount", "week")
summary("HeartRate", "month")

query(sql)

Run arbitrary read-only SQL against the database. Only SELECT statements are allowed.

Schema:

records(type, source_name, unit, value, start_date, end_date)
workouts(activity_type, source_name, duration, duration_unit,
         total_energy_kcal, total_distance, distance_unit, start_date, end_date)

Examples:

-- Daily step totals for the last 30 days
SELECT substr(start_date, 1, 10) AS day, sum(CAST(value AS REAL)) AS steps
FROM records WHERE type = 'StepCount'
GROUP BY day ORDER BY day DESC LIMIT 30;

-- Longest runs
SELECT start_date, duration, total_distance, distance_unit
FROM workouts WHERE activity_type = 'Running'
ORDER BY total_distance DESC LIMIT 10;

Environment variable

Instead of --input, you can set:

export HEALTH_EXPORT_PATH=~/Downloads/export.zip

Development

git clone https://github.com/smarzola/apple-health-mcp
cd apple-health-mcp
uv sync                         # install deps + dev tools
uv run pytest                   # run tests
uv run apple-health-mcp --input ~/Downloads/export.zip

Lint, format & typecheck

uv run ruff check src/ tests/          # lint
uv run ruff format --check src/ tests/ # format check
uv run mypy src/                       # typecheck

Auto-fix:

uv run ruff check --fix src/ tests/    # auto-fix lint
uv run ruff format src/ tests/         # auto-format

Pre-commit hooks

uv run pre-commit install     # one-time setup
# Now ruff + mypy run automatically on every commit

Cutting a release

gh release create v0.2.0 --generate-notes
# Triggers GitHub Actions → builds → publishes to PyPI → smoke tests

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Local-first MCP server that reads Apple Health export files (export.xml/zip) and exposes activity, sleep, HRV, and workout data to AI agents, keeping all data on your machine.
    18
    171
    1
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    Downloads all your Garmin health and fitness data into a local SQLite database and exposes 45 MCP tools for AI analysis, enabling assistants to query sleep, training load, HRV, and more.
    138
    AGPL 3.0
  • F
    license
    B
    quality
    D
    maintenance
    Enables Claude to answer natural language questions about your Apple Health data by analyzing local CSV exports, supporting metrics like steps, heart rate, sleep, and more.
    6
    2

View all related MCP servers

Related MCP Connectors

  • 63 tools for Apple Health, Fitbit, Oura & Health Connect data in Claude, ChatGPT, Grok & Mistral.

  • Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.

  • Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smarzola/apple-health-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server