
Coach Mcp
io.github.snoozelieb由 GitHub 账号 snoozelieb 发布v1.4.0更新于 Nov 7, 2026
Adaptive AI training coach MCP server backed by Garmin Connect
概览
本地 MCP 服务器,让助手基于 Garmin Connect 真实数据充当训练教练,制定受负荷与伤病规则约束的训练计划。
- 可以做什么
- 读取 Garmin 数据:体能指标、分项历史、强度、准备度、个人纪录与活动区间
- 规划训练:周计划、多周训练方案、课表预览、周期化阶段,并把结构化训练推送到手表
- 管理运动员资料:档案、FTP 与阈值配速、基线及体能历史刷新、入门引导
- 处理比赛、力量训练与伤病,包括伤病诊断与状态更新
- 保存教练记忆:决策、运动员反馈、异常处理与待批准提案
- 生成简报与签到,并提供规划、复盘与教练准则的提示词和资源
- 适用场景
- 适合已在 Garmin Connect 记录训练、希望助手依据真实历史制定计划、遵守负荷与伤病限制,并在多次对话间记住既往教练决策的耐力运动爱好者。
- 运行要求
- 通过 uvx 或 pip 本地运行(需 Python 3.12+),也可从源码运行。需要免费的 Garmin Connect 账号,并设置环境变量 GARMIN_EMAIL 与 GARMIN_PASSWORD;可选 COACH_DATA_DIR 指定数据存放位置。需要 Claude Code、Claude Desktop 或 Cursor 等 MCP 客户端,且须先用安装向导创建运动员档案,规划类工具才能使用。
安装
在 SourceWeft 中
- 打开 控制台中的 Coach Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
coach-mcp
An opinionated AI training coach as an MCP server. It pulls your real data from Garmin Connect and prescribes with authority — science-based load management (ACWR), code-enforced injury gates (the server rejects plans that violate an active injury restriction, no matter what the LLM says), and persistent coaching memory so decisions, rationale, and your adaptation patterns survive between conversations. It will tell you "no" when your enthusiasm exceeds your capacity.
All health data and credentials stay on your machine — see Security & Privacy.
Quickstart
You need Python 3.12+, a free Garmin Connect account, and an MCP client (Claude Code, Claude Desktop, or Cursor).
Option A: uvx (recommended)
No install step — your MCP client runs the server on demand:
Jump to Connect your MCP client and use uvx as
the command.
Option B: from source
Connect your MCP client
The server needs two environment variables: GARMIN_EMAIL and
GARMIN_PASSWORD. Optional: COACH_DATA_DIR (where your coaching data lives);
COACH_TOKEN_DIR, COACH_TRANSPORT and COACH_CODE_MODE are covered under
Security & Privacy and Advanced.
From a source checkout, a .env file works too.
To run the server or the helpers from a terminal, set the two variables in that shell first. PowerShell and bash quote differently:
Claude Code
Or in .mcp.json (Claude Code expands ${VAR} from your shell environment,
so a committed file holds no secret):
Running from source instead: claude mcp add coach-mcp -- python /full/path/to/coach-mcp/server.py
Claude Desktop
In claude_desktop_config.json (Settings → Developer → Edit Config):
Cursor
In .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
If you installed with pip install garmin-coach-mcp instead of uvx, use
"command": "garmin-coach-mcp" with no args in any of the blocks above.
First run
-
Create your profile. Run the interactive wizard (installed copies have the console script; a source checkout can run the script):
Until a profile exists the server runs in setup mode: plan, program and push writes answer
setup_requiredand name the data directory they looked in.It creates your athlete profile, training config, and empty plan/memory files in the data directory. Alternatively, create the two required files by hand and let the coach fill in the rest via conversation:
-
Pull your Garmin baseline. In your MCP client, say:
"Run refresh_athlete_baseline and set up my training."
The coach pulls your name, weight, age, HR data, and training capacity from Garmin, then starts the onboarding conversation — goals, constraints, injury history, race calendar.
-
Garmin MFA / expired session. Garmin logins are token-cached. If tools start returning
AUTH_REQUIRED, recover with:It does a fresh credential login, prompts for the MFA code if Garmin asks, and saves new tokens. Restart the MCP server afterwards.
How it works
- Snapshot first — every coaching conversation starts from
get_coaching_snapshot(): current time context, 7-day week grid (rest days explicit), fitness metrics, plan adherence, open anomalies, injuries, sleep gate. - Load hierarchy before prescribing — overall ACWR (injury gate, 0.8–1.3 sweet spot), then sport-specific ACWR (spike detection), then sport-specific CTL (race readiness).
- Hard gates are code, not vibes —
update_weekly_planandpush_plan_to_garminreject sessions that violate an active injury's restricted activities, and every non-rest session must carry apurposeor the save is refused. Multi-week programs (training_program) are rejected if their starting capacity contradicts your actual history. - Grounded in what you've actually done — prescriptions are anchored to
your demonstrated per-sport capacity from recent sessions, not template
numbers; a weekly plan that outruns that history comes back with
grounding_warnings. - Curiosity with memory — planned-vs-actual anomalies (missed session, type mismatch, activity on a rest day) register once with a lifecycle (open → asked → resolved); the coach asks you what happened instead of silently assuming.
- Everything persists — decisions, approvals, adaptation patterns, and season lifecycle (race debriefs, phase transitions) live in local JSON and carry across sessions.
MCP surface
52 tools — you don't call them directly; the coach uses them during conversation:
Every tool carries MCP annotations (read-only / destructive / idempotent / open-world), enforced by tests.
6 prompts: weekly_planning, morning_brief, injury_assessment,
week_review, onboarding, race_program.
6 resources: coach://athlete/profile, coach://plan/current,
coach://config/training, coach://coaching/decisions, coach://context/now,
coach://coaching/doctrine (the long-form coaching doctrine).
Security & Privacy
Everything stays on your machine:
- Credentials:
GARMIN_EMAIL/GARMIN_PASSWORDlive in your MCP client config or a local.env. Garmin OAuth tokens are cached in a local token store (.garth/in a source checkout, a per-usergarmin-tokensdirectory for installed copies; override withCOACH_TOKEN_DIR). - Health data: all coaching data (profile, plans, fitness history, sleep, coaching memory) is local JSON in your data directory. There is no backend, no telemetry, no analytics.
- What leaves your machine: requests to Garmin's own API (your credentials/tokens, sent only to Garmin); whatever your MCP client sends to its LLM as part of the conversation; optional public web-page fetches when the coach researches a race, injury, or exercise. Nothing else: the FastMCP startup banner that would check PyPI for updates is disabled.
- Single athlete per data directory by design. For multiple athletes, run
separate server instances with separate
COACH_DATA_DIRs.
See SECURITY.md for details and how to report issues.
Data directory
Resolution order: COACH_DATA_DIR env var → data/ in a source checkout → a
per-user data directory (created on first run for installed packages). The
only file shipped with the package is methodology.json (safety rules, race
templates, personas); everything personal is created locally and never
committed.
Advanced
Architecture
coach/server.py registers tools from the coach/ package (11 tool modules, pure
parsers, a typed pydantic storage layer, CTL/ATL/ACWR fitness math, a Garmin
client with token-first auth, and a workout builder that pushes structured
workouts to your watch). The project went through a five-phase modernization —
auth rebuild, schema layer, hard gates, sectioned snapshot, packaging — whose
full history and rationale live in
docs/UPGRADE_ROADMAP.md. Development conventions
are in CLAUDE.md.
Acknowledgements
All Garmin Connect access — login, MFA, token handling, activity and health data, and workout upload — runs on python-garminconnect by Ron Klinkien (@cyberjunky) and its contributors (MIT). coach-mcp wouldn't exist without it.
License
来源:README.md,提交 7fb4163
工具
0版本历史
2- v1.3.0Oct 26, 2026
- v1.0.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分