经 AI Skill Hub 精选评估,Garmin MCP工具 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
Garmin MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Garmin MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/Taxuspt/garmin_mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"garmin-mcp--": {
"command": "npx",
"args": ["-y", "garmin_mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Garmin MCP工具 执行以下任务... Claude: [自动调用 Garmin MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"garmin_mcp__": {
"command": "npx",
"args": ["-y", "garmin_mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
docker volume rm garmin_mcp_garmin-tokens ```
To use the Dockerized MCP server with Claude Desktop, you can configure it to communicate with the container. However, note that MCP servers typically communicate via stdio, which works best with direct process execution. For Docker-based deployments, consider using the standard uvx method shown in the With Claude Desktop section instead.
uv run pytest tests/e2e/ -m e2e -v ```
The easiest way to add this server to Claude Desktop is via the .dxt Desktop Extension file — no JSON editing required.
garmin-mcp.dxt from the Releases page..dxt file into the Claude Desktop window, or double-click it, or go to Settings → Extensions → Install Extension and select the file.bash scripts/build_dxt.sh # produces garmin-mcp.dxt in the repo root
---
uvx --python 3.12 --from git+https://github.com/Taxuspt/garmin_mcp garmin-mcp-auth
uv sync
Docker provides an isolated and consistent environment for running the MCP server.
.env file with your credentials:echo "GARMIN_EMAIL=your_email@example.com" > .env
echo "GARMIN_PASSWORD=your_password" >> .env
docker compose up -d
docker compose logs -f garmin-mcp
```bash
docker build -t garmin-mcp .
If you are working from a local checkout or fork:
uv tool install --python 3.12 --force C:\Users\aresd\Desktop\programacion\garmin_mcp
create_walk_run_workout(name="W3 Mié 2:2", run_seconds=120, walk_seconds=120,
repeats=9, warmup_min=10, cooldown_min=8)
→ workout_id = 1560092011
schedule_workout(workout_id=1560092011, date="2026-05-06")
→ OK
After syncing your watch, the workout appears on the Forerunner 965 calendar.
The easiest way to use this MCP server with Claude Desktop, Codex, or another MCP client is to authenticate once before adding the server to your configuration.
Before adding the server to your MCP client, authenticate once in your terminal:
```bash
Once connected in Claude, you can ask questions like:
Your Garmin Connect credentials are read from environment variables:
GARMIN_EMAIL: Your Garmin Connect email addressGARMIN_EMAIL_FILE: Path to a file containing your Garmin Connect email addressGARMIN_PASSWORD: Your Garmin Connect passwordGARMIN_PASSWORD_FILE: Path to a file containing your Garmin Connect passwordGARMIN_IS_CN: Set to true to use Garmin Connect China (garmin.cn) instead of the international version (default: false)File-based secrets are useful in certain environments, such as inside a Docker container. Note that you cannot set both GARMIN_EMAIL and GARMIN_EMAIL_FILE, similarly you cannot set both GARMIN_PASSWORD and GARMIN_PASSWORD_FILE.
GARMIN_EMAIL=you@example.com GARMIN_PASSWORD=secret garmin-mcp-auth
After initial authentication, configure Claude Desktop **without** credentials (tokens are already saved):
json { "mcpServers": { "garmin": { "command": "uvx", "args": [ "--python", "3.12", "--from", "git+https://github.com/Taxuspt/garmin_mcp", "garmin-mcp" ] } } }
#### Using Docker with MFA
If using Docker, follow the [Handling MFA with Docker](#handling-mfa-with-docker) section above for a streamlined experience with persistent token storage.
#### Troubleshooting MFA
**Error: "MFA authentication required but no interactive terminal available"**
Solution:
1. Open terminal
2. Run: `garmin-mcp-auth`
3. Enter credentials and MFA code
4. Restart Claude Desktop
**Token Expired**
OAuth tokens expire periodically (approximately every 6 months). Re-authenticate:bash garmin-mcp-auth --force-reauth
**Verify Tokens Work**bash garmin-mcp-auth --verify ```
Some endpoints are not implemented due to performance or complexity considerations:
High Data Volume: - get_activity_details() - Returns large GPS tracks and chart data (50KB-500KB). Use get_activity() for summaries instead.
Specialized Workout Formats: - upload_running_workout(), upload_cycling_workout(), upload_swimming_workout() - Sport-specific workout uploads. Use upload_workout() for general workouts.
Maintenance & Destructive Operations: - delete_activity(), delete_blood_pressure() - Destructive operations require careful consideration. - Internal/Auth methods: login(), resume_login(), connectapi(), download() - Handled automatically by the library.
If you need any of these endpoints, please open an issue.
garmin-mcp-auth --is-cn
For Claude Desktop, add `GARMIN_IS_CN` to the `env` section:
json { "mcpServers": { "garmin": { "command": "uvx", "args": [ "--python", "3.12", "--from", "git+https://github.com/Taxuspt/garmin_mcp", "garmin-mcp" ], "env": { "GARMIN_IS_CN": "true" } } } } ```
For Docker, add GARMIN_IS_CN=true to your .env file or uncomment it in docker-compose.yml.
uv run pytest tests/integration/
uv run pytest tests/integration/test_health_wellness_tools.py -v
garmin_mcp 是一个基于 MCP 协议的连接器,旨在将您的 Garmin Connect 数据无缝集成到 AI 助手(如 Claude)中。通过该项目,您可以利用 AI 的自然语言处理能力,直接查询、分析和管理您的 Garmin 健康与运动数据,实现从数据读取到训练计划生成的智能化体验。
本项目提供了丰富的 Garmin 数据访问能力。您可以分页查看近期运动活动并获取详细信息;管理运动名称;实时访问步数、心率、睡眠、压力及呼吸频率等健康指标;查看身体成分数据;追踪训练状态(Training Readiness)以及骑行 FTP 和乳酸阈值;此外,还支持管理运动装备、查看并执行详细的训练计划(Workouts)及其步骤。
运行本项目需要 Python 3.12+ 环境。若使用 Docker 部署,请确保 Docker 环境配置正确。在进行端到端测试(e2e tests)时,需要准备真实的 Garmin 账号凭据。此外,如果您的账号启用了多因素认证(MFA),请在配置过程中做好相应准备。若需清理旧的 Docker 数据卷,可以使用 `docker volume rm` 命令。
对于 Claude Desktop 用户,推荐使用最简单的“一键安装”方式:从 Releases 页面下载最新的 `.dxt` 扩展文件,直接拖入 Claude Desktop 窗口或通过 Settings → Extensions 进行安装,无需手动编辑 JSON。如果您希望自行构建,可以使用 `scripts/build_dxt.sh` 脚本生成文件。对于开发者,也可以通过 `uvx` 直接运行相关命令进行部署。
在 Claude Desktop 或其他支持 MCP 的客户端(如 Codex)中配置完成后,您可以直接使用自然语言进行交互。例如,您可以询问“我昨晚的睡眠质量如何?”或“分析我最近一次骑行的功率区间”。对于高级用户,您甚至可以通过 AI 生成特定的训练计划(如 walk/run 间歇训练),并通过指令将其同步到您的 Garmin 设备(如 Forerunner 965)日历中。
项目通过环境变量进行身份验证配置。您可以通过设置 `GARMIN_EMAIL` 和 `GARMIN_PASSWORD` 环境变量,或者指定包含凭据的文件路径(`GARMIN_EMAIL_FILE` / `GARMIN_PASSWORD_FILE`)来提供 Garmin Connect 账号信息。特别注意,若您的账号属于中国区,请务必在配置的 `env` 部分添加 `GARMIN_IS_CN: "true"` 以确保连接正常。
目前部分高数据量的 API 接口(如返回大型 GPS 轨迹和图表的 `get_activity_details`)因性能考虑暂未完全开放,建议优先使用 `get_activity` 获取摘要信息。此外,部分复杂的特定格式训练计划上传接口(如 `upload_running_workout`)也处于逐步完善中。开发者可以根据需求选择最合适的接口进行数据调用。
本项目内置了完善的测试工作流。开发者可以使用 `uv run pytest` 运行集成测试(默认使用 Mocked Garmin API)以确保逻辑正确;若需进行端到端(e2e)测试,则必须提供真实的 Garmin 凭据。您还可以通过指定模块路径(如 `tests/integration/test_health_wellness_tools.py`)来针对性地运行特定的测试用例。
在遇到连接问题时,请优先检查环境变量配置是否正确,特别是针对中国区用户的 `GARMIN_IS_CN` 参数。如果在使用 Docker 时遇到身份验证失效,可能需要通过 `docker volume rm` 清理旧的 token 卷并重新进行身份验证。对于测试相关的���错,请区分集成测试(使用 Mock 数据)与端到端测试(使用真实凭据)的区别。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Garmin MCP工具 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | garmin_mcp |
| 原始描述 | 开源MCP工具:MCP server to access Garmin data。⭐530 · Python |
| Topics | mcpgarminpython |
| GitHub | https://github.com/Taxuspt/garmin_mcp |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-25 · 更新时间:2026-05-26 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端