Health4AI
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DATABASE_URL | Yes | Your Postgres connection string | |
| HEALTHKIT_USER_ID | Yes | Any string to identify your data |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_health_summaryA | Overview of key health metrics for the past N days. Returns avg steps, avg sleep, avg HRV, avg resting HR, workout count. |
| get_sleepA | Sleep analysis for the past N days. Returns per-night breakdown with stage durations (REM, Deep/Core, Light, Awake). |
| get_hrv_trendA | HRV (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. |
| query_metricB | Time-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). |
| get_workoutsC | Recent workouts with type, duration, distance, and calories. |
| get_daily_snapshotA | Everything recorded for a specific date (YYYY-MM-DD). Defaults to today. Returns steps, sleep, workouts, HRV, resting HR, active energy, and all other metrics. |
| get_long_term_trendA | Long-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_coaching_briefA | Pre-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. |
| search_recordsA | Find 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:
Results sorted highest-to-lowest so outliers surface first. |
| get_metric_statsA | Personal 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) |
| compare_periodsA | Compare a health metric between two date ranges. Dates: YYYY-MM-DD. Examples:
Returns per-period stats and a delta showing which period was better. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
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/jefflitt1/health4ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server