Apple Health MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/daveremy/apple-health-mcp.git
cd apple-health-mcp
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add apple-health -- node "<FULL_PATH_TO_APPLE_HEALTH_MCP>/dist/index.js"

Replace <FULL_PATH_TO_APPLE_HEALTH_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Query Apple Health metrics, workouts, and trends from local CSV exports

apple-health-mcp

An MCP server for Apple Health data. Reads daily health metrics and workouts exported by the Health Auto Export iOS app.

Features

  • MCP Server: 3 tools for querying Apple Health data from Claude Code or any MCP client
  • No API keys needed: Reads local CSV files exported by Health Auto Export to iCloud Drive
  • Comprehensive: Steps, HR, HRV, SpO2, sleep stages, body composition, workouts

MCP Tools

Tool Description
apple_health_daily Daily summary: steps, energy, HR, HRV, sleep stages, body comp, workouts
apple_health_workouts Workout sessions for a date (type, duration, HR, calories, distance)
apple_health_trends Multi-day trends for steps, HR, HRV, sleep, weight

Setup

1. Set up Health Auto Export on iPhone

This MCP server reads CSV files produced by Health Auto Export, a third-party iOS app that automatically exports Apple Health data to iCloud Drive. The app runs in the background and syncs new data throughout the day.

  1. Install Health Auto Export from the App Store
  2. Open the app and grant it access to Apple Health data when prompted
  3. Go to Automations and create two automations:
    • Daily Metrics: Select the health metrics you want (steps, heart rate, sleep, etc.), set format to CSV, frequency to Daily, and destination to iCloud Drive
    • Workouts: Select workout data, set format to CSV, frequency to Daily, and destination to iCloud Drive
  4. The app will export CSV files to iCloud Drive, which syncs automatically to your Mac at:
    ~/Library/Mobile Documents/iCloud~com~ifunography~HealthExport/Documents/
    
  5. Verify the files are syncing by checking that the directory contains Daily Export/ and Workouts/ folders with dated CSV files

2. Install

git clone https://github.com/daveremy/apple-health-mcp.git
cd apple-health-mcp
npm install
npm run build

3. Use as MCP Server

Add to your Claude Code project's .mcp.json:

{
  "mcpServers": {
    "apple-health": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/apple-health-mcp/dist/mcp.js"]
    }
  }
}

Or register with the Claude CLI:

claude mcp add apple-health --scope project -- node /path/to/apple-health-mcp/dist/mcp.js

Custom Export Directory

If your Health Auto Export saves to a different location, set the environment variable:

{
  "env": {
    "APPLE_HEALTH_EXPORT_DIR": "/path/to/your/export/directory"
  }
}

Data Format

The server expects the CSV file structure produced by Health Auto Export:

Documents/
  Daily Export/
    HealthMetrics-YYYY-MM-DD.csv
  Workouts/
    Workouts-YYYY-MM-DD.csv

Requirements

License

MIT

Tools (3)

apple_health_dailyProvides a daily summary including steps, energy, HR, HRV, sleep stages, body composition, and workouts.
apple_health_workoutsRetrieves workout sessions for a specific date including type, duration, HR, calories, and distance.
apple_health_trendsAnalyzes multi-day trends for steps, HR, HRV, sleep, and weight.

Environment Variables

APPLE_HEALTH_EXPORT_DIRCustom directory path for Health Auto Export CSV files if not using the default iCloud path.

Configuration

claude_desktop_config.json
{"mcpServers": {"apple-health": {"type": "stdio", "command": "node", "args": ["/path/to/apple-health-mcp/dist/mcp.js"]}}}

Try it

What was my average heart rate and sleep duration over the last 7 days?
Show me a summary of my workout activity for yesterday.
Analyze my step count trends for the past month.
Did I meet my activity goals based on my health data from last week?

Frequently Asked Questions

What are the key features of Apple Health MCP?

Query Apple Health data directly from local CSV files. Supports daily metrics, workout sessions, and multi-day trends. No API keys required as it reads local iCloud Drive exports. Compatible with Health Auto Export iOS app data structure.

What can I use Apple Health MCP for?

Analyzing long-term fitness trends to optimize workout routines. Correlating sleep quality data with daily activity levels. Reviewing heart rate variability to monitor recovery and stress. Summarizing weekly health performance for personal health tracking.

How do I install Apple Health MCP?

Install Apple Health MCP by running: git clone https://github.com/daveremy/apple-health-mcp.git && cd apple-health-mcp && npm install && npm run build

What MCP clients work with Apple Health MCP?

Apple Health MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Apple Health MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare