garmin-mcp
garmin-mcp
一个注重隐私的 Garmin Connect MCP 服务器,专为铁人三项训练打造。~47 个工具涵盖日常健康指标、活动分析、训练负荷、跑步、骑行、游泳、力量训练和训练创建——外加铁人三项专项分析(砖式训练、运动量平衡、跨运动体能快照)。
作为远程 MCP 服务器通过 HTTPS 部署。通过 streamable-HTTP 传输连接到 Claude Desktop 或 Claude Code。
一次性认证设置
在本地运行一次以生成令牌:
在本地安装:
pip install -e .使用 Garmin 进行身份验证:
garmin-mcp-auth将令牌保存到
~/.garminconnect/garmin_tokens.json,并打印 base64 导出命令。复制打印的
GARMIN_TOKENS_JSON=...值——下一步设置密钥时需要用到。
Related MCP server: Strava MCP
部署到 Fly.io
前提条件:已安装并认证 flyctl(flyctl auth login)。
注册应用名称(仅首次):
flyctl apps create garmin-mcp如果
garmin-mcp在 Fly.io(全局命名空间)上已被占用,请使用唯一名称,如garmin-mcp-yourname,并更新fly.toml中的app字段以匹配。设置密钥:
flyctl secrets set \ GARMIN_EMAIL=you@example.com \ GARMIN_TOKENS_JSON=<base64-from-auth-step> \ MCP_AUTH_TOKEN=$(openssl rand -hex 32)保存生成的
MCP_AUTH_TOKEN值——配置 Claude Desktop 时需要用到。部署:
flyctl deploy验证:
curl https://garmlink.fly.dev/health预期输出:
{"status":"ok"}
通过 GitHub Actions 自动部署
首次手动部署后,后续推送到 main 分支将通过 GitHub Actions 自动部署。
将 FLY_API_TOKEN 添加到你的 GitHub 仓库密钥中:
flyctl tokens create deploy复制输出,然后前往:GitHub 仓库 → Settings → Secrets and variables → Actions → New repository secret → 将其命名为 FLY_API_TOKEN。
Claude Desktop 配置
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"garmin": {
"url": "https://garmlink.fly.dev/mcp",
"headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
}
}
}将 <MCP_AUTH_TOKEN> 替换为你在密钥步骤中设置的值。
教练技能
在 Claude Code 中从该项目目录运行以下斜杠命令:
Command | Purpose |
| 每日准备情况简报(HRV、睡眠、身体电量) |
| 每周训练负荷与运动平衡回顾 |
| 赛前全项目体能评估 |
| 引导式结构化训练创建器 → 推送到 Garmin |
环境变量
Variable | Description |
| 你的 Garmin Connect 邮箱 |
| Base64 编码的令牌文件(来自 |
| 保护 MCP 端点的 Bearer 令牌 |
| 服务器端口(默认:8000,由 Fly.io 自动设置) |
Related MCP Connectors
Your swim, run and ride training, explained. For coaches and athletes, computed from Garmin data.
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).
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
AI coach for Garmin: builds training plans and structured workouts, synced straight to your watch.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that connects Garmin Connect data to Claude, enabling training analysis, recovery checks, and personalized plans based on real metrics like HRV, training load, and activities.21MIT
- AlicenseBqualityBmaintenancePrivacy-first MCP server for Strava activities, streams, routes and training data.29295 npm3MIT
- AlicenseAqualityBmaintenanceLocal-first Garmin data warehouse with an analysis-grade MCP server. Sync once, analyze forever, even when the API is down.1396 PyPI9MIT
- AlicenseAqualityDmaintenanceUnofficial MCP server bridging Garmin Connect to MCP clients and ChatGPT, providing tools to access health data, activities, and trends via a self-hosted API.11MIT