Garmin Connect Workouts Mcp

io.github.slaat由 GitHub 账号 slaat 发布v1.1.3更新于 Oct 24, 2026

Turn plain language into real workouts on your Garmin watch: pace, HR, power, intervals, swim sets.

已验证STDIO仅桌面位置与生活效率与工作流

概览

AI 生成的概览

把自然语言描述的训练课转换成 Garmin Connect 中的结构化训练,支持配速、心率、功率与游泳目标,并可管理账户中的训练。

可以做什么
  • 创建带步骤、目标和重复组的结构化训练
  • 列出并获取 Garmin Connect 账户中训练课的完整结构
  • 替换已有训练的内容或删除训练
  • 把训练安排到 Garmin Connect 日历
  • 检查已保存的 Garmin 会话,并通过浏览器登录完成认证
适用场景
适合在对话中规划训练并希望结果直接成为 Garmin 手表上可编辑的真实训练课时使用,包括间歇跑、带功率或踏频目标的骑行课以及泳池游泳组。
运行要求
通过 npx 在本地运行(需要 Node.js)。需要 Garmin Connect 账户;首次使用会打开浏览器窗口供你登录,产生的会话 Cookie 与 CSRF 令牌保存在用户配置目录中。仅支持桌面端。
安装前请注意
该服务器会写入你的 Garmin 账户:创建、更新、删除和安排训练,执行删除或改动日历前应先确认。它在磁盘上保存会话 Cookie 与 CSRF 令牌而非密码,并使用独立的浏览器配置。它属于非官方项目,依赖逆向的 Garmin 网页 API,可能失效。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Garmin Connect Workouts Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Garmin Connect Workouts MCP

[garmin-connect-workouts-mcp MCP server]

[garmin-connect-workouts-mcp MCP server]

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

bash
claude mcp add garmin-workouts npx garmin-connect-workouts-mcp

Claude Desktop

Add to your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{  "mcpServers": {    "garmin-workouts": {      "command": "npx",      "args": ["-y", "garmin-connect-workouts-mcp"]    }  }}

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

ToolDescription
create_garmin_workoutCreate a structured workout with steps, targets, and repeat blocks.
list_garmin_workoutsList workouts in the Garmin Connect account.
get_garmin_workoutFetch the full structure of one workout.
update_garmin_workoutReplace an existing workout's contents, keeping its id.
delete_garmin_workoutDelete a workout.
schedule_garmin_workoutPut a workout on the Garmin Connect calendar for a date.
check_garmin_authCheck whether the stored Garmin session still works.
authenticate_garminAuthenticate with Garmin Connect (opens a browser).

Usage Examples

  • "Create a 30 minute easy run in zone 2"
  • "10 min warmup zone 3, then 5x1km threshold intervals at 4:00/km with 2 min rest between, then 10 min cooldown zone 2"
  • "8x400m at 5k pace with 60 second recovery, then check what workouts I already have scheduled this week"
  • "Update workout 123456 to add a 5 minute cooldown, then schedule it for next Monday"
  • "Create a 25m pool swim: 200m warmup any stroke, 4x100m freestyle with 30s rest using a kickboard, 100m breaststroke cooldown"

How targets work

A stated pace is treated as the fast edge of a range: Garmin stores pace as a range, not a single point, so 4:00/km on its own becomes a 4:00-4:10/km range, widened by 10 seconds. Give both fast and slow explicitly for a narrower or different range.

Development

bash
pnpm installpnpm test          # vitest: encoders + golden-file tests against real captured payloadspnpm run build      # compile TypeScript to dist/pnpm run dev        # run the server directly with tsx

Tests validate the workout encoders (targets, durations, repeat nesting) against fixtures captured from Garmin's own web client, so payload shape regressions get caught before they reach a real account.

Disclaimer

This is an unofficial, third-party project. It is not affiliated with, endorsed by, or sponsored by Garmin Ltd. or any of its affiliates, and it talks to Garmin Connect's web API by reverse-engineering the same requests the official web client makes. It may stop working if Garmin changes that API. Use at your own risk, and at your own responsibility for the workouts and data you send to your account.

Acknowledgements

Thanks to garmin-workouts-mcp by Charles Frisbee for the original idea of driving Garmin Connect workouts through MCP.

License

MIT

来源:README.md,提交 5d72187

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分