Health Export AI
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HEALTH_LISTEN | No | Set to '1' to enable LAN push receiver | |
| PAIRING_SECRET | No | Optional pairing code from the iOS app to gate access | |
| HEALTH_DATA_DIR | No | Path 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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 |
| 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 |
| 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 |
| 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
| Name | Description |
|---|---|
| daily_brief | A short morning readout of the most recent day against its trailing week. |
| weekly_review | This week against last week across sleep, heart and activity. |
| doctor_visit_prep | A one-page data brief to bring to an upcoming appointment. |
| what_changed_since_last_visit | Changes in the data since the most recent logged doctor visit. |
| sleep_quality | A descriptive read of recent sleep: duration, stages, split nights. |
| sleep_regularity | How consistent sleep and wake times are, in minutes, with the sessions cited. |
| hrv_trend | Heart rate variability over the last month, segment-honest. |
| training_week_in_review | The last 7 days of workouts with intensity and structure. |
| race_week_prep | The training block a coach would want to see before race week. |
| zone_minutes_summary | Time by heart rate band across recent workouts, relative to this file. |
| experiment | Run an n-of-1 before/after read around a logged intervention event. |
| medication_before_after | Before/after read around a logged medication start. |
| glp1_dose_step_compare | Per-dose-step segments for weight and related metrics, honestly bounded. |
| sobriety_milestone | The data story since a logged quit date, with the early window reported separately. |
| shift_block_compare | On-shift days against off days using the day filter. |
| travel_honest_monthly_review | A monthly review with timezone-change days excluded and accounted for. |
| cycle_aware_trend_read | Read a metric trend against cycle phase, comparing like phase with like phase. |
| caregiver_daily_checkin | A calm daily check-in that separates data gaps from changes in the numbers. |
| glucose_day_summary | One day of glucose in the consensus reporting metrics, no advice. |
| long_term_activity_narrative | The multi-year activity story at monthly resolution. |
| data_coverage_audit | What this export actually contains: surfaces, ranges, gaps. |
| profile_aware_context_bootstrap | Open a session with the user's opted-in context loaded and its limits stated. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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