Garmin MCP Server

by Taxuspt
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Connects to Garmin Connect to access fitness and health data, including activity listings, detailed activity information, health metrics (steps, heart rate, sleep), and body composition data.

Garmin MCP 服务器

该模型上下文协议 (MCP) 服务器连接到 Garmin Connect 并将您的健身和健康数据公开给 Claude 和其他兼容 MCP 的客户端。

特征

  • 列出最近的活动
  • 获取详细活动信息
  • 访问健康指标(步数、心率、睡眠)
  • 查看身体成分数据

设置

  1. 在新环境中安装所需的包:
virtualenv .venv source .venv/bin/activate python -m pip install -r requirements.txt
  1. 使用您的 Garmin 凭据在项目根目录中创建一个.env文件:
GARMIN_EMAIL=your.email@example.com GARMIN_PASSWORD=your-password

运行服务器

使用 Claude Desktop

  1. 在 Claude Desktop 中创建配置:

编辑您的 Claude Desktop 配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

添加此服务器配置:

{ "mcpServers": { "garmin": { "command": "python", // if you created a new environment this should be "<root_folder>/.venv/bin/python" "args": ["<path to>/garmin_mcp/garmin_mcp_server.py"] } } }

将该路径替换为服务器文件的绝对路径。

  1. 重启Claude桌面

使用 MCP 检查器

为了进行测试,您可以使用 MCP 检查器:

npx @modelcontextprotocol/inspector python /Users/adomingues/Documents/claude_filesystem/garmin_mcp/garmin_mcp_server.py

使用示例

一旦连接到 Claude,您可以提出以下问题:

  • “显示我最近的活动”
  • “我昨晚睡得怎么样?”
  • “我昨天走了多少步?”
  • “显示我最近一次跑步的详细信息”

安全说明

此服务器需要您在.env文件中保存 Garmin Connect 凭据。请妥善保管此文件,切勿将其提交到代码库。

故障排除

如果您遇到登录问题:

  1. 验证.env文件中的凭据是否正确
  2. 检查 Garmin Connect 是否需要额外验证
  3. 确保 GarminConnect 软件包是最新的

对于其他问题,请检查 Claude Desktop 日志:

  • macOS: ~/Library/Logs/Claude/mcp-server-garmin.log
  • Windows: %APPDATA%\Claude\logs\mcp-server-garmin.log
-
security - not tested
A
license - permissive license
-
quality - not tested

连接到 Garmin Connect 并将您的健身和健康数据(活动、睡眠、心率、步数、身体成分)公开给 Claude 和其他兼容 MCP 的客户端。

  1. Features
    1. Setup
      1. Running the Server
        1. With Claude Desktop
        2. With MCP Inspector
      2. Usage Examples
        1. Security Note
          1. Troubleshooting
            ID: phw6mb5xgx