MCP Server
The Model Context Protocol (MCP) lets AI clients like Claude Desktop call tools on external servers. The VitalTrends MCP server exposes your health data as tools that Claude can query in real time, no exports needed.
Prerequisites
- An active VitalTrends subscription
- A VitalTrends API key (generate one in Settings → Developer)
- Claude Desktop (Mac or Windows) or another MCP-compatible client
Setup: Claude Desktop
Run this once in your terminal:
npm install -g @vitaltrends/mcp-server
On Mac: Claude menu → Settings → Developer → Edit Config. This opens the claude_desktop_config.json file.
Add the following entry inside the "mcpServers" object, replacing YOUR_API_KEY with your actual key:
{
"mcpServers": {
"vitaltrends": {
"command": "mcp-server",
"env": {
"VITALTRENDS_API_KEY": "YOUR_API_KEY"
}
}
}
}
"mcp-server" with the full path from running which mcp-server in your terminal.
Quit and reopen Claude Desktop. You should see a VitalTrends icon in the toolbar, indicating the server connected successfully.
Open a new conversation and ask Claude about your health data directly.
Available tools
| Category | Tool | API route | Description |
|---|---|---|---|
| WHOOP | get_whoop_daily |
/whoop/daily |
Recovery score, HRV, resting heart rate, sleep performance, sleep duration, and strain, one row per day |
| WHOOP | get_whoop_recovery_status |
/whoop/recovery-status |
Advisory recovery freshness, sync, and upstream update timestamps |
| WHOOP | get_whoop_workouts |
/whoop/workouts |
Workout history with sport name, duration, strain, average and max heart rate, and distance |
| WHOOP | get_whoop_sleep |
/whoop/sleep |
Sleep sessions with stages, score, duration, and performance metrics |
| Workouts | get_unified_workouts |
/workouts/unified |
Cross-source workout feed deduplicated into sessions, with session_id, canonical provider fields, source_records, field_sources, and optional include=heart_rate_series overlays |
| Workouts | get_hevy_workouts |
/workouts/hevy |
Hevy workout records with nested exercises and sets |
| Oura | get_oura_daily_sleep |
/oura/daily-sleep |
Daily sleep scores and sleep score contributors |
| Oura | get_oura_sleep |
/oura/sleep |
Sleep sessions with stages, duration, HRV, heart rate, and respiratory rate |
| Oura | get_oura_daily_readiness |
/oura/daily-readiness |
Daily readiness scores, temperature deviation, and readiness contributors |
| Oura | get_oura_daily_activity |
/oura/daily-activity |
Activity scores, calories, steps, distance, active minutes, and activity contributors |
| Oura | get_oura_workouts |
/oura/workouts |
Workout sessions with activity, intensity, source, calories, distance, and timestamps |
| Oura | get_oura_daily_spo2 |
/oura/daily-spo2 |
Daily SpO2 averages and breathing disturbance index |
| Oura | get_oura_daily_stress |
/oura/daily-stress |
Daily stress, recovery, and Oura day summary |
| Oura | get_oura_daily_resilience |
/oura/daily-resilience |
Daily resilience level and resilience contributors |
| Oura | get_oura_vo2_max |
/oura/vo2-max |
VO2 max estimates by day |
| Withings | get_withings_measurements |
/withings/measurements |
Weight and body composition: weight, body fat, muscle mass, and bone mass readings |
| Apple Health | get_apple_health_daily_summary |
/apple-health/daily-summary |
Everything for a single day in one call: activity, heart, sleep stages, body, and workouts |
| Apple Health | get_apple_health_daily |
/apple-health/daily |
Daily Apple Health aggregates: steps, active and basal energy (kcal), distance (km), heart rate, HRV, resting heart rate, SpO2, and sleep duration |
| Apple Health | get_apple_health_samples |
/apple-health?type=<type> |
Per-type Apple Health time series, with optional metadata for sleep stages and workout details |
| Summary | get_summary |
/summary |
Cross-source aggregate: avg/min/max recovery, HRV, resting heart rate, sleep performance, avg strain, workout count, current weight, and body composition |
Most list tools accept optional start and end parameters as YYYY-MM-DD dates or ISO 8601 datetimes, plus per_page (1-200, default 50) and page (1-indexed). Results are paginated, so Claude will fetch the first page and may request more if needed.
get_whoop_recovery_status takes no arguments and is advisory freshness metadata only; use get_whoop_daily to decide whether today's WHOOP recovery plus sleep row is available. get_apple_health_daily_summary accepts date as a YYYY-MM-DD date and optional comma-separated types such as activity,heart,sleep,body,workouts. get_apple_health_samples requires a type value. get_summary accepts optional start and end parameters for the summary window.
Example conversations
Once connected, you can ask Claude questions like:
- "What was my average HRV last week compared to the week before?"
- "On days I ran more than 10 km, how did my recovery score change the next day?"
- "Has my resting heart rate improved since I started tracking in January?"
- "What is my weight trend over the last 3 months?"
- "Give me a weekly summary of sleep performance for April."
Other MCP clients
Any MCP-compatible client can use this server. The configuration format varies by client, but the server package and API key requirements are the same. Refer to your client's documentation for how to add a custom MCP server.
Troubleshooting
Server not connecting
Make sure npx is available in your terminal (node and npm must be installed). Check that your API key is correct with no extra spaces.
Claude says it cannot find my data
The tool only returns data for the authenticated user. Confirm you have connected at least one data source in Settings → Connections.
Data is on the dashboard but Claude says it is missing
Claude Desktop caches tool results within a conversation, so once a tool returns empty it will keep returning empty for the rest of that chat. Start a new conversation and ask again, the MCP server will hit the API fresh and pick up any data that has synced since.
Slow responses
Large date ranges fetch more records. Try narrowing the time window in your prompt (e.g., "last 30 days" instead of "all time").