livetrack-mcp
Polls Garmin LiveTrack URLs to fetch real-time athlete trackpoints and performance data during races, enabling continuous monitoring of GPS location, heart rate, power, and cadence metrics.
Supports optional OpenTelemetry integration for distributed tracing and monitoring of the tracking and analysis pipeline through environment configuration.
Stores time-series athlete performance data in a local SQLite database for persistence and historical analysis, maintaining race metrics for Claude's periodic review cycles.
Sends coaching push notifications via Telegram through MCP tools, allowing Claude to deliver real-time feedback and alerts to athletes based on performance analysis.
Click on "Install 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., "@livetrack-mcpstart tracking my triathlon with heart rate max 144 and power max 165"
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.
livetrack-mcp
Autonomous MCP server that polls Garmin LiveTrack, stores time-series in SQLite, and triggers Claude analysis every 10 minutes via claude-runner.
Architecture
Garmin LiveTrack URL
│
│ (poll every 60 s)
▼
livetrack-mcp (port 38100)
├── poller.py — fetch trackpoints from Garmin API
├── store.py — SQLite time-series persistence (/data/livetrack.db)
├── tracker.py — asyncio scheduling + race-end detection
└── analyzer.py — build prompt, call claude-runner
│
│ POST /run (fire-and-forget)
▼
claude-runner (port 38095)
│
│ claude -p <analysis prompt>
▼
Claude (sonnet)
├── analyze timeseries
├── curl POST /control if thresholds need adjustment
└── mcp__telegram__send_message → coaching pushKey design: livetrack-mcp is fully autonomous — no Claude session needs to stay alive during the race. Claude is called as a stateless analysis function every 10 minutes. If claude-runner is temporarily unavailable, the next analysis cycle retries automatically.
MCP Tools
Tool | Description |
| Start polling a LiveTrack share URL |
| Stop polling (also auto-stops at race end) |
| Active state, elapsed time, stale time, poll errors |
| Recent data from SQLite |
| Update HR/power thresholds mid-race |
| Manual on-demand analysis, bypassing schedule |
Custom HTTP Endpoints
Endpoint | Method | Description |
| POST | Update thresholds mid-race (called by Claude via curl in Bash tool) |
| GET | Health check — tracking state + store stats |
/control usage (from Claude's analysis prompt)
curl -sf -X POST http://localhost:38100/control \
-H 'Content-Type: application/json' \
-d '{"power_max": 150}'Allowed fields: hr_max, hr_min, power_max, power_min, cadence_min, run_hr_max, run_hr_min, run_cadence_min
race_config Fields
Field | Type | Default | Description |
| int | — | Cycling HR ceiling (bpm) |
| int | — | Cycling HR floor |
| int | — | ERG power ceiling (watts) |
| int | — | ERG power floor |
| int | — | Minimum cycling cadence (rpm) |
| int | — | Run HR ceiling |
| int | — | Run HR floor |
| int | — | Minimum run cadence (spm) |
| int | 60 | How often to poll LiveTrack |
| int | 600 | How often to trigger Claude analysis |
| int | 10 | Data window passed to Claude (minutes) |
Example race_config for a full triathlon
{
"race_name": "CT2026",
"race_type": "triathlon",
"hr_max": 144,
"hr_min": 115,
"power_max": 165,
"cadence_min": 82,
"run_hr_max": 152,
"run_hr_min": 125,
"run_cadence_min": 165,
"poll_interval_secs": 60,
"analyze_interval_secs": 600,
"analyze_window_min": 10
}Race-End Detection
The server auto-stops when:
No new trackpoints for ≥ 15 minutes (
STALE_STOP_MIN)AND total elapsed time ≥ 30 minutes (
MIN_ELAPSED_MIN)
This handles the Garmin 24-hour URL delay: the URL remains valid after the race, but new trackpoints stop arriving when the athlete finishes. The 30-minute minimum prevents false stops at the start when GPS data is sparse.
Configuration (Environment Variables)
Variable | Default | Description |
|
| Server port |
|
| Bind address |
|
| MCP endpoint path |
|
| SQLite database path |
|
| claude-runner base URL |
|
| Workspace for claude-runner tasks |
|
| Logging level |
| — | OpenTelemetry collector URL (optional) |
Deployment
cd ~/ai-platform/mcps
# Build and start
docker compose up -d --build livetrack-mcp
# Logs
docker compose logs -f livetrack-mcp
# Restart
docker compose restart livetrack-mcp
# Health check
curl http://localhost:38100/healthTypical Session (via Claude in training workspace)
# Start tracking
use_mcp_tool livetrack-mcp start_tracking \
url="https://livetrack.garmin.com/session/.../token/..." \
race_config={"hr_max": 144, "power_max": 165, "run_hr_max": 152}
# Check status
use_mcp_tool livetrack-mcp get_tracking_status
# Manual analysis trigger
use_mcp_tool livetrack-mcp trigger_analysis
# Stop (or let it auto-stop)
use_mcp_tool livetrack-mcp stop_trackingProject Structure
livetrack_mcp/
├── Dockerfile
├── pyproject.toml
├── README.md
└── src/livetrack_mcp/
├── __init__.py
├── __main__.py
├── otel.py # OpenTelemetry setup
├── poller.py # Garmin LiveTrack URL parsing + HTTP fetch
├── store.py # SQLite time-series (sqlite3 + asyncio.to_thread)
├── tracker.py # Scheduling (asyncio.create_task) + race-end detection
├── analyzer.py # Prompt builder + claude-runner caller
└── server.py # FastMCP tools + /control + /healthThis server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aviman1109/livetrack_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server