whoop-fitness
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-fitnessWhat's my recovery score 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 FastAPI + MCP Server
Full-stack WHOOP integration with FastAPI OAuth server and Model Context Protocol (MCP) server for Claude Desktop.
🚀 Features
FastAPI OAuth Server - Authenticate with WHOOP and access your health data
MCP Server - Integrate WHOOP data directly into Claude Desktop conversations
Complete Data Access - Recovery, sleep, workouts, cycles, and body measurements
Historical Queries - Access data from specific dates or date ranges
Secure - OAuth 2.0 authentication with encrypted token storage
Related MCP server: Whoop MCP Server
📦 What's Included
1. FastAPI Application (whoop_simple.py)
Web server for WHOOP OAuth authentication and data exploration:
OAuth 2.0 flow with WHOOP API
Dashboard with health metrics
REST API endpoints for all WHOOP data
Token caching for seamless access
2. MCP Server (whoop_mcp_server.py)
Model Context Protocol server for Claude Desktop integration:
8 tools for accessing WHOOP data
Support for historical data queries
Recovery scores, sleep analysis, workout tracking
Cycles and strain monitoring
Prerequisites
Python 3.10+
VS Code with Python extension (optional)
HTTPS dev URL (ngrok/cloudflared) for OAuth redirect
Claude Desktop (for MCP integration)
WHOOP Developer App credentials from developer.whoop.com
Quick Start
1. Install Dependencies
# Create virtual environment
python -m venv .venv
# Activate it
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# Install packages
pip install -r requirements.txt2. Configure Environment
# Copy template
cp .env.example .envEdit .env and add your credentials:
WHOOP_CLIENT_ID=your_client_id_here
WHOOP_CLIENT_SECRET=your_client_secret_here
PUBLIC_BASE_URL=https://your-ngrok-url.ngrok-free.dev3. Setup OAuth Tunnel
# Start ngrok
ngrok http 3000Copy the HTTPS URL and:
Update
PUBLIC_BASE_URLin.envSet callback URL in WHOOP Developer Console to:
https://your-ngrok-url.ngrok-free.dev/callback
4. Authenticate with WHOOP
# Start FastAPI server
python whoop_simple.py
# Open browser to http://localhost:3000
# Click "Click here to login with WHOOP"
# Complete OAuth authorizationOnce authenticated, a .token_cache.json file is created with your OAuth token.
5. Try FastAPI Endpoints
http://localhost:3000/dashboard- Health dashboardhttp://localhost:3000/me- Profile + body measurementshttp://localhost:3000/daily?day=YYYY-MM-DD- Daily cycles
6. Setup MCP Server (Optional)
For Claude Desktop integration:
Configure Claude Desktop:
Edit
%APPDATA%\Claude\claude_desktop_config.json(Windows) or~/Library/Application Support/Claude/claude_desktop_config.json(Mac):{ "mcpServers": { "whoop-fitness": { "command": "C:\\path\\to\\.venv\\Scripts\\python.exe", "args": ["C:\\path\\to\\whoop_mcp_server.py"] } } }Restart Claude Desktop
Test in Claude:
"What's my recovery score today?"
"Show me my last 7 days of data"
"How did I sleep last night?"
See docs/SETUP_MCP.md for detailed MCP setup instructions.
📖 Documentation
QUICKSTART.md - Fast setup and running guide
SETUP_MCP.md - Complete MCP server setup for Claude Desktop
MCP_README.md - MCP server documentation and available tools
ARCHITECTURE.md - System architecture and design
SECURITY_CHECKLIST.md - Security guidelines for GitHub
🔧 Available MCP Tools
Once configured with Claude Desktop, you can use these tools:
Tool | Description |
| Get user profile and basic info |
| Latest recovery score with HRV, RHR |
| Current day strain and heart rate |
| Last 7 days of cycles with recovery |
| Most recent sleep data and stages |
| Recent workout activities |
| Height, weight, max heart rate |
| Complete health overview |
🔐 Security
All sensitive data is protected:
.env- API credentials (in .gitignore).token_cache.json- OAuth tokens (in .gitignore).venv/- Virtual environment (in .gitignore)
Safe to commit and share on GitHub!
🐛 Troubleshooting
FastAPI Issues
404 errors: Ensure using
/developer/v2/API baseOAuth callback fails: Verify ngrok is running and URLs match
No data returned: Check scopes in WHOOP Developer Console include:
read:profileread:body_measurementread:cyclesread:recoveryread:sleepread:workout
MCP Server Issues
Claude Desktop doesn't see server: Check config file path and restart Claude Desktop
"No access token found": Authenticate via FastAPI server first (
http://localhost:3000/login)Tools not appearing: Verify Python path in config points to virtual environment
📝 API Endpoints
FastAPI Server Endpoints
GET /- Home page with linksGET /login- Start OAuth flowGET /callback- OAuth callback handlerGET /me- User profile and measurementsGET /daily?day=YYYY-MM-DD- Cycles for specific dayGET /dashboard- Health dashboard with recent data
🤝 Contributing
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
📄 License
MIT License - See LICENSE file for details
🙏 Acknowledgments
WHOOP API for health data access
Model Context Protocol (MCP) for AI integration
FastAPI for the web framework
Claude Desktop for MCP support
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shashwatchandra/whoop-fastapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server