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
| Tool | Description |
|---|---|
get_whoop_daily |
Recovery score, HRV, resting heart rate, sleep performance, sleep duration, and strain, one row per day |
get_whoop_workouts |
Workout history with sport name, duration, strain, average and max heart rate, and distance |
get_withings_measurements |
Weight and body composition: weight (kg), fat ratio, fat mass, fat-free mass, and muscle mass |
get_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 |
get_summary |
Cross-source aggregate: avg/min/max recovery, HRV, resting heart rate, sleep performance, avg strain, workout count, current weight, and body composition |
All tools accept optional start and end date parameters (format: YYYY-MM-DD) and a per_page parameter (1-200, default 50). Results are paginated, so Claude will fetch the first page and may request more if needed.
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.
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").