Skip to content

Strava Integration

Cadence connects to Strava via OAuth2 to pull activities, athlete stats, and training zones.

Setup

1. Create a Strava API App

  1. Go to Strava API Settings
  2. Create a new application
  3. Set the authorization callback domain to your server:
    • Local development: localhost
    • Production: your domain

2. Configure Environment Variables

STRAVA_CLIENT_ID=your-client-id
STRAVA_CLIENT_SECRET=your-client-secret
STRAVA_REDIRECT_URI=http://localhost:8000/auth/strava/callback

3. Authorize

Navigate to http://localhost:8000/auth/strava in your browser. You'll be redirected to Strava to authorize, then back to your server.

Available Data

Activities

Data Tool Description
Recent activities strava_get_activities Runs, rides, swims with distance, pace, HR, suffer score
Activity detail strava_get_activity_detail Splits, laps, HR zones, elevation

Athlete Stats

Data Tool Description
Stats strava_get_stats All-time, year-to-date, and recent totals for run/ride/swim
Training zones strava_get_zones HR and power zone boundaries from your Strava profile

Cross-Platform Behavior

When both Strava and Garmin are connected:

  • Activities: The unified get_activities tool merges data from both sources with duplicate detection
  • Running volume: get_running_volume tries Garmin first, falls back to Strava
  • Athlete stats: get_athlete_stats is Strava-only (Garmin doesn't expose equivalent totals)
  • Training zones: get_training_zones pulls from Strava's zone configuration