Skip to main content
Glama

Garmin MCP 服务器

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

特征

  • 列出最近的活动

  • 获取详细活动信息

  • 访问健康指标(步数、心率、睡眠)

  • 查看身体成分数据

Related MCP server: Intervals.icu MCP Server

设置

  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

Latest Blog Posts

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/Taxuspt/garmin_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server