Features Integrations AI & API Pricing Blog Docs
Overview WHOOP Withings Apple Health REST API AI & Claude MCP Server

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.

Result: Ask Claude "What was my recovery trend last month?" and it fetches live data from VitalTrends before answering.

Prerequisites


Setup: Claude Desktop

1
Install the MCP server

Run this once in your terminal:

npm install -g @vitaltrends/mcp-server
2
Open Claude Desktop settings

On Mac: Claude menu → Settings → Developer → Edit Config. This opens the claude_desktop_config.json file.

3
Add the VitalTrends server

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"
      }
    }
  }
}
Path not found? If Claude Desktop can't find the command, replace "mcp-server" with the full path from running which mcp-server in your terminal.
4
Restart Claude Desktop

Quit and reopen Claude Desktop. You should see a VitalTrends icon in the toolbar, indicating the server connected successfully.

5
Start asking questions

Open a new conversation and ask Claude about your health data directly.


Available tools

ToolDescription
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:


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").