
WHOOP
STDIOMCP server connecting WHOOP fitness data to Claude for natural language health insights
MCP server connecting WHOOP fitness data to Claude for natural language health insights
Connect your WHOOP fitness data to Claude Desktop through the Model Context Protocol (MCP)
Transform your WHOOP fitness data into actionable insights through natural language queries in Claude Desktop. Ask questions about your workouts, recovery, sleep patterns, and more - all while keeping your data secure and private.
🚀 NEW: Try the Smithery hosted version for zero-setup deployment!
🔐 Secure OAuth Integration - Safe WHOOP account connection with encrypted local storage
🏃 Complete Data Access - Workouts, recovery, sleep, cycles, and profile information
🤖 Natural Language Queries - Ask Claude about your fitness data in plain English
⚡ Smart Caching - Optimized performance with intelligent data caching
🛡️ Privacy First - All data stays on your machine, never sent to third parties
🔄 Auto Token Refresh - Seamless experience with automatic authentication renewal
Option A: Smithery Hosted (Recommended for beginners)
Option B: Local Installation (Advanced users)
git clone https://github.com/romanevstigneev/whoop-mcp-server.git cd whoop-mcp-server pip install -r requirements.txt
Run the interactive setup:
python setup.py
This will:
If the interactive setup doesn't work, you can manually get your WHOOP tokens:
Open WHOOP OAuth Page: 👉 Click here to authorize WHOOP access
Authorize Your Account:
read:profile
- Access to your profile informationread:workout
- Access to workout dataread:recovery
- Access to recovery dataread:sleep
- Access to sleep dataoffline
- Refresh token for continued accessCopy Authorization Code:
ABC123...XYZ789
(much longer)Exchange Code for Tokens:
python -c " import sys sys.path.insert(0, './src') from auth_manager import TokenManager import requests # Paste your authorization code here auth_code = 'YOUR_AUTHORIZATION_CODE_HERE' # Exchange for tokens url = f'https://personal-integrations-462307.uc.r.appspot.com/api/get-tokens/{auth_code}' response = requests.get(url, timeout=30) if response.status_code == 200: token_data = response.json() if token_data.get('success'): # Save tokens token_manager = TokenManager() token_manager.save_tokens(token_data) print('✅ Tokens saved successfully!') else: print('❌ Token exchange failed') else: print(f'❌ HTTP Error: {response.status_code}') "
Verify Setup:
python -c " import sys sys.path.insert(0, './src') from whoop_client import WhoopClient client = WhoopClient() print(f'✅ Auth status: {client.get_auth_status()}') "
Add to your Claude Desktop settings:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\\Claude\\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{ "mcpServers": { "whoop": { "command": "/opt/miniconda3/bin/python", "args": ["/path/to/whoop-mcp-server/src/whoop_mcp_server.py"], "env": { "PYTHONPATH": "/path/to/whoop-mcp-server/src" } } } }
⚠️ Important: Use the full Python path (find yours with which python3
)
After adding the configuration, restart Claude Desktop to load the WHOOP server.
Once configured, you can ask Claude:
get_whoop_profile
Get your WHOOP user profile information.
get_whoop_workouts
Get workout data with optional filters:
start_date
(YYYY-MM-DD)end_date
(YYYY-MM-DD)limit
(number of results)get_whoop_recovery
Get recovery data with optional filters:
start_date
(YYYY-MM-DD)end_date
(YYYY-MM-DD)limit
(number of results)get_whoop_sleep
Get sleep data with optional filters:
start_date
(YYYY-MM-DD)end_date
(YYYY-MM-DD)limit
(number of results)get_whoop_cycles
Get physiological cycles (daily data) with optional filters:
start_date
(YYYY-MM-DD)end_date
(YYYY-MM-DD)limit
(number of results)get_whoop_auth_status
Check authentication status and token information.
clear_whoop_cache
Clear cached data to force fresh API calls.
Environment variables (optional):
LOG_LEVEL
: Logging level (DEBUG, INFO, WARNING, ERROR)LOG_FILE
: Log file path (default: console only)Feature | Smithery Hosted | Local Installation |
---|---|---|
Setup Time | ⚡ 2 minutes | ⏱️ 10-15 minutes |
Complexity | 🟢 Beginner-friendly | 🟡 Technical setup required |
Maintenance | ✅ Zero (auto-updates) | 🔧 Manual updates needed |
Performance | 🚀 Optimized hosting | 💻 Depends on local setup |
Privacy | 🌐 Hosted platform | 🔒 Fully local |
Dependencies | ❌ None | 🐍 Python, packages, OAuth |
Troubleshooting | 📞 Platform support | 🛠️ Self-service |
whoop-mcp-server/
├── src/ # Python local installation
│ ├── whoop_mcp_server.py # Main MCP server
│ ├── whoop_client.py # WHOOP API client
│ ├── auth_manager.py # Token management
│ └── config.py # Configuration
├── smithery/ # TypeScript source files
│ └── src/
│ ├── index.ts # Smithery MCP server
│ ├── whoop-client.ts # TypeScript WHOOP client
│ └── types.ts # Type definitions
├── storage/ # Local installation only
│ ├── tokens.json # Encrypted tokens (auto-generated)
│ └── .encryption_key # Encryption key (auto-generated)
├── package.json # Node.js dependencies (Smithery)
├── smithery.yaml # Smithery configuration (root required)
├── tsconfig.json # TypeScript configuration
├── setup.py # Interactive setup script
└── requirements.txt # Python dependencies
python setup.py
to re-authorizepython setup.py
to get new tokens"command": "python"
to "command": "/opt/miniconda3/bin/python"
(use which python3
to find yours)~/Library/Application Support/Claude/claude_desktop_config.json
(not .claude.json
)/Users/username/whoop-mcp-server/src/whoop_mcp_server.py
tail -f ~/Library/Logs/Claude/mcp-server-whoop.log
The server automatically refreshes expired tokens using the refresh token. If this fails, you'll need to re-authorize:
python setup.py
Logs are written to console by default. To log to a file:
export LOG_FILE="/path/to/whoop-mcp.log" export LOG_LEVEL="INFO"
This project is licensed under the MIT License - see the LICENSE file for details.
This is an unofficial integration with WHOOP. It uses the official WHOOP API but is not endorsed by WHOOP.