garmin-mcp
Personal Garmin MCP
Garmin Connectで構造化ワークアウトを作成・スケジュールするためのローカルMCPサーバーです。非公式のGarminエンドポイントを使用します。
これは実験的な個人プロジェクトです。Garminは事前の通知なしにエンドポイントを変更したり、リクエストをレート制限したり、セッションを失効させたりする場合があります。別途認証を追加せずにサーバーをインターネットに公開しないでください。
機能
保存済みのGarminセッションを検証します;
変更を加えずにGarmin JSONをプレビューします;
ワークアウトを作成し、オプションでカレンダーに追加します;
ワークアウトライブラリとカレンダーを一覧表示します;
完了したアクティビティ、コンパクトなサマリー、ラップ/スプリット指標を読み取ります;
利用可能な睡眠、HRV、Body Battery、トレーニングレディネス、トレーニングステータスを読み取ります;
ワークアウトを削除し、カレンダーからワークアウトを削除します;
ランニング、サイクリング、ウォーキング、ハイキングに対応します;
時間、距離、
lap buttonステップに対応します;インターバルリピートに対応します;
ペース、心拍数、パワー、ケイデンスのターゲットに対応します;
すべての変更に
confirm=trueが必要です。
Related MCP server: Garmin Connect MCP
インストール
Docker Compose — 推奨
ローカルでの使用には、Compose対応のDockerが必要です。リポジトリのルートからイメージをビルドします:
docker compose buildビルドでは、Pythonの依存関係をuvを使用してuv.lockからのみ厳密にインストールします。
対話型ログインを一度実行します。パスワードとMFAコードはコンテナ内で直接入力され、保存されません。OAuthトークンはプライベートなgarmin-mcp_garmin_tokens名前付きボリュームに保存されます:
docker compose --profile login run --rm garmin-loginMCPサーバーを起動します:
docker compose up -d garmin-mcp
docker compose psエンドポイントはhttp://127.0.0.1:8000/mcpで利用できます。別のローカルポートを使用する場合:
GARMIN_MCP_PORT=8765 docker compose up -d garmin-mcpログを表示するか、サーバーを停止します:
docker compose logs -f garmin-mcp
docker compose downdocker compose downはGarminトークンを保持します。docker compose down -vを実行すると、ボリュームとそのトークンが削除されます。
Dockerを使用しないローカルインストール
Python 3.12+とuvが必要です。
cd /path/to/garmin-mcp
uv sync --extra devワンタイムログイン
uv run garmin-mcp-loginスクリプトは、必要な場合に対話形式でメールアドレス、パスワード、MFAコードを要求します。パスワードは保存されません。OAuthトークンは制限された権限で.garmin-tokens/garmin_tokens.jsonに保存されます。このディレクトリは.gitignoreにすでに含まれています。
トークンを別の場所に保存する場合:
export GARMIN_TOKEN_DIR=/safe/private/path/garmin-tokens
uv run garmin-mcp-loginstdio経由のローカルMCP
export GARMIN_TOKEN_DIR=/safe/private/path/garmin-tokens
uv run garmin-mcpMCPクライアント設定の例:
{
"mcpServers": {
"garmin": {
"command": "/absolute/path/to/garmin-mcp/.venv/bin/garmin-mcp",
"env": {
"GARMIN_TOKEN_DIR": "/safe/private/path/garmin-tokens"
}
}
}
}ChatGPT用のStreamable HTTP
export GARMIN_MCP_TRANSPORT=streamable-http
export GARMIN_MCP_HOST=127.0.0.1
export GARMIN_MCP_PORT=8000
export GARMIN_TOKEN_DIR=/safe/private/path/garmin-tokens
uv run garmin-mcpエンドポイント:http://127.0.0.1:8000/mcp。
ChatGPTはHTTPS経由でエンドポイントに到達できる必要があります。個人でのテストには、保護されたトンネルを使用できます。このMVPをインターネットに直接公開しないでください。これは意図的に、MCPサーバー自体へのアクセス用の独立したOAuthリソースサーバーを含んでいません。
preview_workout引数の例
{
"workout": {
"name": "6 x 800",
"sport": "running",
"description": "Controlled intervals",
"blocks": [
{
"steps": [
{
"step_type": "warmup",
"duration_type": "time",
"duration_value": 900
}
]
},
{
"repeat": 6,
"steps": [
{
"step_type": "interval",
"duration_type": "distance",
"duration_value": 800,
"target_type": "pace_seconds_per_km",
"target_low": 250,
"target_high": 260
},
{
"step_type": "recovery",
"duration_type": "time",
"duration_value": 120
}
]
},
{
"steps": [
{
"step_type": "cooldown",
"duration_type": "time",
"duration_value": 600
}
]
}
]
}
}ペース値は1キロメートルあたりの秒数で指定します:250 = 4:10/km、260 = 4:20/km。サーバーはこれらをGarmin Connectが使用するm/sの値に変換します。
プレビュー後、同じオブジェクト、YYYY-MM-DD形式の日付、およびconfirm=trueを指定してcreate_workoutを呼び出します。
読み取り専用のトレーニングコンテキスト
サーバーは、完了したトレーニングに基づいて将来のプランを調整するための、コンパクトな読み取り専用ツールを提供します:
list_activitiesは、両端を含む日付範囲内のアクティビティを、オプションのGarminアクティビティタイプフィルター付きで一覧表示します;get_activity_summaryは、1つのアクティビティのプランニング指標を返します;get_activity_splitsは、コンパクトなラップとインターバルの指標を返します;get_recovery_statusは、1つの日付について利用可能な睡眠、HRV、Body Battery、トレーニングレディネス、トレーニングステータスを集約します。
アクティビティの応答は、意図的にGPS座標と所有者の詳細を省略しています。回復指標はGarminデバイス、アカウント、日付によって異なります。欠落しているソースは利用不可として返され、回復リクエスト全体を失敗させることはありません。
チェック
uv run --extra dev pytest
uv run --extra dev ruff check .ユニットテストはGarminに接触せず、認証情報を必要としません。
重要な制限事項
これは公式のGarminトレーニングAPIではありません。
頻繁なログインではHTTP 429応答を受け取る場合があります。保存済みのトークンを再利用してください。
トークンはGarmin Connectへのアクセスを提供するため、パスワードと同様に保護する必要があります。
作成は成功したがスケジュールに失敗した場合、ツールは
created_not_scheduledとworkout_idを返します。作成されたワークアウトはライブラリに残ります。定期的に使用する前に、Garmin Connectと対象のウォッチモデルで簡単なワークアウトを1つテストしてください。
Available Tools
11 toolsconnection_statusARead-onlyIdempotent
Verify that saved Garmin tokens can authenticate.
Inputs: no named parameters. Returns: object
create_workoutA
Create a Garmin workout and optionally schedule it on YYYY-MM-DD.
Call with confirm=false for a non-mutating confirmation response. Set confirm=true only after the user explicitly approves the preview and date.
Inputs: workout (required), confirm, schedule_date. Returns: object
delete_workoutADestructiveIdempotent
Permanently delete a workout template after explicit confirmation.
Inputs: workout_id (required), confirm. Returns: object
get_activity_splitsARead-onlyIdempotent
Get compact lap and interval metrics for one completed Garmin activity.
Inputs: activity_id (required). Returns: object
get_activity_summaryARead-onlyIdempotent
Get compact summary metrics for one completed Garmin activity.
Inputs: activity_id (required). Returns: object
get_recovery_statusARead-onlyIdempotent
Get available sleep, HRV, Body Battery, readiness, and training status for a date.
Inputs: date (required). Returns: object
list_activitiesARead-onlyIdempotent
List completed Garmin activities in an inclusive YYYY-MM-DD date range.
Returns compact planning metrics and omits GPS coordinates and owner details.
activity_type is an optional Garmin type key such as running or cycling.
Inputs: start_date (required), limit, end_date, activity_type. Returns: object
list_scheduled_workoutsBRead-onlyIdempotent
List Garmin calendar entries for a year and month.
Inputs: year (required), month (required). Returns: object
list_workoutsARead-onlyIdempotent
List workout templates from the user's Garmin Connect library.
Inputs: limit. Returns: result
preview_workoutARead-onlyIdempotent
Validate and preview Garmin JSON without changing Garmin Connect.
Inputs: workout (required). Returns: object
unschedule_workoutADestructiveIdempotent
Remove a scheduled workout from the calendar without deleting its template.
Inputs: scheduled_workout_id (required), confirm. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The tools are generally distinct: connection_status, preview_workout, list/workout types, get_activity_summary vs splits, recovery, and create/delete/unschedule. There is slight overlap between list_workouts and list_scheduled_workouts, but descriptions clarify that one is templates and the other is calendar entries. The naming also helps distinguish them.
All tools follow a consistent verb_noun pattern: connection_status, preview_workout, list_workouts, list_scheduled_workouts, list_activities, get_activity_summary, get_activity_splits, get_recovery_status, create_workout, delete_workout, unschedule_workout. The pattern is uniform and predictable.
With 11 tools, the server covers a reasonable scope for a Garmin integration: connection check, workout preview/CRUD, activity listing/retrieval, and recovery status. Each tool serves a distinct function, and the count is within the typical range for a domain-specific server.
The surface appears complete for common Garmin workflows: managing workouts (create, delete, unschedule), viewing activities (list, summary, splits), checking recovery, and verifying connection. It includes both list and get operations, plus scheduling. There is a minor gap for updating workouts, but that may be acceptable given the preview/confirm workflow. Overall, it covers the primary user needs.
Maintenance
Related MCP Connectors
Garmin Connect MCP server for ChatGPT, Claude and any AI agent: list activities, download FIT file, read sleep and HRV, get training status, create workout and schedule workout in your own Garmin Connect account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Garmin Connect yourself; Cotlet does not store your password and you need no Garmin Connect API key. About the official Garmin Connect API: Yes, in part (checked 27 Oct 2026). Garmin reopened its Connect Developer Program on 21 Oct 2026. Setup and FAQ: https://cotlet.dev/integrations/garmin-api-mcp-server
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
List, fetch, create, edit (replace), delete and schedule structured workouts on Garmin Connect (runn
MCP server for Withings health data — sleep, activity, heart, and body metrics.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePersonal MCP server for interacting with your Garmin Connect data. Exposes 62 tools across 11 domains including activities, health, training, and workouts.1MIT
- AlicenseBqualityCmaintenanceExposes personal Garmin Connect data to MCP-capable clients like Claude and Gemini. Enables querying daily stats, heart rate, sleep, activities, and managing workouts.16MIT
- AlicenseAqualityDmaintenanceMCP server for reading and querying Garmin Connect data, including activities, strength history, recovery, trends, and optionally creating workouts.12MIT
- FlicenseAqualityDmaintenanceProvides read-only access to your Garmin Connect health data, including sleep, HRV, body battery, stress, training readiness, and activities, through an MCP server.14-