Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WHOOP MCP Serverwhat's my recovery score and strain for today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WHOOP MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with the WHOOP API. This server enables LLMs to retrieve sleep, recovery, and physiological cycle data from WHOOP.
Features
š OAuth 2.0 Authentication with automatic token refresh
š“ Sleep Data: Retrieve detailed sleep metrics by ID or cycle
š Cycle Data: Access physiological cycles with strain and heart rate data
šŖ Recovery Data: Get recovery scores, HRV, and readiness metrics
š Built with xmcp: Fast, type-safe MCP implementation
Prerequisites
Node.js 20 or higher
A WHOOP account
WHOOP API credentials (Client ID and Secret)
Getting WHOOP API Credentials
Visit the WHOOP Developer Dashboard
Create a new OAuth application
Set the redirect URI to:
http://localhost:3000/auth/whoop/callbackNote your Client ID and Client Secret
Installation
Configuration
Copy the environment template:
Add your WHOOP credentials to
.env:
Authentication
Before using the MCP server, you need to authenticate with WHOOP:
This will:
Open a browser window for WHOOP OAuth login
Save your access and refresh tokens locally
Automatically refresh tokens when they expire
Usage
Using with Claude Desktop - STDIO Mode (Recommended)
STDIO mode is recommended for better performance and reliability.
Get the full path to your installation:
Add the server to your Claude Desktop configuration (
~/Library/Application Support/Claude/claude_desktop_config.json):
Replace /Users/yourname/projects/whoop-mcp with your actual installation path.
Using via HTTP Mode
For HTTP mode, start the server:
The server will run on http://localhost:3002/mcp
For Claude Desktop HTTP configuration:
Important: When using STDIO mode with Claude Desktop, you MUST include the env section with your WHOOP credentials, as shown above. The server cannot read your .env file when launched by Claude Desktop.
See xmcp HTTP transport documentation for more details.
Development Mode
Available Tools
get-recent-cycles
Retrieves recent physiological cycles (days) with strain and heart rate data.
Parameters:
limit(number, optional): Number of cycles to retrieve (1-25, default: 10)days(number, optional): Number of days to look back (1-30)
Example:
get-sleep-by-id
Gets detailed sleep data for a specific sleep ID.
Parameters:
sleepId(string): UUID of the sleep activity
Example:
get-sleep-for-cycle
Retrieves sleep data associated with a specific cycle.
Parameters:
cycleId(number): ID of the cycle
Example:
get-recovery-for-cycle
Gets recovery metrics for a specific cycle, including HRV and readiness scores.
Parameters:
cycleId(number): ID of the cycle
Example:
Data Interpretation
Recovery Scores
Green (67-100%): Ready for high strain
Yellow (34-66%): Moderate readiness
Red (0-33%): Focus on recovery
Strain Scale
WHOOP Strain is measured on a scale from 0 to 21
Higher values indicate greater cardiovascular load
Project Structure
Token Management
Tokens are stored in
.whoop-tokens.jsonin the project rootAccess tokens expire after 1 hour
Refresh tokens are automatically used to obtain new access tokens
Run
pnpm refresh-tokento manually refresh tokens
Troubleshooting
"Not authenticated" error
Run pnpm auth to authenticate with WHOOP.
"Resource not found" error
Ensure your WHOOP app has the required scopes:
read:cyclesread:sleepread:recoveryread:profileoffline(for refresh tokens)
Rate limiting
WHOOP API has rate limits. If you encounter 429 errors, wait before making more requests.
Development
Security Notes
Never commit
.envor.whoop-tokens.jsonfilesKeep your Client Secret secure
Tokens are stored in the project root as
.whoop-tokens.jsonTokens are never transmitted except to WHOOP
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT - See LICENSE file for details
Acknowledgments
Built with xmcp - Fast MCP implementation
Uses the WHOOP API v2
Additional Resources
Support
For WHOOP API issues, visit the WHOOP Developer Documentation.
For MCP-related questions, see the Model Context Protocol documentation.