Skip to content

Repository files navigation

MTGA Tracker

Track your Magic: The Gathering Arena games — entirely on your machine.

A real-time tracker that tails Arena's Player.log, a SQLite analytics store, and a full React dashboard. No account, no cloud, no uploads: your games, your data, your disk.

License: AGPL-3.0 Python 3.9+ Platforms

Performance Overview dashboard

What it does

Live tracking. A menu-bar app (macOS) or console tracker follows your game in real time: casts, draws, lands, combat, life totals, stack resolution — with a readable play-by-play log and a full per-game timeline saved for later.

Deck analytics. Every deck gets a drill-down page: card performance, mulligan results, decklist version history with diffs, land statistics with flood/screw classification, win & loss streaks, Bo3 sideboarding records, and your record against every opponent color combination.

Game forensics. Each game page reconstructs the match: opening hand and every mulligan (including the card you bottomed), drawn cards, draw-quality analysis with statistically-grounded flood/screw detection, a life-total chart, combat summaries, and the complete event timeline.

Opponent intelligence. Revealed cards identify the opponent's colors, named with community archetype names (Dimir, Jeskai, Mono-Red…), tracked across your history so you can see which matchups actually beat you.

The long game. Win-rate trends, ranked ladder progress by season, session habits and fatigue splits, format breakdowns, and a database health audit that can repair its own inconsistencies. A compressed raw-payload archive means new tracker features can retroactively backfill your old games.

Screenshots

Deck drill-down — combat profile, streaks, decklist performance, land statistics:

Deck detail page

Game forensics — turn timing, draw quality, combat & resources, life chart, full timeline:

Game detail page

Quick start

Install the app (recommended): grab the installer for your OS from the Releases page, or build it yourself —

# macOS app / DMG
scripts/build_macos_app.sh          # dist/MTGA Tracker.app
scripts/build_macos_installer.sh    # dist/MTGA-Tracker.dmg
# Windows exe / zip
powershell -ExecutionPolicy Bypass -File scripts\build_windows_app.ps1

Or run from source:

python3 -m venv venv && source venv/bin/activate
pip install -e '.[dev,gui]'
mtga-tracker-app        # tracker + live log window + dashboard, one command

See QUICKSTART.md for the full walkthrough, including the Gatekeeper/SmartScreen note for unsigned alpha builds.

The dashboard

mtga-tracker-app serves and opens it automatically; standalone:

cd ui && npm install && npm run build && cd ..
venv/bin/python -m mtga_tracker.dashboard        # http://127.0.0.1:8765
Route What you get
#/ Overview: metrics, best deck, trends, ranked progress, recent games, decks, opponent meta
#/deck/<name> Deck drill-down: cards, mulligans, versions, land stats, streaks, vs-colors
#/game/<id> Game detail: draw quality, life chart, hands, timeline, notes
#/card/<name> Card drill-down: by-deck performance, repeat draws, opener impact
#/games Every tracked game, filterable (deck, format, opponent colors)
#/audit Database health findings

JSON API: GET /api/snapshot, /api/deck, /api/game, /api/card, /api/cards?q=, /api/games, /api/version — the dashboard is read-only except POST /api/game/annotation (your per-game notes and tags).

Port busy? --port 8766. Lost the terminal? lsof -ti tcp:8765 | xargs kill.

Command-line tools

Command Purpose
mtga-tracker Console tracker only
mtga-tracker-app --no-gui Tracker + dashboard without the menu bar
python -m mtga_tracker.db_audit [--repair] Database consistency audit / safe self-repair
python -m mtga_tracker.draw_quality --card "Llanowar Elves" Draw-quality & flood/screw report
python -m mtga_tracker.payload_dump <game_id> Print a game's archived raw payloads as JSON

Ready-made SQL reports live in data/_queries/:

sqlite3 data/mtga_tracker.sqlite3 < data/_queries/WinRateByDeck.sql

Data & privacy

Everything is local SQLite. Stored logs are scrubbed of tokens and personal paths before persistence. The only network traffic is your browser fetching Scryfall card art; card identification uses Arena's own local card database (Raw_CardDatabase_*.mtga, discovered automatically under the Steam/Epic install, override with MTGA_DATA_DIR).

Where things live:

  • Arena log — ~/Library/Logs/Wizards Of The Coast/MTGA/Player.log (macOS), %APPDATA%\LocalLow\Wizards Of The Coast\MTGA\Player.log (Windows)
  • Source runs — data/mtga_tracker.sqlite3 and data/settings.json
  • Installed builds — ~/Library/Application Support/MTGA Tracker (macOS), %LOCALAPPDATA%\MTGA Tracker (Windows), fully independent of the repo

Don't run the source and installed trackers at the same time, and never copy a live database while a tracker owns it — use SQLite's backup API for migrations.

Development

pip install -e '.[dev,gui]'

# Python suite (menu app tests need a display)
venv/bin/python -m pytest tests -q --ignore=tests/test_menu_app.py \
  --deselect "tests/test_log_parser.py::test_find_log_path_error_handling"

# Frontend: tests, types, lint, build (dashboard serves ui/dist — rebuild after UI changes)
cd ui && npx vitest run && npx tsc -b && npm run lint && npm run build

# UI development with hot reload (API + Vite side by side)
venv/bin/python -m mtga_tracker.dashboard
cd ui && npm run dev

Layout: src/mtga_tracker/ (tracker mixins, analytics store, dashboard server), ui/ (React/TypeScript dashboard), tests/, packaging/ + scripts/ (PyInstaller builds), docs/. Working on it with an AI agent? Start with AGENTS.md — it's kept current on purpose.

Documentation

License

Copyright (C) 2026 Travis Patton

Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later) — see LICENSE. You may use, modify, and redistribute this software, but any distributed or network-hosted derivative must also publish its source under the same license. For commercial licensing outside these terms, contact the author.

MTGA Tracker is unofficial Fan Content. Not approved/endorsed by Wizards of the Coast. Magic: The Gathering and its logos are trademarks of Wizards of the Coast LLC.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages