Strava MCP Server
Strava MCP-Server
Ein Model Context Protocol (MCP)-Server, der Claude mit deinem Strava-Konto verbindet. Bitte Claude in natürlicher Sprache, dein Training zu analysieren, Rennzeiten vorherzusagen, Trainingsbelastungen zu berechnen oder einen vollständigen periodisierten Trainingsplan zu erstellen.
Funktionen
13 Tools in 5 Kategorien: Authentifizierung, Aktivitäten, Analyse, Vorhersage, Planung
OAuth2-Ablauf mit automatischem lokalen Callback-Server — kein manuelles Kopieren von Codes
VDOT-basierte Trainingsgeschwindigkeiten (Jack Daniels' Running Formula)
CTL/ATL/TSB-Trainingsbelastungsmetriken (Chronische/Akute Trainingsbelastung, Training Stress Balance)
Rennzeitvorhersagen mittels Riegel-Formel
Vollständige periodisierte Trainingspläne (Basis → Aufbau → Höhepunkt → Tapering) mit rennspezifischer Logik
Related MCP server: Strava MCP Server
Anforderungen
Node.js ≥ 18
Ein Strava-Konto
Claude Desktop (oder ein beliebiger MCP-kompatibler Client)
Einrichtung
1. Erstelle eine Strava-API-Anwendung
Gehe zu strava.com/settings/api und erstelle eine Anwendung.
Authorization Callback Domain:
localhost
Notiere dir deine Client ID und dein Client Secret.
2. Konfiguriere Umgebungsvariablen
cp .env.example .envBearbeite .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. Konfiguriere Claude Desktop
Bearbeite %APPDATA%\Claude\claude_desktop_config.json (Windows) oder ~/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"
}
}
}
}Du kannst entweder
.envoder denenv-Block in der Claude Desktop-Konfiguration verwenden — beides funktioniert.
5. Authentifizierung
Starte Claude Desktop neu und führe dann in einer Unterhaltung folgende Schritte aus:
Rufe
strava_get_auth_urlauf — Claude gibt eine URL zurückÖffne die URL in deinem Browser und autorisiere die App bei Strava
Die Seite zeigt "✓ Authentification réussie !" an und die Tokens werden automatisch gespeichert
Verfügbare Tools
Authentifizierung
Tool | Beschreibung |
| Generiert die OAuth2-URL und startet den lokalen Callback-Server |
| Manueller Fallback: Tausche einen Auth-Code gegen Tokens |
| Überprüfe, ob Tokens gültig sind und wann sie ablaufen |
Aktivitäten
Tool | Beschreibung |
| Liste kürzliche Aktivitäten (Laufen, Radfahren, Gehen, Alle) mit Distanz, Pace, HF |
| Volle Details für eine Aktivität: Splits pro km, Runden, Kalorien |
| Globale Strava-Statistiken: diese Woche, dieses Jahr, insgesamt |
Analyse
Tool | Beschreibung |
| Wöchentliche Volumenaufschlüsselung + Konsistenz-Score |
| CTL (Fitness) / ATL (Ermüdung) / TSB (Frische) via TRIMP |
| Verteilung über 6 Pace-Zonen, Überprüfung der 80/20-Regel |
Vorhersage
Tool | Beschreibung |
| Vorhersage der Zielzeit via Riegel-Formel basierend auf einer Referenzleistung |
| Berechne VDOT-Score + 5 Trainings-Pace-Zonen aus jeder Rennleistung |
Trainingsplanung
Tool | Beschreibung |
| Vollständiger periodisierter Plan von heute bis zum Renntag (Basis/Aufbau/Höhepunkt/Tapering) |
| Generiere nur die Einheiten für die nächste Woche einer bestimmten Phase |
Details zum Trainingsplan
Phasen
Phase | Fokus | Intensität |
Basis | Aerobe Grundlage | Lockere Läufe, langer Lauf, Steigerungen |
Aufbau | Laktatschwelle | Tempo, lockerer Dauerlauf, langer Lauf |
Höhepunkt | VO2max + rennspezifisch | Intervalle, Tempo, langer Lauf |
Tapering | Frische | Reduziertes Volumen, Erhalt der Qualität |
Wie das Volumen berechnet wird
Startvolumen — Mischung aus deinem 4-Wochen-Durchschnitt in km und der CTL-basierten wöchentlichen km-Schätzung (robust bei Verletzungspausen)
Höchstvolumen — 1,4× aktuell, mit rennspezifischen Mindestwerten (5K: 40km, 10K: 50km, Halbmarathon: 60km, Marathon: 80km)
Wöchentliche Progression — begrenzt auf +10% pro Woche, um Verletzungen vorzubeugen
Erholungswochen — automatisch jede 4. Woche innerhalb jeder Phase (Volumen × 0,8)
Rennspezifische Logik
Marathon (Aufbau & Höhepunkt): Lange Läufe beinhalten einen Abschnitt im Marathontempo (~45% des Laufs im Renntempo)
Tapering-Tiefe: 5K tapert auf 80% des Höchstvolumens, Marathon auf 40% — kürzere Rennen benötigen weniger Erholung
Intervalle: 6 × 1000m für 5K/10K, 5 × 1000m für Halbmarathon/Marathon
VDOT & Pace-Zonen
Basierend auf Jack Daniels' Running Formula. Zonen werden als Bruchteil des VDOT berechnet:
Zone | % von VDOT | Verwendung |
Easy | 65% | Tägliche Läufe, langer Lauf |
Marathon | 80% | Abschnitte im Marathontempo |
Threshold | 86% | Tempoläufe |
Interval | 98% | VO2max-Intervalle |
Repetition | 105% | Schnelligkeitstraining / Steigerungen |
Pläne für Freunde erstellen (manueller Modus)
strava_generate_training_plan unterstützt einen manuellen Modus, der Strava komplett umgeht. Übergebe current_weekly_km und goal_time zusammen, dann ist kein Strava-Konto erforderlich — nützlich, um Pläne für Freunde von deinem eigenen Claude Desktop aus zu erstellen.
Erforderliche Parameter
Parameter | Beschreibung | Beispiel |
| Renndistanz |
|
| Renndatum (JJJJ-MM-TT) |
|
| Zielzeit |
|
| Aktuelles wöchentliches Kilometerpensum |
|
Beispiel-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 semaineWenn sowohl current_weekly_km als auch goal_time angegeben sind, überspringt das Tool alle Strava-API-Aufrufe. Die resume in der Antwort enthält source_volume: "Fourni manuellement", um zu bestätigen, welcher Modus verwendet wurde.
Modus-Vergleich
Strava-Modus | Manueller Modus | |
Strava-Konto erforderlich | Ja | Nein |
Volumenkalibrierung | 4-Wochen-Schnitt + CTL | Wert, den du angibst |
VDOT-Schätzung | Aus kürzlichen Aktivitäten oder | Aus |
Anwendungsfall | Dein eigenes Training | Freunde / Athleten ohne Strava |
Entwicklung
# Watch mode (no build step needed)
npm run dev
# Build TypeScript
npm run build
# Run built server
npm start
# Clean build artifacts
npm run cleanProjektstruktur
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 speichert deine Strava-Zugriffs- und Refresh-Tokens. Es befindet sich in .gitignore — committe es niemals. Tokens werden automatisch aktualisiert, wenn sie ablaufen (Strava-Zugriffstokens sind 6 Stunden gültig).
Beispiel-Prompts
Strava-Modus (dein eigenes Konto)
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 semainesManueller Modus (Freunde / kein 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 semaineLizenz
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 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.
Pace is a remote MCP server that exposes wearable and fitness data to Claude via the Model Context Protocol. It connects to Garmin, Oura, Whoop, Polar, Fitbit and 20+ devices and provides 15 tools for querying sleep, activity, recovery, and training data. Hosted on Google Cloud Run, OAuth 2.1 authentication, Streamable HTTP transport. Instructions: First you need to create an account at: https://pacetraining.co and connect your wearables. After that you can connect the remote Server via Custom Connector in Claude and OAuth 2.1 Flow startet.
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.8MIT
- AlicenseNot gradedqualityCmaintenanceConnects Claude to Strava data for natural language queries about rides, stats, and activities.8 npmMIT
- AlicenseAqualityDmaintenanceConnects Claude to your Strava account so you can query your activities, stats, routes, and segments using natural language.2721 npm1MIT
- AlicenseAqualityDmaintenanceConnects Strava training data to Claude, enabling personalized coaching through analysis of training load, workout planning, gear maintenance, and power metrics.1064 PyPI1MIT