Apple Health MCP Server
The open-source Model Context Protocol server for Apple Health. Lets Claude Desktop, Cursor, and any MCP client query your steps, sleep, HRV, workouts, and more — entirely on your Mac, with zero cloud upload.
Claude → MCP → Mac app → HealthKit. All on your machine.
health-analyzer-mcp on npm
·
MIT licensed
Prerequisite: install the Health Data AI Analyzer Mac app — it hosts the local API the MCP server talks to. No Mac app → no API → no MCP.
What is an Apple Health MCP server?
The Model Context Protocol (MCP) is an open standard that lets AI assistants discover and call tools on your behalf. Anthropic introduced it in late 2024 and clients like Claude Desktop, Cursor, Cline, and OpenClaw now speak it natively.
An Apple Health MCP server is a small program that translates between MCP and your HealthKit data. Instead of pasting JSON into a chat, your AI assistant can ask the server directly: "what were my step counts last week?" → the server hits the local API → returns a compact answer.
How it works (and why nothing leaves your Mac)
Claude Desktop / Cursor (on your Mac)
↓ spawns via stdio
health-analyzer-mcp (Node process, also on your Mac)
↓ HTTP to localhost:8765
Health Data AI Analyzer app (running on your Mac)
↓ reads from
HealthKit / parsed export.xml (on your Mac)
The entire pipeline is loopback — 127.0.0.1 never leaves the network interface. Your HealthKit data is never uploaded to a cloud service by this MCP server. The only data that ever leaves your Mac is whatever you explicitly ask your AI client to reason about (and only to whichever AI provider that client is configured to use).
The 11 tools exposed
All tools are read-only and annotated with the MCP readOnlyHint: true flag so clients know they're safe to call without prompting:
Install (Claude Desktop)
Open your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the health-analyzer server:
{
"mcpServers": {
"health-analyzer": {
"command": "npx",
"args": ["-y", "health-analyzer-mcp"]
}
}
}
Restart Claude Desktop. Open a new conversation and ask: "What did my heart rate look like last week?" — Claude will discover and call get_heart_rate automatically.
Install (Cursor)
Cursor uses the same MCP spec. In Cursor Settings → MCP, add:
{
"mcpServers": {
"health-analyzer": {
"command": "npx",
"args": ["-y", "health-analyzer-mcp"]
}
}
}
Example prompts
What were my step counts and sleep duration for the last 14 days?
Are there any week-over-week trends in my resting heart rate?
Pull my HRV for the past 30 days and look for signs of overtraining
or stress accumulation. Be explicit about confidence.
Give me yesterday's daily health brief and suggest one experiment
for the coming week based on what you see.
Privacy & security
- The MCP server only binds to localhost — never the network
- Most API routes require an auth token written by the Mac app to its sandboxed container
- The server is ~330 lines of open-source Node — auditable in 10 minutes
- Only the response payload your AI asks for ever leaves your Mac, and only to the AI provider you've configured
Related
- Apple Health Local API docs — the API the MCP server talks to
- Apple Health + Claude — using Claude with the Local API directly
- OpenClaw + Apple Health — alternative MCP client
- Apple Health + AI hub
Plug Apple Health into your AI assistant
Install the Mac app, add a 4-line config snippet, restart Claude or Cursor. Done.