health4ai
Query your Apple Health data from your own Supabase/Postgres via local MCP.
Connector by jefflitt1 · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/jefflitt1-health4ai
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 11 read · 0 write · 0 deleteRead-only
- Secrets
- 1 (API keys, tokens or passwords)
- Install scripts
- Not scanned yet
- Runs as
- Python package
Tools by what they do 11
Read from the source code; the running server may list different tools.
Read 11 · Look things up without changing anything.
compare_periodsget_coaching_briefget_daily_snapshotget_health_summaryget_hrv_trendget_long_term_trendget_metric_statsget_sleepget_workoutsquery_metricsearch_records
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
DATABASE_URL
Other settings (environment variables or headers).
HEALTHKIT_USER_ID
Tools (11)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
compare_periodsCompare a health metric between two date ranges. Dates: YYYY-MM-DD. Examples: - Sleep before vs after starting magnesium: period_a = two weeks before, period_b = two weeks after - HRV this month vs last month: period_a_start='2026-05-01', period_a_end='2026-05-31', period_b_start='2026-06-01', period_b_end='2026-06-18' - Steps during a work trip vs home baseline Returns per-period stats and a delta showing which period was better.
get_coaching_briefPre-session coaching brief for Brett — combines recent trends across all key metrics. Returns a structured summary optimized for performance coaching context: recovery status, sleep quality, training load, and fitness trajectory. Call this at the start of every coaching session.
get_daily_snapshotEverything recorded for a specific date (YYYY-MM-DD). Defaults to today. Returns steps, sleep, workouts, HRV, resting HR, active energy, and all other metrics. Quantity-metric highlights are tier-aware: dates older than RAW_CUTOFF_DAYS fall back to healthkit_daily_summaries once compaction has deleted that day's raw rows. Sleep and workout fields stay raw-only (those types are never compacted, so full detail persists).
get_health_summaryOverview of key health metrics for the past N days. Returns avg steps, avg sleep, avg HRV, avg resting HR, workout count. Tier-aware: windows beyond RAW_CUTOFF_DAYS transparently merge in daily summaries for steps/HRV/resting HR. Sleep and workouts are never compacted, so those stay raw-only.
get_hrv_trendHRV (SDNN) trend over the past N days. Returns daily averages, 7-day rolling comparison, and trend direction. Tier-aware: windows beyond 30 days transparently use daily summaries.
get_long_term_trendLong-term trend for any metric. Tier-aware: merges recent raw data (last 30 days, aggregated to daily) with historical daily summaries, so the trend has no recency gap. Best for multi-year / seasonal analysis. metric_type examples: HKQuantityTypeIdentifierHeartRateVariabilitySDNN, HKQuantityTypeIdentifierRestingHeartRate, HKQuantityTypeIdentifierBodyMass, HKQuantityTypeIdentifierStepCount months: how many months of history to return (default 24)
get_metric_statsPersonal baseline statistics for any health metric. Returns min, max, mean, std dev, and percentile distribution (p10-p90). Use to answer: 'Is today's reading good or bad for me personally?' Pair with get_daily_snapshot to compare today's value against your baseline. The 'thresholds' field translates percentiles into plain English: good_day_above = your 75th percentile (a genuinely above-average day) poor_day_below = your 25th percentile (a below-average day worth noting) IMPORTANT: a data_points of 0 returns a 'data_status' block. Read it before saying the user has no data — for metric…
get_sleepSleep analysis for the past N days. Returns per-night breakdown with stage durations (REM, Deep/Core, Light, Awake). One source per night (see _sleep_stage_rows_by_night): Oura > Apple Watch > Whoop > Garmin > Withings > whichever other source has the most stage records that night.
get_workoutsRecent workouts with type, duration, distance, and calories.
query_metricTime-series for any HealthKit metric type. metric_type: e.g. 'HKQuantityTypeIdentifierStepCount', 'HKQuantityTypeIdentifierHeartRate' Windows <= 30 days return raw samples; longer windows return daily aggregates (raw samples beyond 30 days are summarized and no longer stored individually). IMPORTANT: when count is 0 the response carries a 'data_status' block. Read it before answering. A zero here is NOT evidence the user did nothing: iOS reports a denied Health permission as an empty result, so an unshared metric and a genuinely inactive day look identical. If data_status.status is 'never_rec…
search_recordsFind days where a health metric crossed a threshold. For cumulative metrics (steps, calories) filters on daily total. For rate metrics (HRV, heart rate) filters on daily average. Examples: - All days with HRV below 40ms: metric_type='HKQuantityTypeIdentifierHeartRateVariabilitySDNN', max_value=40 - Days with 10k+ steps: metric_type='HKQuantityTypeIdentifierStepCount', min_value=10000 - Nights under 6 hours sleep (360 min): metric_type='HKCategoryTypeIdentifierSleepAnalysis', max_value=360 Results sorted highest-to-lowest so outliers surface first.
Signals
- Stars
- 3
- Forks
- 3
- Open issues
- 2
- Weekly downloads
- 30
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
- Last release
- Sep 19, 2026 (1 month ago)
- Last package publish
- Sep 19, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.jefflitt1/health4ai- Version
- 0.1.0
- Auth
- API key
- Packages
- pypi health4ai
- License
- MIT
- Repository
- github.com/jefflitt1/health4ai
- Website
- health4.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
health4ai MCP server. Agent Mart. https://agentmart.dev/connectors/jefflitt1-health4ai (last updated 2026-10-24)