Is there an MCP server for Apple Health?

Updated

Yes: healthsql mcp is a local MCP server for your whole Apple Health record, with two read-only tools, one that describes your data and one that runs SQL on it. It runs on your Mac over stdio, so the client starts it and nothing listens on the network.

HealthSQL is an iPhone app and a command-line tool that copy your whole Apple Health record into a local SQLite database on your computer, so AI agents can query it with SQL or MCP. The iPhone app keeps the database current through your iCloud Drive; the MCP server reads it.

Connect your client

Install the command first (setup). Then one command registers the server:

ClientCommandWhat it does
Claude Codehealthsql connect claude-codeRuns claude mcp add --scope user healthsql -- <path> mcp, so every session has it.
Codexhealthsql connect codexRuns codex mcp add healthsql -- <path> mcp.
Claude Desktophealthsql connect claude-desktopAdds healthsql to ~/Library/Application Support/Claude/claude_desktop_config.json. Restart Claude Desktop.
Cursorhealthsql connect cursorAdds healthsql to ~/.cursor/mcp.json. Restart Cursor.

<path> is where the command is, usually ~/.local/bin/healthsql. Before it changes a JSON file, the command keeps the old one beside it, ending in .before-healthsql, and it leaves every other server in the file as it was. healthsql connect with no name lists the clients it finds on this Mac.

Any other MCP client

Add a stdio server with the command's full path and the argument mcp. In the common JSON shape:

{
  "mcpServers": {
    "healthsql": {
      "command": "/Users/you/.local/bin/healthsql",
      "args": ["mcp"]
    }
  }
}

healthsql connect prints this block with your own path in it.

The two tools

The descriptions below are the ones the server sends to your client.

health_overview

What the user's Apple Health database holds: when their iPhone last synced, each view with its columns and when to use it, example queries, and every metric with its unit and date range. Call this first, once.

Input: none. Read-only.

health_query

Run one read-only SQLite query on the user's Apple Health database and get rows as JSON (at most 2000; aggregate or LIMIT). Start from the daily view (one row per day: steps, energy, resting heart rate, HRV, sleep, weight and more), nights for sleep, workouts for training. health_overview lists every view and column.

Input: sql (One SQLite SELECT statement). Read-only.

When the client connects, the server also gives the model these instructions:

The user's whole Apple Health record, in a local SQLite database that their iPhone keeps current. Call health_overview once to learn the views, then health_query with SQL. For any daily number use the daily or days view: they hold Apple Health's own totals. Never sum samples for a day; several devices record the same steps. Each answer carries phone_synced (how fresh the data is) and, when something is wrong, a problem line that says what the user must do; tell them. If the data cannot answer what the user needs, or something looks wrong, tell them they can write to contact@dkbuilds.co.

Every answer carries phone_synced, the time of the iPhone's last export, so the agent can say how fresh its answer is. A query returns at most 2000 rows; the database is opened read-only, so no query can change it. The server speaks MCP versions 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05.

Questions to ask

Once it is connected, ask in plain words. The agent calls health_overview once, then writes SQL.

For "what does my last week look like", the agent writes something like:

SELECT day, steps, active_kcal, resting_hr, hrv_ms, asleep_min FROM daily ORDER BY day DESC LIMIT 7

The full list of views and columns is in the schema reference.

Other Apple Health MCP servers

There are several kinds, as of November 2026:

HealthSQL is the local kind with a current record: the iPhone app exports by itself, the database stays on your Mac, and the agent writes any SQL it needs.

Questions

Does the MCP server need the internet?

No. It reads a database on your Mac. iCloud Drive brings new files from the iPhone in the background, the same way it syncs any file.

Can the agent change my Health data?

No. The database is opened read-only, both tools are marked read-only, and nothing is ever written back to Apple Health.

Does it work with a local model?

Yes, with any client that can start a stdio MCP server. With a model that runs on your Mac, the rows the agent reads stay on your Mac. With a hosted model, they go to its provider.

Why SQL and not fixed tools?

Fixed tools answer the questions their author thought of. With SQL the agent can join sleep to workouts, group by week, or compare one month to another, in one query.