get_sleep_sessions
Clustered sleep sessions attributed to the waking day; split nights returned as-is.
How to use it
Project documentation lists get_sleep_sessions for the Health Export MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Health Export MCP
npx -y health-export-mcpOther tools in Health Export MCP (13)
A metric across two arbitrary date periods (A vs B), or around a logged event via anchor: {eventId, days} (the event day excluded from both sides).
Pearson correlation between two metrics with a 0..3 day lag. Association, not causation, always stated.
Day-in-cycle and coarse phase derived from logged period starts. Never predictive.
Daily values for a metric (or all) over a date range + an aggregate (avg/sum/min/max/latest). Supports filterDays (restrict to days covered by logged events, with negate).
Today's hour-by-hour window from the app's hourly automations (health-intraday.json, app 1.4+), replaced each run.
Health check: source, metric/workout counts, which context files exist, latest data date. Call first.
Opted-in context fields (conditions, medications, goals, allergies, notes) plus presentFields. Absent fields were withheld, never "none".
Clean JSON for chosen metrics/range, paginated with a cursor.
Recent N-day window vs the prior N days: change, % change, direction. Supports excludeTravelDays.
Workouts by activity/date with pagination; includes heart rate, running dynamics, cycling power, intervals and hasRoute when exported.
Logged context events (medication, habit, visit, life, shift, episode, travel) with type/tag/date filters.
Every available metric with unit, day count, and date range.
Natural-language convenience: "average HRV last month" routed to structured results.