Health Access MCP / Connect an AI / Claude Code

Connect an AI

Apple Health in Claude Code

One command registers the server. After that, Claude Code can list your Apple Watch workouts, open a session with every interval and heart rate, read your vitals, and write a plan that lands on your Watch.

Before you start

  1. The Health Access app on your iPhone has written files into your folder, and that folder syncs to this computer (iCloud Drive, Dropbox, Google Drive, OneDrive, Box).
  2. Node.js 18 or newer is installed, so npx exists. Check: npx --version. If not, install it from nodejs.org or with brew install node.

Register the server

claude mcp add --scope user healthaccess -- npx -y healthaccess-mcp

The same thing as a project file, .mcp.json in the project root, if you prefer to check it into a repository:

{
  "mcpServers": {
    "healthaccess": {
      "command": "npx",
      "args": ["-y", "healthaccess-mcp"]
    }
  }
}

Check

claude mcp list                         # healthaccess should show as connected
npx -y healthaccess-mcp --check         # prints the folder it found and where from

Inside a Claude Code session, /mcp lists the server and its thirteen tools: list_workouts, get_workout, get_vitals, training_summary, rate_workout, push_plan, get_plan_status, list_plans, get_day, get_days, get_catalog, get_profile, list_ecgs. The Health Access app shows "Connected" once a session has started the server.

Then say to it

List my last 5 workouts, one line each. Then open the newest one and tell me in plain words what the parts were and where the heart rate went. Before you judge it, ask me how it felt.

If you want ideas for what to ask next, the six prompts are suggestions in the shape that works: ask first, read second, write last.

If something is off