whoop-mcp-server
v0.0.5
Published
MCP server for the WHOOP Developer Platform API
Maintainers
Readme
WHOOP MCP Server
An MCP (Model Context Protocol) server that exposes the WHOOP Developer Platform API, enabling AI assistants to access your physiological data — recovery, sleep, strain, and workouts.
Supported Tools
Authentication Tools (2)
| Tool | Description |
|---|---|
| whoop_check_auth | Check authentication status and token expiry |
| whoop_authenticate | Start OAuth flow — returns a URL to authorize in browser |
Raw API Tools (12)
| Tool | Description |
|---|---|
| get_profile | User profile (name, email) |
| get_body_measurements | Height, weight, max heart rate |
| revoke_oauth_access | Revoke OAuth token (destructive) |
| list_cycles | List physiological cycles with strain data |
| get_cycle | Get a specific cycle by ID |
| list_recoveries | List recovery scores (HRV, RHR, SpO2) |
| get_recovery_for_cycle | Get recovery for a specific cycle |
| list_sleeps | List sleep activities with stage data |
| get_sleep | Get a specific sleep by ID |
| get_sleep_for_cycle | Get sleep for a specific cycle |
| list_workouts | List workouts with HR zones |
| get_workout | Get a specific workout by ID |
Aggregation Tools (5)
| Tool | Description |
|---|---|
| get_today_summary | Unified view of today's strain, recovery, sleep, and workouts |
| get_recent_health_summary | Multi-day averages and trends (recovery, HRV, sleep, strain) |
| compare_recovery_and_sleep | Correlation between sleep quality and recovery |
| get_training_load_summary | Training volume, strain totals, top sports |
| get_sleep_performance_summary | Sleep duration, efficiency, stage breakdown |
Prerequisites
- A WHOOP membership with an active device
- A developer application at developer.whoop.com
- Node.js >= 18
- pnpm
Setup
# Install dependencies
pnpm install
# Build
pnpm buildConfiguration
Copy .env.example to .env and fill in your WHOOP developer app credentials:
cp .env.example .env| Variable | Required | Default |
|---|---|---|
| WHOOP_CLIENT_ID | Yes | — |
| WHOOP_CLIENT_SECRET | Yes | — |
| WHOOP_REDIRECT_URI | No | http://localhost:3000/callback |
OAuth Setup
Authentication is handled automatically. When you ask the AI to access your WHOOP data and no token is found, it will call the whoop_authenticate tool, which returns an authorization URL. Click the link, authorize in your browser, and you're done.
You can also authenticate manually via the CLI:
pnpm authTokens are saved to ~/.whoop-mcp/tokens.json with restricted file permissions and refresh automatically. WHOOP rotates both access and refresh tokens on each refresh.
Running the Server
pnpm startOr directly:
node dist/index.jsMCP Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"whoop": {
"command": "npx",
"args": ["-y", "whoop-mcp-server"],
"env": {
"WHOOP_CLIENT_ID": "your_client_id",
"WHOOP_CLIENT_SECRET": "your_client_secret"
}
}
}
}Claude Code (CLI)
Add to .claude/settings.json or ~/.claude/settings.json:
{
"mcpServers": {
"whoop": {
"command": "npx",
"args": ["-y", "whoop-mcp-server"],
"env": {
"WHOOP_CLIENT_ID": "your_client_id",
"WHOOP_CLIENT_SECRET": "your_client_secret"
}
}
}
}Development
# Watch mode for TypeScript
pnpm dev
# Run tests
pnpm test
# Watch tests
pnpm test:watchKnown Limitations
- Read-only: The WHOOP API only supports reading data, not writing
- Single user: Designed for personal use with one WHOOP account
- No webhooks: Push notifications require a public HTTP server, out of scope
- Sport IDs: Workout sport types are returned as numeric IDs (see WHOOP docs for mapping)
- Rate limits: WHOOP enforces API rate limits; the server returns friendly error messages with reset times
Extending
To add a new tool:
- Add the API method to
src/client/whoop-client.ts - Create the tool function in the appropriate
src/tools/*.tsfile - Register it in
src/server.tswith a Zod schema - Add tests in
tests/
