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=...值——下一步设置密钥时需要用到。
部署到 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 自动设置) |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
List, fetch, create, edit (replace), delete and schedule structured workouts on Garmin Connect (runn
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/knahsirV/garmin-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server