# Connect WHOOP, Apple Health & Health Data to Claude (MCP)

Connect Claude to the hosted VitalTrends MCP server to query your WHOOP, Apple Health, Oura, Withings, and Hevy data. No install and no config files: add a custom connector in Claude and sign in with your VitalTrends API key.

> The old setup (`npm install -g @vitaltrends/mcp-server` plus editing `claude_desktop_config.json`) is no longer supported. Use the hosted connector below.

Server URL: `https://mcp.vitaltrends.net/mcp`

## Supported AI clients

- Claude (Pro, Max, Team, Enterprise): available now.
- Codex MCP: coming soon.
- Grok MCP: coming soon.

## Prerequisites

- An active VitalTrends subscription.
- At least one data source connected and synced in VitalTrends.
- A Claude Pro, Max, Team, or Enterprise plan. Custom remote MCP connectors are a beta feature; menus may vary.

## Setup: Claude

1. **Create an API key.** In VitalTrends open Settings -> Developer -> API access and copy your personal key. Keep it private. Leave "Allow workout write access" off for read-only use. Enable it to grant `workout:write` when you want the AI to create, edit, import, or delete workouts and manage exercise names.
2. **Add the connector.** In Claude open Settings -> Connectors -> Add (or Add custom connector). Name: `VitalTrends`. URL: `https://mcp.vitaltrends.net/mcp`. Keep the detected authentication defaults (Sign in now, Register automatically).
3. **Authenticate.** Select Continue connecting if asked, paste your API key on the "Connect VitalTrends" page, and select Connect. Return to Claude when you see the success page.
4. **Enable and ask.** Start a new conversation, open Search and tools, enable VitalTrends, and ask a question.

Screenshots: https://vitaltrends.net/docs/mcp

## Example questions

- "Summarize my sleep and recovery trends over the last 7 days."
- "Compare my average HRV this week with the previous week."
- "How has my Apple Health resting heart rate changed this year?"
- "List my workouts from the last 30 days."
- "What is my weight trend over the last 3 months?"

## Available tools

| Category | Tool | API route | Description |
|----------|------|-----------|-------------|
| WHOOP | `get_whoop_daily` | `/whoop/daily` | Recovery, HRV, resting heart rate, sleep performance, sleep duration, and strain |
| 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, duration, strain, 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` | Canonical training-log session feed deduplicated into physical 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 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 and contributors |
| Oura | `get_oura_daily_activity` | `/oura/daily-activity` | Activity scores, calories, steps, distance, active minutes, and 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 day summary |
| Oura | `get_oura_daily_resilience` | `/oura/daily-resilience` | Daily resilience level and contributors |
| Oura | `get_oura_vo2_max` | `/oura/vo2-max` | VO2 max estimates by day |
| Withings | `get_withings_measurements` | `/withings/measurements` | Weight and body composition readings |
| Apple Health | `get_apple_health_daily_summary` | `/apple-health/daily-summary` | Activity, heart and vitals including wrist temperature, sleep, body, and workouts for a single day |
| Apple Health | `get_apple_health_daily` | `/apple-health/daily` | Daily Apple Health aggregates including wrist temperature |
| Apple Health | `get_apple_health_samples` | `/apple-health?type=<type>` | Per-type Apple Health time series, including `type=sleeping_wrist_temp` for wrist temperature |
| Summary | `get_summary` | `/summary` | Cross-source aggregate summary |
| WHOOP | `get_whoop_cycles` | `GET /cycles` | WHOOP cycles, strain, and timing |
| WHOOP | `get_whoop_body` | `GET /body` | WHOOP body measurements |
| Withings | `get_withings_sleep` | `GET /withings/sleeps` | Sleep Analyzer sessions |
| Glucose | `get_glucose` | `GET /glucose` | CGM analytics, time in range, AGP, and daily context |
| Glucose | `get_glucose_readings` | `GET /glucose/readings` | Paginated raw glucose readings |
| Training | `get_workout_logs` | `GET /workout-logs` | Canonical Training Log sessions |
| Training | `get_workout_log` | `GET /workout-logs/{id}` | One session with exercises, sets, and media |
| Training | `get_muscle_group_usage` | `GET /training/muscle-groups/usage` | Lifted volume and workout count by muscle group |
| Training | `get_exercise_catalog` | `GET /training/exercises` | Names, duplicate suggestions, safe matches, and merge history |
| Training | `get_exercise_history` | `GET /training/exercises/{exerciseKey}` | Exercise progression and session history |
| Workout writes | `create_workout_log` | `POST /workout-logs` | Create a structured workout or preview deduplication |
| Workout writes | `import_workout_logs` | `POST /workout-logs/import` | Import agent rows, MacroFactor CSV, or a base64 XLSX workbook |
| Workout writes | `update_workout_log` | `PATCH /workout-logs/{id}` | Edit session title, notes, date, and timing |
| Workout writes | `replace_workout_log_exercises` | `PUT /workout-logs/{id}/exercises` | Replace the entire exercise and set tree |
| Workout writes | `delete_workout_log` | `DELETE /workout-logs/{id}` | Delete an editable session |
| Workout writes | `upload_workout_media` | `POST /workout-media` | Upload a base64 image to attach using its returned media ID |
| Exercise writes | `rename_exercise` | `PATCH /training/exercises/rename` | Rename matching history and preserve the old name as an alias |
| Exercise writes | `merge_exercises` | `POST /training/exercises/merge` | Combine selected exercise names with an audit record |
| Exercise writes | `merge_safe_exercises` | `POST /training/exercises/merge-safe` | Apply selected safe matches from the catalog |
| Exercise writes | `mark_exercises_different` | `POST /training/exercises/different` | Dismiss incorrect duplicate suggestions |
| Exercise writes | `add_exercise_alias` | `POST /training/exercises/{exerciseKey}/aliases` | Match a personal alias on future imports |
| Exercise writes | `detach_exercise_alias` | `DELETE /training/exercises/merges/{mergeRecord}/aliases/{sourceKey}` | Detach a name from an audited merge |
| Exercise writes | `undo_exercise_merge` | `POST /training/exercises/merges/{mergeRecord}/undo` | Undo an eligible merge within 30 days |
| Exercise writes | `set_exercise_muscle_group` | `PATCH /training/muscle-groups/{exerciseKey}` | Correct personal muscle-group classification |

Most list tools accept optional `start`, `end`, `per_page`, and `page` parameters. `start` and `end` can be `YYYY-MM-DD` dates or ISO 8601 datetimes. Results are paginated.

`get_apple_health_daily_summary` accepts a `date` and optional comma-separated `types` such as `activity,heart,sleep,body,workouts`. Its sleep section assigns each complete session to the user's local wake date, matching Apple Health's overnight date labels. `get_apple_health_samples` requires a `type` value. `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.

