Create structured Garmin Connect workouts (pace, HR, cadence targets, repeat blocks) from natural language — MCP server for Claude
Garmin Connect Workouts MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An MCP (Model Context Protocol) server that turns natural-language workout
descriptions into structured workouts in Garmin Connect. Describe a session
in plain English and the calling model builds a typed step-by-step workout
that this server encodes into Garmin's workout API format and creates
directly in your account.
Features
- **Pace, heart-rate, power and cadence targets** - pace ranges, HR zones 1-5,
explicit bpm ranges, cycling power, and cadence, all encoded against
Garmin's real workoutTargetType table.
- **Real repeat blocks** - 5x1km becomes a single repeat group, not five
duplicated steps, so the watch shows an actual rep counter.
- **Swim workouts** - per-step strokes (freestyle, backstroke, breaststroke,
fly, drill, individual medley, or any stroke) and equipment (fins,
kickboard, paddles, pull buoy, snorkel), plus a workout-level pool length
in meters or yards.
- **Full workout lifecycle** - create, list, get, update, delete, and
schedule workouts onto the Garmin Connect calendar.
- **Structured input, not text parsing** - the server never parses free text
itself; every duration and target is an explicit, unit-tagged field, so
there's nothing for a string like "10 min" to be silently misread as.
Quick Start
Claude Code
Claude Desktop
Add to your configuration file:
- **macOS**: ~/Library/Application Support/Claude/claude_desktop_config.json
- **Windows**: %APPDATA%\Claude\claude_desktop_config.json
Then restart Claude Desktop.
Authentication
Garmin Connect's web client authenticates with session cookies plus a CSRF
token, not a password grant this server could hold on to. So the first time
you create a workout (or whenever the session has expired):
1. The server checks the stored session with a cheap authenticated request.
2. If it's missing or rejected, run the authenticate_garmin tool. It opens
a real browser window at connect.garmin.com for you to log in normally.
3. Once login completes, the session is captured and stored at
~/.config/garmin-connect-workouts-mcp/auth.json with 600 permissions
(owner read/write only).
No password is ever stored - only the resulting session cookies and CSRF
token. Garmin sessions expire, so you may be prompted to re-authenticate
between sessions; the server detects this automatically and tells you when
to run authenticate_garmin again. The login browser uses a persistent,
isolated profile under ~/.config/garmin-connect-workouts-mcp/browser-profile/
so Garmin can remember the device across logins - it never touches your
personal browser profile.
Tools
| Tool | Description |
|---|---|
| create_garmin_workout | Create a structured workout with steps, targets, and repeat blocks. |
| list_garmin_workouts | List workouts in the Garmin Connect account. |
| get_garmin_workout | Fetch the full structure of one workout. |
| update_garmin_workout | Replace an existing workout's contents, keeping its id. |
| delete_garmin_workout | Delete a workout. |
| schedule_garmin_workout | Put a workout on the Garmin Connect calendar for a date. |