Aggregates and analyzes health and fitness data from multiple sources.
Health MCP Server
A Model Context Protocol (MCP) server for aggregating and analyzing health and fitness data from multiple sources. Currently supports Whoop and Strava with an extensible adapter architecture for future integrations (Withings, Oura, Garmin, etc.).
Features
Multi-Provider Support
- Modular Architecture: Each adapter is optional and independently configurable
- Auto-Enable: Adapters are automatically enabled when credentials are configured
- Unified Auth: Single OAuth callback server shared across all providers
Whoop Integration
- Sleep Analysis: Track sleep duration, stages (deep, REM, light), efficiency, and consistency
- Recovery Tracking: Monitor recovery scores, HRV, resting heart rate, and SpO2
- Strain Monitoring: View daily strain, workout history, and heart rate zones
- Advanced Insights: Get personalized recommendations, trend analysis, and correlations
Strava Integration
- Activity Tracking: View runs, rides, swims, and all activity types with full stats
- Performance Metrics: Distance, pace, speed, elevation, heart rate, power, and cadence
- Training Zones: Heart rate and power zone configuration and per-activity distribution
- Athlete Stats: All-time totals, year-to-date, and recent activity summaries
- Gear Tracking: Monitor distance on bikes, shoes, and other equipment
Available Tools
General
| Tool | Description |
|---|---|
list_adapters |
List all available adapters and their authentication status |
Whoop Tools
Authentication
| Tool | Description |
|---|---|
whoop_authenticate |
Initiate OAuth2 login flow for Whoop |
whoop_check_auth |
Check current authentication status |
Profile
| Tool | Description |
|---|---|
get_user_profile |
Get user profile and body measurements |
Sleep
| Tool | Description |
|---|---|
get_sleep_summary |
Recent sleep with performance, stages, and needs |
get_sleep_history |
Sleep history over date range with trends |
Recovery
| Tool | Description |
|---|---|
get_recovery_score |
Latest recovery with HRV and status |
get_recovery_history |
Recovery trends over time |
Strain & Workouts
| Tool | Description |
|---|---|
get_strain_today |
Current day strain and heart rate |
get_strain_history |
Daily strain patterns over time |
get_workout_history |
Workout details with HR zones and calories |
Analysis & Insights
| Tool | Description |
|---|---|
get_health_overview |
Comprehensive health dashboard |
analyze_sleep_patterns |
Sleep timing, consistency, and recommendations |
analyze_recovery_factors |
Correlations affecting recovery |
get_weekly_report |
Week-over-week comparison with trends |
get_training_readiness |
Workout intensity recommendations |
Strava Tools
Authentication
| Tool | Description |
|---|---|
strava_authenticate |
Initiate OAuth2 login flow for Strava |
strava_check_auth |
Check current Strava authentication status |
Profile & Stats
| Tool | Description |
|---|---|
get_strava_profile |
Athlete profile with all-time stats and gear |
Activities
| Tool | Description |
|---|---|
get_strava_activities |
Recent activities with distance, pace, HR, etc. |
get_strava_activity_detail |
Detailed activity with laps, segments, and full stats |
get_strava_weekly_summary |
Weekly training summary by activity type |
Training Zones
| Tool | Description |
|---|---|
get_strava_zones |
Your configured HR and power training zones |
get_strava_activity_zones |
Zone distribution for a specific activity |
Installation
Prerequisites
- Python 3.10 or higher
- API credentials for at least one provider (Whoop and/or Strava)
Setup
Clone the repository
cd /path/to/health_mcpCreate a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies
pip install -r requirements.txtConfigure API credentials
Copy the example configuration:
cp config.example.yaml config.yamlEdit
config.yamlwith your API credentials (configure one or both):# Whoop - Get credentials from https://developer.whoop.com/ whoop: client_id: "your_client_id_here" client_secret: "your_client_secret_here" redirect_uri: "http://localhost:8787/callback" # Strava - Get credentials from https://www.strava.com/settings/api strava: client_id: "your_client_id_here" client_secret: "your_client_secret_here" redirect_uri: "http://localhost:8787/callback"Alternative: Environment Variables
# Whoop export HEALTH_MCP_WHOOP_CLIENT_ID="your
Tools (24)
list_adaptersList all available adapters and their authentication statuswhoop_authenticateInitiate OAuth2 login flow for Whoopwhoop_check_authCheck current authentication statusget_user_profileGet user profile and body measurementsget_sleep_summaryRecent sleep with performance, stages, and needsget_sleep_historySleep history over date range with trendsget_recovery_scoreLatest recovery with HRV and statusget_recovery_historyRecovery trends over timeget_strain_todayCurrent day strain and heart rateget_strain_historyDaily strain patterns over timeget_workout_historyWorkout details with HR zones and caloriesget_health_overviewComprehensive health dashboardanalyze_sleep_patternsSleep timing, consistency, and recommendationsanalyze_recovery_factorsCorrelations affecting recoveryget_weekly_reportWeek-over-week comparison with trendsget_training_readinessWorkout intensity recommendationsstrava_authenticateInitiate OAuth2 login flow for Stravastrava_check_authCheck current Strava authentication statusget_strava_profileAthlete profile with all-time stats and gearget_strava_activitiesRecent activities with distance, pace, HR, etc.get_strava_activity_detailDetailed activity with laps, segments, and full statsget_strava_weekly_summaryWeekly training summary by activity typeget_strava_zonesYour configured HR and power training zonesget_strava_activity_zonesZone distribution for a specific activityEnvironment Variables
HEALTH_MCP_WHOOP_CLIENT_IDWhoop API client IDHEALTH_MCP_WHOOP_CLIENT_SECRETWhoop API client secretHEALTH_MCP_STRAVA_CLIENT_IDStrava API client IDHEALTH_MCP_STRAVA_CLIENT_SECRETStrava API client secretConfiguration
{"mcpServers": {"health": {"command": "python", "args": ["/path/to/health_mcp/main.py"], "env": {"HEALTH_MCP_WHOOP_CLIENT_ID": "...", "HEALTH_MCP_WHOOP_CLIENT_SECRET": "...", "HEALTH_MCP_STRAVA_CLIENT_ID": "...", "HEALTH_MCP_STRAVA_CLIENT_SECRET": "..."}}}}