garmin-coach-mcp
Provides tools for managing Garmin coaching, including retrieving coaching snapshots, training programs, previewing and applying training weeks, and managing heart rate profile updates through Garmin Connect.
Click on "Deploy 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., "@garmin-coach-mcp Preview my training week for next week"
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.
Local Garmin Coach MCP
Private, single-user Garmin coaching tools for Codex/ChatGPT desktop and Claude. The server is local stdio only: no Cloudflare, Render, public URL, account service, or hosting cost.
The runtime is based on etweisberg/garmin-connect-mcp at commit 87d0ea059fb67f1ce65ac05100df74c3c3777c84. It keeps the upstream AGPL-3.0 license and Taxuspt attribution in NOTICE.
Prerequisites
Node.js 20 or newer
pnpm 10.14.0
A Garmin Connect account and synced watch
Related MCP server: io.github.matisdsp/fartlek
Install
cd /home/talvak/Desktop/repos/garmin-coach-mcp
pnpm install --frozen-lockfile
pnpm exec playwright install chromium
pnpm build
pnpm authpnpm auth opens a dedicated visible Chrome profile. Log in manually, complete MFA, then press Enter in the terminal. The browser session stays under ~/.local/share/garmin-coach/browser-profile. Runtime CSRF values are read from the current authenticated page and never persisted or printed. Directories are 0700, files are 0600, password saving is disabled, and no username/password file is created.
Capture Garmin's profile-write contract
Garmin does not publish a stable heart-rate profile write API. The server refuses to guess it.
pnpm capture:profile-contractThe command loads Garmin's current app model, asks it to save the unchanged current default zones, and blocks the resulting PUT before delivery. It validates the route and exact unchanged body, then stores only a redacted method/path/field shape and supported scopes in ~/.local/state/garmin-coach/profile-write-contract.json with mode 0600.
If Garmin's shape cannot be proven, no contract is saved and profile writes remain disabled.
Connect Codex and ChatGPT desktop
Build first, then copy config/codex.toml.example into ~/.codex/config.toml, or add the equivalent server through ChatGPT desktop Settings > MCP servers. Codex CLI, the IDE extension, and ChatGPT desktop share local MCP configuration on the same host.
The example uses:
default_tools_approval_mode = "writes"Both apply tools also have explicit approval_mode = "prompt". Restart the client after configuration and use /mcp to verify connection.
ChatGPT web cannot start this local stdio process. Use ChatGPT desktop/Codex for Garmin writes.
Connect Claude
Merge config/claude.json.example into Claude's MCP configuration, or run:
claude mcp add garmin-coach -- /home/talvak/snap/code/current/.local/share/pnpm/node /home/talvak/Desktop/repos/garmin-coach-mcp/dist/index.jsThe filesystem lock permits only one local client to own the Garmin Chromium profile at a time. Stop the server in one client before using the other.
Tools
Tool | Garmin write |
| No |
| No |
| No |
| Yes, approval required |
| No |
| No |
| Yes, separate approval required |
Safe workflow
Call
get_coaching_snapshotand compare it with Garmin Connect.Call
preview_hr_profile_update.Review every field and approve the exact canonical proposal/hash.
Call
apply_hr_profile_update; then sync Garmin and visually verify watch zones.Call
preview_training_weekfor one Sunday-starting week.Review its recovery evidence, complete payload, warnings, and hash.
Call
apply_training_weekwith the unchanged canonical proposal/hash.Call
verify_training_weekand confirm Monday/Friday are135-149 bpm; Friday must display fixed12%instructions.Retry both apply calls to prove idempotency.
Pain/injury or illness blocks workout writes. Recovery can keep, reduce, or skip; it never increases load. Workouts are never deleted automatically.
Garmin exposes Treadmill as a watch activity beneath Running, not as a structured-workout sport. Friday is therefore a running-compatible workout named Incline Walk 12%; start it from the watch's Treadmill activity. Its 12% incline cue and 135-149 bpm target remain explicit.
Approved HR profile
Field | Value |
Maximum HR | 189 bpm |
Resting HR | 55 bpm |
Lactate threshold HR | 181 bpm |
Basis | Heart-rate reserve/custom BPM |
Zone 1 | 122-134 bpm |
Zone 2 | 135-149 bpm |
Zone 3 | 150-162 bpm |
Zone 4 | 163-176 bpm |
Zone 5 | 177-189 bpm |
These values are provisional: age 27, resting HR 55, estimated max HR 189, and manual LTHR 181. Automatic-detection flags are preserved. Future changes require another preview and approval.
Verification
Ordinary tests are offline and never call Garmin:
pnpm test
pnpm lint
pnpm format:check
pnpm typecheck
pnpm build
git diff --checkSee spec.md for behavior and docs/architecture.md for trust boundaries.
License
Available Tools
7 toolsapply_hr_profile_updateBIdempotent
Apply one unchanged approved HR proposal through the captured Garmin browser contract, verify, and roll back on failure.
Inputs: hash (required), confirmed (required), canonicalProposal (required).
apply_training_weekCIdempotent
Create, schedule, and read back one unchanged approved week. Never deletes workouts.
Inputs: hash (required), confirmed (required), canonicalProposal (required).
get_coaching_snapshotARead-onlyIdempotent
Read a privacy-filtered coaching snapshot: recovery, sleep, HRV, Body Battery, resting HR, load, recent activities, HR profile, and freshness.
Inputs: date.
get_training_programARead-onlyIdempotent
Return the exact five build weeks and week-six deload program.
Inputs: no named parameters.
preview_hr_profile_updateARead-onlyIdempotent
Read current HR settings and return every approved before/after field, canonical proposal, and hash. Performs no Garmin writes.
Inputs: no named parameters.
preview_training_weekARead-onlyIdempotent
Read current recovery data and build a complete canonical week without writing Garmin.
Inputs: weekStart (required), weekNumber (required), illness, painOrInjury, +1 more.
verify_training_weekCRead-onlyIdempotent
Read Garmin and compare scheduled dates, managed workout steps, targets, descriptions, and IDs.
Inputs: canonicalProposal (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct operation: training week verification, coaching snapshot, training program retrieval, preview/apply for training week, and preview/apply for HR profile. No two tools overlap in purpose; boundaries are clear even from the descriptions.
All tool names follow a consistent verb_noun pattern using snake_case (e.g., verify_training_week, get_coaching_snapshot, preview_hr_profile_update). The verbs are semantically appropriate (get/preview for reads, apply for writes) and the noun phrases are uniformly structured.
Seven tools cover the core coaching workflow without unnecessary redundancy. The count is well-scoped for the domain—neither sparse nor overwhelming—and each tool serves a clear, non-trivial purpose.
The tool set covers the full lifecycle for training week management (verify, get program, preview, apply) and HR profile updates (preview, apply), plus a snapshot for overall context. No obvious gaps exist; the server's stated scope is met without dead ends.
Maintenance
Related MCP Connectors
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Related MCP Servers
- AlicenseAqualityCmaintenanceLocal 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
- AlicenseAqualityBmaintenanceAn MCP server that transforms Garmin data into compact, verdict-first coaching reports for LLMs, computing metrics like CTL/ATL/TSB and ACWR to answer training readiness questions.14Apache 2.0
- AlicenseBqualityCmaintenanceA private, read-only MCP server that gives local Codex and Claude Desktop sessions access to athletics and wellness data from a Garmin Forerunner 55. It runs locally over stdio, exposes read-only tools for daily health, recovery, performance, and workouts, and caches data in SQLite.8MIT
- AlicenseNot gradedqualityBmaintenanceA local, single-user, read-only MCP server that gives Claude Code access to your Garmin health and training data, exposing tools for health snapshots, training status, run details, body metrics, and training analysis.1MIT