
OwnMetrics
io.github.badisbenhamida由 GitHub 账号 badisbenhamida 发布v0.3.1更新于 Oct 29, 2026
Ask AI apps about your own Garmin data via Garmin's official Personal API. Unofficial.
概览
只读的 MCP 服务器,让 AI 助手通过 Garmin 官方 Personal API 查询你自己的 Garmin 数据,如睡眠、HRV、压力、Body Battery、心率和活动。
- 可以做什么
- 获取每日数据:每日概览、睡眠、HRV、压力与 Body Battery、心率、身体指标,以及账号与密钥状态
- 按日期范围列出并查看活动,含配速、功率、步频、训练效果与分段
- 使用洞察工具一次完成取数与计算:按周或按月的训练汇总、时段对比、指标趋势、恢复相关性以及每周回顾
- 字段名自带单位,缺失值标注为“未记录”而非零
- 适用场景
- 适合佩戴 Garmin 设备、希望让 AI 应用分析自己的睡眠、恢复、训练负荷或活动历史的人,也适合需要定期获得每周回顾和时段对比、而不想手动导出数据的场景。
- 运行要求
- 以 PyPI 包形式通过 stdio 在本机运行,通常用 uvx 启动(需安装 uv)。需要 Garmin Connect 中创建的 Personal API 密钥,可通过 GARMIN_PERSONAL_API_KEY 环境变量提供,或用 auth 命令保存一次。需要联网,首次启动还要下载 Python 依赖。
安装
在 SourceWeft 中
- 打开 控制台中的 OwnMetrics,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ownmetrics-mcp
Ask Claude, ChatGPT or any MCP-capable AI app about your own Garmin data: sleep, HRV, stress, Body Battery, heart rate, activities and more. It uses Garmin's official Personal API, runs on your own computer, and is read-only.
Unofficial project. Not affiliated with, endorsed by or supported by Garmin. "Garmin" and "Garmin Connect" are trademarks of Garmin Ltd. or its subsidiaries. Results are informational, not medical advice.
Status: v0.3 (preview). Nine data tools and five insight tools (training summaries, period comparisons, trends, training vs sleep, weekly review). FIT-file analysis is next.
What you can ask
- "How did I sleep this week? Which night was worst, and why?"
- "Show my HRV for the last 30 days. Is it trending down?"
- "What were my stress and Body Battery like yesterday?"
- "List my runs this month with distance and average pace."
- "Break down my last long ride: power, heart rate, training effect."
- "How has my resting heart rate changed since September?"
- "Which month did I sleep best this year, and how much did I train that month?"
- "Compare my sleep and training this October with last October."
- "Do my evening tennis sessions go with worse sleep?"
- "Give me my weekly review."
- "Is my Garmin connection working?"
Easiest: one-click install for Claude Desktop
- Create your Garmin Personal API key: sign in to Garmin Connect on the web, open Settings → Personal API, select Create Key, accept Garmin's terms, choose how long it lasts, and copy it.
- Download
ownmetrics-mcp-<version>.mcpbfrom the latest release. - Double-click it. Claude Desktop opens and asks to install it; paste your key when asked.
Claude Desktop keeps it masked. (Already saved a key with
ownmetrics-mcp auth? Leave the field blank.) - Ask Claude: "Is my Garmin connection working?"
The bundle isn't signed yet, so Claude Desktop may show a warning before installing. The first start downloads a few Python packages, so it needs internet and can take a moment.
Set up for other apps (about 10 minutes)
For Claude Code, ChatGPT desktop, Cursor and other apps that support MCP servers, or if you prefer Claude Desktop's config file:
1. Install uv (one time)
uv runs Python tools without any manual setup.
- macOS / Linux: open Terminal and run
curl -LsSf https://astral.sh/uv/install.sh | sh - Windows: open PowerShell and run
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2. Create your Garmin Personal API key
- Sign in to Garmin Connect on the web and open Settings → Personal API.
- Select Create Key, read and accept Garmin's terms, and choose how long the key lasts (30 days to a year; your choice).
- Copy the key. Garmin shows it only once.
3. Save the key
Paste the key when asked (it stays hidden). It is checked with Garmin, then saved to
~/.config/garmin/connect-personal-api-key in your home folder. On macOS and Linux the file
is readable only by you; on Windows it sits in your user profile folder, protected by your
Windows account.
4. Add it to your AI app
Claude Desktop: Settings → Developer → Edit Config, then add:
Restart Claude Desktop.
Claude Code:
Other apps: use command uvx with the argument ownmetrics-mcp.
Updating
uvx keeps the version it first downloaded. To move to the latest release, run
uvx ownmetrics-mcp@latest --version, then restart your AI app.
Then ask: "Check my Garmin connection, then summarize my sleep and HRV for the last week."
Tools
Insight tools do the fetching and the math in one call, over up to a year:
Sleep and HRV are dated by the morning the night ended (woke_up_on), as Garmin does.
Pace is shown for running, walking and hiking; speed for other sports; distance says
"not applicable" for sports like strength training or pilates.
Every field name carries its unit (resting_hr_bpm, distance_km, sleep_score_0_100).
Where Garmin has no value, the field says "not recorded", never zero.
What Garmin's Personal API does not provide
- Read-only: nothing can be sent to your watch or written to Garmin Connect.
- Not available: training readiness, training status, acute/chronic load, VO2 max, gear and devices. The tools say "not provided by Garmin's Personal API" rather than guessing.
- Data tools cover up to 90 days per question and insight tools up to 366 days; the server splits requests to stay within Garmin's own limits.
Privacy and security
- Runs on your computer. Talks only to Garmin. No database, no telemetry.
- Your AI app sends tool results to its AI model, under that provider's terms.
- Your key never appears in tool results, logs or errors.
- Delete the key in Garmin Connect at any time to cut off access instantly.
Details: PRIVACY.md · THREAT_MODEL.md · Report vulnerabilities: SECURITY.md
Use of Garmin's API is subject to Garmin's terms: your key is personal to you and must not be shared.
Troubleshooting
- "Garmin rejected your Personal API key": it expired or was deleted. Create a new one and run step 3 again. Garmin emails a reminder about a week before a key expires.
- The AI app doesn't see the tools: restart the app fully. On macOS, if
uvxisn't found, use its full path (runwhich uvxin Terminal) as thecommand. - Check the connection yourself:
uvx ownmetrics-mcp status
How it's built
This project is built with spec-driven development. SPEC.md holds numbered requirements and the non-negotiable rules; every requirement traces to tests in TRACEABILITY.md, which CI regenerates and checks on every change. Contributions follow the same path: see CONTRIBUTING.md.
Built on Garmin's official connect-personal-api-python client and the Model Context Protocol Python SDK.
License
来源:README.md,提交 7cc4cfc
工具
0版本历史
3- v0.3.1最新Oct 29, 2026
- v0.2.1Oct 26, 2026
- v0.2.0Oct 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分