whoop-api-mcp
If you are the rightful owner of whoop-api-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An MCP server for accessing Whoop fitness data through its API.
Whoop API MCP Server
An MCP (Mission Control Protocol) server for interacting with the Whoop API to retrieve fitness and health data.
Overview
This MCP server provides a standardized interface for accessing Whoop fitness data through its API. It handles authentication, data retrieval, and formatting to make it easy to integrate Whoop data into your applications.
Features
- OAuth 2.0 authentication with Whoop API
- User profile information
- Recovery data
- Sleep data
- Workout data
- Menstrual cycle tracking data
- MCP-compliant discovery endpoint
- Clean error handling and logging
Prerequisites
- Node.js 16.x or higher
- Whoop developer account and API credentials
- Register your app in the Whoop Developer Portal
Installation
-
Clone the repository:
git clone https://github.com/RyanLisse/whoop-api-mcp.git cd whoop-api-mcp
-
Install dependencies:
npm install
-
Create a
.env
file based on the.env.example
:cp .env.example .env
-
Update the
.env
file with your Whoop API credentials:WHOOP_CLIENT_ID=your_client_id_here WHOOP_CLIENT_SECRET=your_client_secret_here WHOOP_REDIRECT_URI=http://localhost:3000/auth/callback
Usage
-
Start the server:
npm start
-
The MCP endpoint will be available at:
http://localhost:3000/.well-known/mcp.json
-
To authenticate a user with Whoop, direct them to:
http://localhost:3000/auth/login
-
After authentication, you'll receive access and refresh tokens to use with the API endpoints.
Endpoints
GET /user
- Get user profile informationGET /user/membership
- Get user membership informationGET /recovery?start=YYYY-MM-DD&end=YYYY-MM-DD
- Get recovery data for a date rangeGET /recovery/latest
- Get most recent recovery dataGET /sleep?start=YYYY-MM-DD&end=YYYY-MM-DD
- Get sleep data for a date rangeGET /workout?start=YYYY-MM-DD&end=YYYY-MM-DD
- Get workout data for a date rangeGET /cycle?start=YYYY-MM-DD&end=YYYY-MM-DD
- Get menstrual cycle data for a date range
Whoop API Documentation
For more information about the Whoop API, refer to the official Whoop API documentation.
MCP Specification
This server follows the MCP (Mission Control Protocol) specification. The MCP discovery endpoint is available at /.well-known/mcp.json
.
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.