A demonstration of how to use Parallel AI with WHOOP fitness data through the Model Context Protocol (MCP). This project shows how AI agents can access and analyze your personal WHOOP health and fitness data in real-time.
Forked from: dpshade/WHOOP-mcp - A comprehensive MCP server for WHOOP data. The only adjustment made to this server was adding a workout analysis tool, to access strain and excercise type data for each workout.
- AI Agent Integration: Parallel AI agents can access your WHOOP data through MCP
- Real-time Analysis: Stream live analysis progress as the AI processes your fitness data
- Personalized Insights: Get AI-powered insights based on your actual WHOOP metrics
- Multi-tool Coordination: Watch as AI uses multiple WHOOP data tools to build comprehensive analysis
- Python 3.8+
- WHOOP account and API access
- Parallel AI account and API key
- ngrok for secure tunneling (free account works)
git clone <your-repo-url>
cd WHOOP-mcp-parallel
# Install MCP server dependencies
pip install -r requirements.txt
# Install demo dependencies
pip install -r demo_requirements.txtGet your WHOOP API credentials from the WHOOP Developer Portal:
export WHOOP_CLIENT_ID="your_whoop_client_id"
export WHOOP_CLIENT_SECRET="your_whoop_client_secret"Get your API key from Parallel AI:
export PARALLEL_API_KEY="your_parallel_api_key"python web_server.pyYou should see:
INFO: Starting WHOOP MCP Web Server on 0.0.0.0:8080
INFO: Uvicorn running on http://0.0.0.0:8080
In a new terminal, first kill any existing ngrok processes, then start ngrok:
# Kill any existing ngrok processes
pkill -f ngrok
# Start ngrok
ngrok http 8080Copy the HTTPS URL from the output (e.g., https://abc123.ngrok-free.app)
curl "https://YOUR-NGROK-URL.ngrok-free.app/whoop/auth"Follow the returned auth URL to complete WHOOP OAuth authentication.
python demo_parallel_whoop.py https://YOUR-NGROK-URL.ngrok-free.app- Server startup - Your local MCP server starts and exposes WHOOP data tools
- Parallel AI task creation - A task is submitted to Parallel AI with access to your server
- Real-time streaming - Watch as the AI:
- Plans its analysis approach
- Calls your WHOOP MCP tools to get real data
- Searches for relevant research and benchmarks
- Synthesizes personalized insights
- Final report - Comprehensive analysis combining your data with research
The server exposes these tools that Parallel AI can use:
get_sleep_data- Your sleep metrics and quality scoresget_recovery_data- Recovery scores and HRV dataget_workout_data- Workout details and performance metricsget_cycle_data- Daily strain and recovery cyclesget_profile_data- Your WHOOP profile informationget_workout_analysis- Detailed workout performance analysisget_sleep_quality_analysis- Sleep optimization recommendationsget_training_readiness- Multi-factor readiness assessment
Edit the prompt in demo_parallel_whoop.py to focus on different aspects:
def create_prompt():
return """Analyze my WHOOP data focusing on:
1. Sleep optimization opportunities
2. Training load management
3. Recovery patterns
[Add your specific questions here]
"""Add new tools to whoop_mcp.py:
@mcp.tool()
def get_custom_analysis() -> str:
"""Your custom analysis tool"""
# Implementation here
return "Custom analysis result"For production use, consider:
- Cloud hosting: Deploy the MCP server to platforms like Railway, Render, or AWS
- SSL certificates: Use proper SSL instead of ngrok for production
- Authentication: Add proper API key management for team use
- Rate limiting: Implement appropriate rate limiting for your use case
See the original dpshade/WHOOP-mcp repository for full deployment guides and enterprise features.
- Parallel AI Documentation
- WHOOP Developer API
- Model Context Protocol (MCP)
- Original WHOOP-MCP Project
"PARALLEL_API_KEY environment variable is required"
- Make sure you've set the environment variable:
export PARALLEL_API_KEY="your_key"
"ngrok URL not working"
- Check your ngrok tunnel is active:
curl http://localhost:4040/api/tunnels - Update the URL in your demo command
"WHOOP authentication failed"
- Re-run the auth step:
curl "https://YOUR-NGROK-URL.ngrok-free.app/whoop/auth" - Make sure you completed the OAuth flow in your browser
"No MCP tool calls appearing"
- Verify your ngrok URL is correct
- Check the MCP server logs for incoming requests
- Ensure WHOOP authentication is fresh (tokens expire)
This is a demonstration project. For production features and bug fixes, contribute to the original dpshade/WHOOP-mcp repository.