livetrack-mcp
livetrack-mcp
Garmin LiveTrackをポーリングし、時系列データをSQLiteに保存し、claude-runnerを介して10分ごとにClaude分析をトリガーする自律型MCPサーバー。
アーキテクチャ
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 push主要な設計: livetrack-mcpは完全に自律的です。レース中にClaudeのセッションを維持する必要はありません。Claudeは10分ごとにステートレスな分析関数として呼び出されます。claude-runnerが一時的に利用できない場合、次の分析サイクルで自動的に再試行されます。
Related MCP server: Garmin-Strava-mcp
MCPツール
ツール | 説明 |
| LiveTrack共有URLのポーリングを開始 |
| ポーリングを停止(レース終了時にも自動停止) |
| アクティブ状態、経過時間、スタール時間、ポーリングエラー |
| SQLiteからの最近のデータ |
| レース中にHR/パワーのしきい値を更新 |
| スケジュールをバイパスして手動で分析をトリガー |
カスタムHTTPエンドポイント
エンドポイント | メソッド | 説明 |
| POST | レース中にしきい値を更新(Bashツールのcurl経由でClaudeが呼び出し) |
| GET | ヘルスチェック — トラッキング状態 + ストア統計 |
/control の使用方法(Claudeの分析プロンプトから)
curl -sf -X POST http://localhost:38100/control \
-H 'Content-Type: application/json' \
-d '{"power_max": 150}'許可されるフィールド: hr_max, hr_min, power_max, power_min, cadence_min, run_hr_max, run_hr_min, run_cadence_min
race_config フィールド
フィールド | 型 | デフォルト | 説明 |
| int | — | サイクリングHR上限 (bpm) |
| int | — | サイクリングHR下限 |
| int | — | ERGパワー上限 (watts) |
| int | — | ERGパワー下限 |
| int | — | 最低サイクリングケイデンス (rpm) |
| int | — | ランニングHR上限 |
| int | — | ランニングHR下限 |
| int | — | 最低ランニングケイデンス (spm) |
| int | 60 | LiveTrackをポーリングする頻度 |
| int | 600 | Claude分析をトリガーする頻度 |
| int | 10 | Claudeに渡されるデータウィンドウ(分) |
トライアスロンのフルレース用 race_config の例
{
"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
}レース終了検知
サーバーは以下の場合に自動停止します:
15分以上新しいトラックポイントがない場合 (
STALE_STOP_MIN)かつ、合計経過時間が30分以上の場合 (
MIN_ELAPSED_MIN)
これはGarminの24時間URL遅延を処理するためのものです。URLはレース後も有効ですが、アスリートが終了すると新しいトラックポイントの到着が止まります。30分という最小時間は、GPSデータが少ない開始時の誤停止を防ぎます。
設定(環境変数)
変数 | デフォルト | 説明 |
|
| サーバーポート |
|
| バインドアドレス |
|
| MCPエンドポイントパス |
|
| SQLiteデータベースパス |
|
| claude-runnerベースURL |
|
| claude-runnerタスク用ワークスペース |
|
| ログレベル |
| — | OpenTelemetryコレクターURL(オプション) |
デプロイメント
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/health一般的なセッション(トレーニングワークスペースのClaude経由)
# 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_trackingプロジェクト構造
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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceMCP server that connects Garmin Connect data to Claude, enabling training analysis, recovery checks, and personalized plans based on real metrics like HRV, training load, and activities.12MIT
- Flicense-qualityBmaintenanceMCP server that gives Claude access to real-time Garmin Connect and Strava data for analyzing training and suggesting sessions.
- Alicense-qualityCmaintenanceSelf-hosted MCP server that exposes 90+ Garmin Connect tools to Claude and includes a live triathlon dashboard.MIT
- AlicenseAqualityBmaintenanceLocal MCP server that connects Claude Desktop with Garmin and Apple Health data to read training and recovery, estimate heart rate and pace zones, analyze performance, and create structured workouts.22MIT
Related MCP Connectors
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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