Skip to main content
Glama
PhilipAD

Health Export AI

by PhilipAD

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HEALTH_LISTENNoSet to '1' to enable LAN push receiver
PAIRING_SECRETNoOptional pairing code from the iOS app to gate access
HEALTH_DATA_DIRNoPath to the directory containing .health-cache.json from Health Export AI. Default: ~/Library/Mobile Documents/iCloud~ai~healthexport~app/Documents~/Library/Mobile Documents/iCloud~ai~healthexport~app/Documents

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_mcp_statusA

Health check: data source, how many metrics/workouts are available, which optional context files exist, and the most recent data date. Call this first to confirm the bridge is connected.

list_metricsA

List every available Apple Health metric with its unit, day count, and date range. Use this to discover metric names before querying.

get_health_metricsA

Get values for a metric (or all metrics) over an optional date range, with an aggregate (avg/sum/min/max/latest). The core data-retrieval tool. Every result carries a coverage block giving the metric's real firstDate/lastDate/days: check it before trusting a long window, and note that aggregate is always computed over the full range even when points are rolled up. Single-metric answers also list any logged point events inside the window as segmentBoundaries.

get_trendsA

Compare the most recent N-day window against the prior N days for a metric: change, percent change and direction (up/down/flat). Also returns daysAvailable and windowSatisfied: if windowSatisfied is false the file does not hold enough history for the window you asked for, and the comparison is over less data than requested. Logged point events inside the compared span are listed as segmentBoundaries.

compare_periodsA

Compare a metric between two arbitrary date periods (A vs B): each aggregate plus the change and percent change. Pass periodA/periodB explicitly, or pass anchor {eventId, days} to build both periods around a logged event (the before/after question, with the event day excluded from both sides).

get_structured_exportA

Return clean structured JSON for the chosen metrics/date range. Paginated: the result carries nextCursor when more metrics remain; pass it back as cursor for the next page. Prefer naming the metrics you need and a date range; calling it bare over a full history is a lot of data.

get_intradayA

The current hour-by-hour window from the iOS app's HOURLY automations (health-intraday.json, app 1.4+): each metric's hourly points plus its latest value. The file is REPLACED on every hourly run, so this is a live within-day view, not history; use get_health_metrics for day-level questions. Returns available:false with setup guidance when no hourly automation has delivered yet.

query_health_dataA

Natural-language convenience: pass a question and get routed structured results. Prefer the specific tools above when you can, and call list_metrics first to see how much history exists, since this tool answers over whatever the file holds.

list_eventsA

Logged context events from health-events.json: medication starts, habit changes, doctor visits, life events, shift blocks, episodes, travel, and any type a newer app adds. Optional {type, tag, start, end} filters; a range event matches a window it overlaps. Sorted ascending by date. Returns available:false when the file was never exported; absence means nothing was exported, not that nothing happened.

get_profileA

The context fields the user explicitly opted in to sharing (health-profile.json): conditions, medications, goals, allergies, notes. Returns the fields plus a presentFields list. An absent field was withheld by the user or never enabled; absence must never be read as "none".

get_workoutsA

Query the workouts cache with {activityType (a name like Running, or a raw HealthKit id like 37), start, end} filters and pagination ({limit} default 50 max 200, {cursor} from a previous nextCursor). Records are returned exactly as stored, including the newer optional keys (avgHeartRate, maxHeartRate, running dynamics, cycling power, intervals, hasRoute) when the app exported them; older caches simply lack those keys and nothing is fabricated. Also returns summary {count, byActivityType} over everything that matched.

get_sleep_sessionsA

Clustered sleep sessions from health-sessions.json with {start, end, day} filters. Sessions are attributed to the WAKING day, matching the daily cache's sleep_analysis, so the two surfaces never disagree; a split night appears as multiple sessions with the same day, returned as-is. Timestamps carry the local UTC offset at the time of the sample.

get_cycle_contextA

Cycle context derived from user-logged period starts (health-cycles.json): day-in-cycle and a coarse phase label (follicular from day 1 to the observed midpoint of that cycle, luteal for the remainder). Derived from logged periods only, never predictive, and no ovulation estimate is made. Optional {date} for a single day; default returns per-day context for the last cycle.

correlate_metricsA

Pearson correlation between two metrics' daily values: {metricA, metricB, lag (0 to 3, default 0), start, end}. lag pairs metricA on day d with metricB on day d+lag, so lag 1 compares against the FOLLOWING day. Returns alignedPairs, r (withheld below 10 aligned pairs), and both means. The answer always carries the association-not-causation caveat; treat every r as alignment in this file, not mechanism.

Prompts

Interactive templates invoked by user choice

NameDescription
daily_briefA short morning readout of the most recent day against its trailing week.
weekly_reviewThis week against last week across sleep, heart and activity.
doctor_visit_prepA one-page data brief to bring to an upcoming appointment.
what_changed_since_last_visitChanges in the data since the most recent logged doctor visit.
sleep_qualityA descriptive read of recent sleep: duration, stages, split nights.
sleep_regularityHow consistent sleep and wake times are, in minutes, with the sessions cited.
hrv_trendHeart rate variability over the last month, segment-honest.
training_week_in_reviewThe last 7 days of workouts with intensity and structure.
race_week_prepThe training block a coach would want to see before race week.
zone_minutes_summaryTime by heart rate band across recent workouts, relative to this file.
experimentRun an n-of-1 before/after read around a logged intervention event.
medication_before_afterBefore/after read around a logged medication start.
glp1_dose_step_comparePer-dose-step segments for weight and related metrics, honestly bounded.
sobriety_milestoneThe data story since a logged quit date, with the early window reported separately.
shift_block_compareOn-shift days against off days using the day filter.
travel_honest_monthly_reviewA monthly review with timezone-change days excluded and accounted for.
cycle_aware_trend_readRead a metric trend against cycle phase, comparing like phase with like phase.
caregiver_daily_checkinA calm daily check-in that separates data gaps from changes in the numbers.
glucose_day_summaryOne day of glucose in the consensus reporting metrics, no advice.
long_term_activity_narrativeThe multi-year activity story at monthly resolution.
data_coverage_auditWhat this export actually contains: surfaces, ranges, gaps.
profile_aware_context_bootstrapOpen a session with the user's opted-in context loaded and its limits stated.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhilipAD/health-export-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server