All documentation

Going further

The MCP server

Thirteen read-only tools over your local database.

Transport
JSON-RPC 2.0 over stdio
Protocol
2024-11-05
Access
Read-only by construction

The Mac app serves its local Health database to MCP clients. It is read-only.

Local and current#

Your phone keeps the queried SQLite database current in the background.

Setting it up#

The tool ships inside the Mac app:

Path
/Applications/Hozz.app/Contents/MacOS/hozz-mcp

Copy the configuration from the Mac app's Assistant tab. A guessed sandbox path can open an empty directory.

Let your assistant do it#

Paste this to your assistant:

Paste this to your assistant
Please add a local MCP server called "hozz" to your own MCP configuration.

It runs this command:
  /Applications/Hozz.app/Contents/MacOS/hozz-mcp

with these arguments:
  --data-dir
  /Users/YOUR_USERNAME/Library/Containers/com.thatcube.Hozz.mac/Data/Library/Application Support/Hozz/Received

Replace YOUR_USERNAME with my actual username. That path is real and contains a
space in "Application Support", so keep it as one argument rather than splitting
it. It is a stdio server speaking JSON-RPC, not an HTTP one, so it needs no URL,
port, or token.

Write it into whichever configuration file you actually read, in whatever shape
that file expects, and leave any servers already in there alone. Please back the
file up first. Then tell me whether I need to restart you for it to load.

You can check it works before I restart by running the command yourself with
those arguments and sending it this on stdin:
  {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}
  {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
It should answer with thirteen tools. If it says there is no received data,
Hozz has not synced to this Mac yet, which is a different problem from the
configuration being wrong.

It needs a path, one argument and stdio. No account, key or network.

Writing it by hand#

The shape most clients want
{
  "mcpServers": {
    "hozz": {
      "command": "/Applications/Hozz.app/Contents/MacOS/hozz-mcp",
      "args": [
        "--data-dir",
        "/Users/you/Library/Containers/com.thatcube.Hozz.mac/Data/Library/Application Support/Hozz/Received"
      ]
    }
  }
}

Clients may require extra keys. Match existing entries; command and argsstay the same.

HOZZ_DATA_DIR works instead of --data-dir if your client prefers an environment variable.

The thirteen tools#

Orientation#

Orientation tools
ToolAnswers
summarise_health_dataWhat is here at all: record count, types, date range, the largest types, and the person’s own characteristics.
list_health_typesWhich types have arrived, with counts and date ranges.

Retrieval#

Retrieval tools
ToolAnswers
aggregate_health_dataOne type bucketed by hour, day, week or month, with sum, average, minimum, maximum and count per bucket.
list_health_samplesIndividual samples, when the readings themselves matter.
list_workoutsWorkouts with what Health computed about each: heart rate, energy, distance, and each leg of a multi-sport workout separately.
list_electrocardiogramsEvery ECG reading, with what the Watch classified it as, average heart rate, symptom status, and whether the full waveform has arrived.
get_electrocardiogram_voltagesOne reading’s waveform as time/volt pairs.
list_audiogramsHearing tests, with the threshold at each frequency for each ear.
list_mood_entriesState of Mind entries with their classification, kind, labels and associations.
summarise_medication_adherenceDose events per medicine, counted by status.

Analysis#

Analysis tools
ToolAnswers
analyse_health_trendIs this drifting up or down, and can that be said at all?
compare_health_typesDo these two move together day to day?
find_health_anomaliesDid anything genuinely unusual happen?

Call summarise_health_data first. It includes shared characteristics needed to interpret measurements.

A few deliberate shapes#

  • aggregate_health_data returns sum and average. The correct measure depends on the type.
  • ECGs and hearing tests use dedicated tools. They are not ordinary samples.
  • Workouts keep a sample row. Missing figures are omitted, never shown as zero.
  • Mood valence is chartable. Use list_mood_entries for labels and associations.
  • Only taken means taken. skipped, snoozed,notAnswered and unrecorded stay separate.

What the analysis tools refuse to say#

Analysis includes uncertainty and refuses unsupported claims.

  • Trends need 14 days. Below that, the tool refuses.
  • A confidence interval spanning zero means “no detectable change”.
  • Correlations need 28 shared days and use an autocorrelation-adjusted sample size.
  • Correlations warn when both series trend.
  • No correlation is ever described as cause. Every response says so.
  • Anomalies use median absolute deviation, resisting extreme days.

Unsynced types say so. Missing local data is not evidence that none exists.

Analysis tools do not imply age-adjusted clinical judgement. Characteristics appear only in the overview.

If it reports no data#

Two different problems look identical from the client:

  • The path is wrong. A sandboxed Mac app keeps its database inside its container. Pointing at ~/Library/Application Support/Hozz instead finds nothing, because that is where an unsandboxed build would have put it.
  • Nothing has arrived yet. Open Hozz on the Mac, connect your phone, and let it sync at least once. The Mac's Data tab says how many types have arrived.

Tools report missing records without claiming the person has none.

Cloud clients may upload data#

What it will not do#

The server cannot write to Apple Health. See Data coverage.