garmin-connect-mcp
Garmin Connect for Claude
用简单英语让 Claude 了解你的 Garmin 数据。
"我昨晚睡得怎么样?" "显示我过去两周的跑步记录。" "我今天恢复得足够进行高强度训练吗?" "上个月我跑了多少公里,和前一个月相比如何?"
这个工具将你的 Garmin Connect 账户连接到 Claude Desktop 应用,让 Claude 能够读取你的锻炼、睡眠、心率及其他健康数据,并与你进行讨论。
你不需要会编程就能使用它。 安装程序会问你几个问题,然后自动完成其余操作。
你需要准备什么
一台 Mac
一个关联了 Garmin 手表或设备的 Garmin Connect 账户
Related MCP server: Garmin Connect MCP Server
安装
打开 Mac 上的 终端 应用。(按 Cmd + Space,输入 Terminal,然后按回车。)
复制以下命令,粘贴到终端窗口中,然后按回车:
curl -fsSL https://raw.githubusercontent.com/jharkebusch/garmin-connect-mcp/main/install.sh | bash它会:
设置一个独立的、自包含的 Python 环境(不会影响你 Mac 自带的 Python)
询问你的 Garmin 邮箱、密码以及 Garmin 发送给你的安全码
为你配置 Claude Desktop
完成后,完全退出 Claude Desktop(按 Cmd + Q),然后重新打开。仅关闭窗口是不够的。
然后只需向 Claude 询问你的 Garmin 数据即可。
Claude 能做什么
健康与 wellness
询问内容 | 工具 |
一天概览 |
|
睡眠、阶段及睡眠评分 |
|
每日步数计数与总计 |
|
静息、低及高心率 |
|
心率变异性与恢复 |
|
全天压力水平 |
|
身体电量充电与消耗 |
|
你是否准备好进行高强度训练 |
|
VO2 max、体能年龄、训练状态 |
|
体重历史变化 |
|
锻炼与活动
询问内容 | 工具 |
一段时间内的活动 |
|
某一天的活动 |
|
单个活动的全部详情 |
|
你最近的一次活动 |
|
公里或英里分段 |
|
一段时间内的总计 |
|
个人最佳记录 |
|
你的 Garmin 设备 |
|
已保存的锻炼计划 |
|
你的训练日历 |
|
记录数据(这些操作会修改你的 Garmin 账户)
让 Claude 做 | 工具 |
记录体重 |
|
记录饮水 |
|
创建锻炼计划 |
|
将锻炼排入日历 |
|
没有任何操作可以删除你的数据。 没有工具可以移除活动、锻炼或体重记录,因此错误的请求不会破坏你的训练历史。
用自然语言表达日期
每个工具都能理解日常用语,因此你可以直接用日常语言交流:
today · yesterday · last night · 3 days ago · last 7 days ·
this week · last month · 2026-08-18 · 2026-08-01 to 2026-08-18
你的隐私与安全
你的密码绝不会被保存。 它仅在设置过程中用于登录一次,然后便被丢弃。
只存储 Garmin 的访问令牌,存放在
~/.garminconnect中,该文件只有你的用户账户可读取(权限为0600,位于0700权限的文件夹内)。除了 Garmin,不会向任何地方发送数据。 没有遥测、没有分析、也没有第三方服务器。你的数据从 Garmin 直接传输到你的 Mac,不会流向其他地方。
一切都在本地运行,在你的机器上执行。
你的 Garmin 数据只有在 Claude 将其包含在回复中时才会到达 Anthropic,这与你在 Claude 中输入的其他任何内容一样。
更新
再次运行相同的安装命令。它会在原地更新并保持你的登录状态。
如果需要重新登录
Garmin 会话会自动续期,很少过期。如果 Claude 提示你的登录已过期,请在终端中运行以下命令:
garmin-mcp-setup如果你的终端无法识别该命令,请使用完整路径:
~/.garmin-mcp/bin/garmin-mcp-setup卸载
rm -rf ~/.garmin-mcp ~/.garminconnect ~/.local/bin/garmin-mcp-setup然后从 ~/Library/Application Support/Claude/claude_desktop_config.json 的 mcpServers 部分中移除 "garmin" 条目。
故障排除
Claude 看不到 Garmin 工具。
完全退出 Claude Desktop(按 Cmd + Q)并重新打开。仅关闭窗口会让它在后台继续运行。
"你的 Garmin 账户尚未连接。"
在终端中运行 garmin-mcp-setup。
"请求过多。" Garmin 对登录尝试有速率限制。请等待大约 15 分钟。
回复中缺少某个数字。 缺少意味着你的设备没有记录该数据。某些指标(HRV、身体电量、训练准备度)需要佩戴兼容的 Garmin 手表过夜。工具会选择省略该指标,而不是猜测一个值。
对于开发者
git clone https://github.com/jharkebusch/garmin-connect-mcp.git
cd garmin-connect-mcp
uv venv --python 3.12 && VIRTUAL_ENV=.venv uv pip install -e ".[dev]"
VIRTUAL_ENV=.venv uv run pytest布局:
src/garmin_mcp/server.py— MCP 服务器与工具注册src/garmin_mcp/session.py— 已认证的 Garmin 客户端,线程卸载src/garmin_mcp/dates.py— 自然语言日期解析src/garmin_mcp/format.py— 将 Garmin JSON 精简为可读文本src/garmin_mcp/tools/— 工具本身src/garmin_mcp/setup_cli.py— 交互式登录与 Claude 配置
两个设计说明:
garminconnect是同步的,因此每个调用都被推送到工作线程。否则一个慢速的 Garmin 请求会阻塞整个服务器。登录不能在工具调用内部进行,因为 Garmin 的双因素步骤需要交互式提示。设置程序写入一个令牌文件;服务器只会读取它。
一个值得注意的注意事项
Garmin 没有发布公开 API。它通过 garminconnect 库使用与 Garmin 移动应用相同的接口。这个库工作良好,但 Garmin 随时可能更改该接口,从而暂时破坏第三方工具。如果发生这种情况,重新运行安装程序会在底层库发布修复后自动应用。
本项目与 Garmin Ltd. 无任何关联、认可或联系。请使用你自己的账户和数据。
许可协议
MIT — 详见 LICENSE。
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 Servers
- Alicense-qualityDmaintenanceThis Model Context Protocol (MCP) server connects to Garmin Connect and exposes your fitness and health data to Claude and other MCP-compatible clients.1MIT
- Alicense-qualityDmaintenanceAn MCP server that gives Claude access to your Garmin Connect fitness and health data, including steps, sleep, activities, heart rate, and more.1MIT
- AlicenseAqualityBmaintenanceA read-only MCP server that gives Claude Desktop access to your Garmin Connect data — daily health metrics, sleep, activities, training status, and body composition.6MIT
- AlicenseAqualityBmaintenanceLocal MCP server that connects Claude Desktop with Garmin and Apple Health data to read training and recovery, estimate heart rate and pace zones, analyze performance, and create structured workouts.22MIT
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.
MCP server for Withings health data — sleep, activity, heart, and body metrics.
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/jharkebusch/garmin-connect-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server