## Read tool parameters

| Tool | Parameters and behavior |
|------|-------------------------|
| `get_glucose` | Choose one range mode: `range="24h"`, `days` (integer 1-365), or both `start` and `end` as `YYYY-MM-DD` dates. Omit all three modes for the default 30 days. Optional `selected_date` selects a Day Explorer date. No pagination. |
| `get_glucose_readings` | Accepts the usual date and pagination parameters. Optional `include` is a comma-separated string: `metadata`, `hk_device`, or `metadata,hk_device`. Device details may be null on the v2 pipeline. |
| `get_workout_logs` | Accepts date and pagination parameters, `source` (`hevy`, `macrofactor`, `agent`, or `manual`), and `exercise_key`. Set `include="exercises"` for exercises, sets, media, and sources. A date-only `end` is midnight at the start of that date; use an explicit end-of-day datetime with a timezone offset to include the whole final day. |
| `get_workout_log` | Requires `id`, the Training Log UUID returned by `get_workout_logs`. Returns one session with exercises, sets, media, and sources. |
| `get_muscle_group_usage` | Pass `all_time=true` without dates, or provide both `start_date` and `end_date` as inclusive `YYYY-MM-DD` dates in your profile timezone. No pagination. |
| `get_exercise_catalog` | Takes no arguments. Returns personal exercise keys, merge suggestions, safe-match IDs, and merge history. |
| `get_exercise_history` | Requires `exercise_key` from `get_exercise_catalog`; do not substitute an exercise display name or workout UUID. |

## Workout writes and coverage

The connector exposes 44 tools: 30 reads and 14 writes. Read tools work with a read-only API key. All workout and exercise writes require **Allow workout write access** (`workout:write`); otherwise the API returns `403`. Ask the AI to review proposed changes before modifying or deleting data.

- Create or import workouts, inspect their IDs with `get_workout_logs`, edit timing or notes, replace exercises and sets, upload exercise images, and delete editable sessions. Session edits use `update_workout_log` with `{"id":"WORKOUT_UUID","changes":{"title":"Updated session"}}`. Replacing exercises replaces the whole tree: read the current session first and include every exercise and set you want to keep.
- Preview structured creates and agent-row imports with `dedup_mode=preview`. Use an `idempotency_key` UUID when retrying the exact same create or agent-row import. MacroFactor imports use `format=macrofactor-csv-v1` with `csv` text or `format=macrofactor-xlsx-v1` with `file_base64`; they do not accept deduplication options or idempotency keys. Image uploads take `image_base64` and `content_type` (JPEG, PNG, or WebP). The connector converts XLSX and image content to multipart uploads. Files are limited to 10 MiB decoded, and the server request limit must accommodate base64 overhead.
- Use `get_exercise_catalog` before choosing merge keys or safe-match IDs. Merge names, reject incorrect matches, add aliases, detach names, undo eligible merges within 30 days, and correct muscle groups. Renaming uses `from_name` and `to_name`.
- Hevy session data remains source-managed: edit workouts in Hevy and sync them. Personal name normalization and muscle-group corrections remain available in VitalTrends.
- `get_unified_workouts` accepts `include=heart_rate_series`. `get_apple_health_samples` accepts all 186 supported API data types, including wrist temperature, nutrition, symptoms, and reproductive health when those samples have synced.

Example requests: "Preview importing this workout, then show me what would change", "Correct the end time of yesterday's imported workout", or "Show likely duplicate exercise names and let me choose which to merge".

This is not complete website parity. Lab reports, weekly recaps, Control Center, provider connection management, billing, account settings, CSV export jobs, and share-link management remain website workflows without corresponding public MCP tools. The API exposes synced data, not provider write-back or workout-program planning.

## Troubleshooting

- **Invalid key:** copy the full key without spaces, or regenerate it in Settings -> Developer.
- **No data:** confirm a source is connected and synced, and the key is from the same account.
- **New sync missing:** start a new Claude conversation; tool results can be cached per chat.
- **Connector missing or failing:** confirm your plan supports custom connectors, remove incomplete duplicates, re-add the URL. Team/Enterprise owners may need to enable it.
- **Slow:** narrow the date range in your prompt.
