Strava MCP Server
Connects to your Strava account to analyze training activities, predict race times, compute training loads (CTL/ATL/TSB), manage training plans, and retrieve activity details and athlete stats.
Click on "Deploy 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., "@Strava MCP Server analyze my last week of training"
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.
Strava MCP Server
A Model Context Protocol (MCP) server that connects Claude to your Strava account. Ask Claude in natural language to analyze your training, predict race times, compute training loads, or generate a full periodized training plan.
Features
13 tools across 5 categories: auth, activities, analysis, prediction, planning
OAuth2 flow with automatic local callback server — no manual code copying
VDOT-based training paces (Jack Daniels' Running Formula)
CTL/ATL/TSB training load metrics (Chronic/Acute Training Load, Training Stress Balance)
Race time predictions via Riegel formula
Full periodized training plans (Base → Build → Peak → Taper) with race-specific logic
Related MCP server: Strava MCP Server
Requirements
Node.js ≥ 18
A Strava account
Claude Desktop (or any MCP-compatible client)
Setup
1. Create a Strava API application
Go to strava.com/settings/api and create an application.
Authorization Callback Domain:
localhost
Note your Client ID and Client Secret.
2. Configure environment variables
cp .env.example .envEdit .env:
STRAVA_CLIENT_ID=your_client_id
STRAVA_CLIENT_SECRET=your_client_secret
STRAVA_REDIRECT_URI=http://localhost:8080/callback
TOKENS_FILE_PATH=./tokens.json3. Build
npm install
npm run build4. Configure Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"strava": {
"command": "node",
"args": ["C:/path/to/McpStrava/dist/index.js"],
"env": {
"STRAVA_CLIENT_ID": "your_client_id",
"STRAVA_CLIENT_SECRET": "your_client_secret",
"TOKENS_FILE_PATH": "C:/path/to/McpStrava/tokens.json"
}
}
}
}You can use either
.envor theenvblock in the Claude Desktop config — both work.
5. Authenticate
Restart Claude Desktop, then in a conversation:
Call
strava_get_auth_url— Claude will return a URLOpen the URL in your browser and authorize the app on Strava
The page will show "✓ Authentification réussie !" and tokens are saved automatically
Available Tools
Authentication
Tool | Description |
| Generates the OAuth2 URL and starts the local callback server |
| Manual fallback: exchange an auth code for tokens |
| Check if tokens are valid and when they expire |
Activities
Tool | Description |
| List recent activities (Run, Ride, Walk, All) with distance, pace, HR |
| Full detail for one activity: splits per km, laps, calories |
| Global Strava stats: this week, this year, all-time |
Analysis
Tool | Description |
| Weekly volume breakdown + consistency score |
| CTL (fitness) / ATL (fatigue) / TSB (freshness) via TRIMP |
| Distribution across 6 pace zones, 80/20 rule check |
Prediction
Tool | Description |
| Predict finish times via Riegel formula from a reference effort |
| Compute VDOT score + 5 training pace zones from any race performance |
Training Planning
Tool | Description |
| Full periodized plan from today to race day (Base/Build/Peak/Taper) |
| Generate just next week's sessions for a given phase |
Training Plan Details
Phases
Phase | Focus | Intensity |
Base | Aerobic foundation | Easy runs, long run, strides |
Build | Lactate threshold | Tempo, easy medium, long run |
Peak | VO2max + race-specific | Intervals, tempo, long run |
Taper | Freshness | Reduced volume, maintenance quality |
How volume is calculated
Starting volume — blend of your 4-week average km and CTL-derived weekly km estimate (robust to injury breaks)
Peak volume — 1.4× current, with race-specific minimums (5K: 40km, 10K: 50km, Half: 60km, Marathon: 80km)
Weekly progression — capped at +10% per week to prevent injury
Recovery weeks — automatic every 4th week within each phase (volume × 0.8)
Race-specific logic
Marathon (Build & Peak): Long runs include a marathon-pace section (~45% of the run at race pace)
Taper depth: 5K tapers to 80% of peak volume, Marathon to 40% — shorter races need less recovery
Intervals: 6 × 1000m for 5K/10K, 5 × 1000m for Half/Marathon
VDOT & pace zones
Based on Jack Daniels' Running Formula. Zones computed as a fraction of VDOT:
Zone | % of VDOT | Use |
Easy | 65% | Daily runs, long run |
Marathon | 80% | Marathon-pace sections |
Threshold | 86% | Tempo runs |
Interval | 98% | VO2max intervals |
Repetition | 105% | Speed work / strides |
Generating plans for friends (manual mode)
strava_generate_training_plan supports a manual mode that bypasses Strava entirely. Pass current_weekly_km and goal_time together and no Strava account is needed — useful for generating plans for friends from your own Claude Desktop.
Required parameters
Parameter | Description | Example |
| Race distance |
|
| Race date (YYYY-MM-DD) |
|
| Target finish time |
|
| Current weekly mileage |
|
Example prompts
Génère un plan marathon pour mon ami, il court 55km par semaine et vise 3h45, la course est le 18 octobre 2026Mon amie veut courir un semi-marathon en 1h50 le 2026-09-14, elle fait environ 40km par semaineWhen both current_weekly_km and goal_time are provided, the tool skips all Strava API calls. The resume in the response will include source_volume: "Fourni manuellement" to confirm which mode was used.
Mode comparison
Strava mode | Manual mode | |
Strava account needed | Yes | No |
Volume calibration | 4-week avg + CTL | Value you provide |
VDOT estimation | From recent activities or | From |
Use case | Your own training | Friends / athletes without Strava |
Development
# Watch mode (no build step needed)
npm run dev
# Build TypeScript
npm run build
# Run built server
npm start
# Clean build artifacts
npm run cleanProject structure
src/
├── index.ts # MCP server entry point
├── config.ts # Env vars, Strava constants, race distances
├── types.ts # Shared TypeScript interfaces
├── auth/
│ ├── oauth.ts # OAuth2 URL builder, token exchange
│ ├── tokenStore.ts # Load/save tokens.json, expiry check
│ ├── callbackServer.ts # Local HTTP server for OAuth redirect
│ └── authTools.ts # MCP auth tools
├── strava/
│ ├── client.ts # Axios instance with auto token refresh
│ ├── activities.ts # Strava activities API
│ ├── athlete.ts # Strava athlete/stats API
│ └── activityTools.ts # MCP activity tools
├── analytics/
│ ├── metrics.ts # Weekly stats, pace zones, consistency score
│ ├── trainingLoad.ts # TRIMP, CTL/ATL/TSB computation
│ └── analysisTools.ts # MCP analysis tools
├── prediction/
│ ├── riegel.ts # Riegel race time prediction formula
│ ├── vdot.ts # VDOT computation, training paces, race equivalents
│ └── predictionTools.ts # MCP prediction tools
└── planning/
├── workouts.ts # Workout templates and distance bounds
├── plan.ts # Plan generation, phase allocation, VDOT estimation
└── planTools.ts # MCP planning toolsTokens
tokens.json stores your Strava access and refresh tokens. It is in .gitignore — never commit it. Tokens are refreshed automatically when they expire (Strava access tokens last 6 hours).
Example prompts
Strava mode (your own account)
Analyse mes 8 dernières semaines d'entraînementQuelle serait mon heure sur un marathon si je cours un 10K en 45min ?Génère-moi un plan d'entraînement pour un semi-marathon le 2026-09-20Calcule ma charge d'entraînement actuelle et dis-moi si je suis en forme pour une course ce week-endMontre-moi la répartition de mes allures sur les 4 dernières semainesManual mode (friends / no Strava)
Génère un plan marathon pour mon ami, il court 55km par semaine et vise 3h45, la course est le 18 octobre 2026Mon amie veut courir un semi-marathon en 1h50 le 14 septembre 2026, elle fait 40km par semaineLicense
MIT
Available Tools
13 toolsstrava_analyze_trainingAnalyser l'entraînementA
Analyse la charge d'entraînement récente : volume hebdomadaire (km, temps, sorties), longue sortie, allure moyenne par semaine, score de régularité.
Inputs: weeks.
strava_athlete_statsStatistiques de l'athlèteA
Récupère les statistiques globales Strava : kilomètres cette semaine, ce mois, cette année, et all-time.
Inputs: no named parameters.
strava_auth_statusVérifier le statut d'authentificationA
Vérifie si des tokens Strava valides existent et quand ils expirent.
Inputs: no named parameters.
strava_exchange_tokenÉchanger le code d'autorisation contre des tokensA
Échange le code OAuth2 (depuis l'URL de redirection après autorisation dans le navigateur) contre des tokens d'accès et de rafraîchissement. Les tokens sont sauvegardés localement.
Inputs: code (required).
strava_generate_training_planGénérer un plan d'entraînement personnaliséA
Génère un plan d'entraînement structuré depuis aujourd'hui jusqu'au jour de la course, en 4 phases : Base (fondation aérobie), Build (développement du seuil), Peak (VO2max et spécifique course), Taper (affûtage). Mode Strava : calibre automatiquement le volume et le VDOT depuis l'historique. Mode manuel : passer current_weekly_km + goal_time pour générer un plan sans compte Strava.
Inputs: target_race (required), race_date (required), goal_time, current_weekly_km, +1 more.
strava_get_activitiesRécupérer les activités StravaA
Récupère la liste des activités récentes de l'athlète avec distance, temps, allure et fréquence cardiaque.
Inputs: days, activity_type, max_results.
strava_get_activity_detailDétail d'une activitéB
Récupère le détail complet d'une activité Strava (laps, splits kilomètre par kilomètre, calories).
Inputs: activity_id (required).
strava_get_auth_urlObtenir l'URL d'autorisation StravaA
Génère l'URL OAuth2 Strava. Ouvrir cette URL dans un navigateur, autoriser l'application, puis copier le paramètre 'code' depuis l'URL de redirection et le passer à strava_exchange_token.
Inputs: no named parameters.
strava_pace_zonesDistribution des zones d'allureA
Analyse la répartition des kilomètres par zone d'allure (Récupération, Facile, Aérobie, Seuil, VO2max, Anaérobie). Aide à vérifier la règle 80/20 (80% en zones basses).
Inputs: weeks, threshold_pace_min_km.
strava_predict_race_timePrédire les temps de course (formule Riegel)A
Prédit les temps sur les distances standard (5K, 10K, Semi, Marathon) en utilisant la formule de Riegel (T2 = T1 × (D2/D1)^1.06) depuis une performance récente. Auto-détecte la meilleure performance récente sur Strava, ou accepte une entrée manuelle.
Inputs: known_distance_m, known_time, target_distances, days_lookback.
strava_training_loadCalculer la charge d'entraînement (CTL/ATL/TSB)A
Calcule les métriques de forme, fatigue et fraîcheur via des moyennes exponentielles. CTL (fitness chronique, 42j) / ATL (fatigue aiguë, 7j) / TSB = CTL - ATL (fraîcheur). TSB > +10 = frais pour une course ; TSB < -20 = surcharge.
Inputs: days, hr_rest, hr_max, show_daily.
strava_vdotCalculer VDOT et allures d'entraînementA
Calcule ton score VDOT (indice de capacité aérobie de Jack Daniels) depuis une performance récente. Retourne : score VDOT, 5 zones d'allure d'entraînement (Facile, Marathon, Seuil, Intervalle, Répétition), et les équivalents de temps sur toutes les distances standard.
Inputs: distance_m (required), time (required).
strava_weekly_workoutGénérer les séances de la semaine prochaineA
Génère uniquement les séances d'entraînement de la semaine prochaine, basées sur le VDOT et le volume actuel. Plus léger que le plan complet.
Inputs: vdot, weekly_km, phase, target_race, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools target distinct aspects of training analysis (load, pace zones, VDOT, weekly plan), but some overlap exists between race time prediction tools (predict_race_time and vdot both estimate race times, though from different formulas). Descriptions help differentiate, but potential confusion remains.
All tools start with 'strava_' and use snake_case, but there is inconsistency in verb-noun order: some start with a verb (strava_analyze_training, strava_get_activities) and others with a noun (strava_athlete_stats, strava_pace_zones). This mixed pattern reduces predictability.
13 tools is a well-scoped set for a training analysis server. It covers authentication, activity retrieval, multiple analysis dimensions, and plan generation without being overwhelming.
The tool set provides comprehensive coverage of training analysis (load, pace, VDOT, race prediction, plan generation) and basic activity retrieval. Minor gaps exist, such as no tool to fetch or modify generated training plans, but core workflows are supported.
Related MCP Connectors
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Connect Intervals.icu to Claude and ChatGPT: read training, plan workouts. Training never stored.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Turn Claude or ChatGPT into a cycling coach that plans your week, grades it, and adapts. Free beta.
Related MCP Servers
- AlicenseBqualityDmaintenanceConnects Claude to the Strava API to provide direct access to fitness data, including athlete statistics, detailed activity logs, and time-series performance metrics. It enables users to analyze training progress, compare workouts, and retrieve specific segment details through natural language queries.8125 npmISC
- AlicenseNot gradedqualityCmaintenanceConnects Claude to Strava data for natural language queries about rides, stats, and activities.10 npmMIT
- AlicenseAqualityDmaintenanceConnects Claude to your Strava account so you can query your activities, stats, routes, and segments using natural language.2724 npm1MIT
- AlicenseAqualityDmaintenanceConnects Strava training data to Claude, enabling personalized coaching through analysis of training load, workout planning, gear maintenance, and power metrics.1033 PyPI1MIT