This repo is a protest. In 2026 Strava put API access to your own activities behind a paid subscription. If you don't pay, third-party apps (and you) can no longer read your data through the API; new apps get a 403 Application Inactive until the developer holds an active subscription. Meanwhile Strava keeps monetising that same data itself. Your training history is your data; limiting your access to it is wrong.
You don't have to pay to get it back. Data-portability law (GDPR Art. 20, UK GDPR, and equivalents elsewhere) guarantees your right to a copy of your personal data, and Strava honours it through its bulk export. This repo turns that export into something better than the API ever was: a local MySQL database, an MCP server so AI assistants can answer questions about your training, and a full analysis website. All offline, no Strava account required after the download, no subscription, ever.
- Go to https://www.strava.com/athlete/download_my_account (Settings → My Account → Download or Delete Your Account).
- Under Download Request, click Request Your Archive. This does not delete or affect your account.
- Strava emails you an
export_XXXXXXX.zip(usually within a few hours). It containsactivities.csv, per-activity GPS files, your profile, gear, routes, goals and more.
| Module | Folder | What it does |
|---|---|---|
| Extract | src/extract.ts, src/sources/, .claude/skills/strava-extract/ (skill + bundled bash/PowerShell scripts) |
Imports an export zip into MySQL: activities, full GPS/HR/power streams, athlete, gear, routes, goals. Providers are pluggable; Strava's bulk export is the built-in one |
| MCP server | src/ |
Lets MCP clients (Claude Code, Claude Desktop, ...) query your history: stats, activities, streams, plus arbitrary read-only SQL |
| Website | website/ |
"Training Time Machine": dashboard, trends, calendar heatmap, activity maps, GPS heatmap, records, gear and goal progress. Provider-neutral by design: it never mentions any fitness service |
Everything runs locally. The only network access is OpenStreetMap map tiles in the website.
All screenshots show synthetic demo data: a fictional rider commuting between Wilmslow and central Manchester (generate it yourself, see Try it without your data). No real person's data appears anywhere in this repo.
Want to evaluate the tooling before requesting your archive? Generate the fictional commuter dataset shown above and import it:
npm install && npm run build
docker compose up -d --wait # local MySQL
node dist/demo/generate.js /tmp/demo-export # 243 synthetic rides, Jan to Jun 2026
node dist/extract.js /tmp/demo-export # import them
website/start.sh # browse it (Windows: website\start.ps1)Importing replaces the database contents. If you've already imported your real data, keep the demo in its own database:
MYSQL_DATABASE=demo node dist/extract.js /tmp/demo-export
MYSQL_DATABASE=demo website/start.shPrerequisites: Node.js ≥ 18, Docker (for MySQL), unzip.
- New to the command line? Follow the step-by-step guides: Windows · Mac · Linux
- Developer? Runbooks: Linux · macOS · Windows
git clone https://github.com/barracoder/training-time-machine.git && cd training-time-machine
npm install
# 1. Import your export (starts MySQL via docker compose automatically)
.claude/skills/strava-extract/strava-extract.sh ~/Downloads/export_XXXXXXX.zip
# Windows: .claude/skills/strava-extract/strava-extract.ps1 $HOME\Downloads\export_XXXXXXX.zip
# 2. Explore in the browser (installs/builds on first run, then opens the site)
website/start.sh # Windows: website\start.ps1
# → http://localhost:5178
# 3. Ask an AI about your training (Claude Code)
claude mcp add strava -- node /path/to/training-time-machine/dist/index.jsThis started as a way to read my own history back. There's no reason to stop there. In rough order:
- Mobile apps (iOS and Android): record rides and runs straight into your own database. No account, no cloud, no terms-of-service update in your inbox.
- Training recording: pair heart-rate straps, power meters and trainers over Bluetooth, and log sessions directly. The recording half of the walled garden is the easy half.
- More import sources: Garmin, Polar, Suunto, Fitbit, Apple Health. The importer is already pluggable; each service is one adapter file away.
- Segments and personal leaderboards: compete against yourself without paying for the privilege.
- Route planning built from your own heatmap, since nobody knows your roads better than your data does.
- Friend-to-friend sharing: opt-in and peer-to-peer, with no middleman renting your feed back to you.
Every subscription feature that is really just your own data, presented back to you, is fair game. If a walled garden charges you to look over the wall, build a door. Contributions welcome.
- Architecture & data flow: how the three modules fit together, database schema
- Extract module: importer behaviour, schema details, re-import semantics
- MCP server: tool reference, client registration, configuration
- Website: pages, API reference, development
- Developer runbooks: Linux · macOS · Windows
- Beginner guides: Windows · Mac · Linux
npm test # extract + MCP server (26 tests; integration tests need MySQL up)
cd website && npm test # website API (24 tests)Your export contains personal data: email address, GPS tracks of every activity (including from your home), messages and more. This repo is built so none of it leaves your machine:
- The database lives in a local Docker volume; MySQL binds to
127.0.0.1only. data/,*.zipand.envare gitignored, so your export can never be committed.- Test fixtures are entirely synthetic.
MIT






