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.

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

唯讀的 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 套件。
安裝前請注意
Garmin Personal API 金鑰屬於個人,不得分享;它存放在使用者主目錄下的檔案中,可隨時在 Garmin Connect 撤銷。工具結果會由你的 AI 應用傳送給其模型供應商,並受該供應商條款約束。本專案為非官方專案,結果僅供參考,不構成醫療建議。桌面安裝包尚未簽章,安裝時可能出現警告。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 OwnMetrics,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

  1. 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.
  2. Download ownmetrics-mcp-<version>.mcpb from the latest release.
  3. 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.)
  4. 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

  1. Sign in to Garmin Connect on the web and open Settings → Personal API.
  2. Select Create Key, read and accept Garmin's terms, and choose how long the key lasts (30 days to a year; your choice).
  3. Copy the key. Garmin shows it only once.

3. Save the key

bash
uvx ownmetrics-mcp auth

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:

json
{  "mcpServers": {    "ownmetrics": {      "command": "uvx",      "args": ["ownmetrics-mcp"]    }  }}

Restart Claude Desktop.

Claude Code:

bash
claude mcp add ownmetrics -- uvx ownmetrics-mcp

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

ToolWhat it returns
get_daily_overviewOne day: steps, distance, floors, heart rate, stress, Body Battery, calories, intensity minutes, sleep
get_sleepPer night: hours, deep/light/REM/awake, score, Garmin's feedback, heart rate, respiration
get_hrvPer night: HRV last-night and weekly average, 5-minute high, status, baseline
get_stress_and_body_batteryPer day: stress level, time in each stress band, Body Battery high/low/charged/drained
get_heart_rateOne day: resting, min, max, 7-day resting average; your heart rate zones
list_activitiesActivities in a date range, optionally by type, with duration, distance, heart rate
get_activityOne activity: pace, speed, power, cadence, training effect and load, splits
get_body_metricsWeigh-ins, BMI, body fat, hydration; Pulse Ox and fitness age
get_account_statusWhether your key works, a warning in its final day, which of the data areas above respond

Insight tools do the fetching and the math in one call, over up to a year:

ToolWhat it answers
training_summaryTraining by week or month: sessions, hours, hours per week, evening sessions, per-sport breakdown
compare_periodsTwo periods side by side: sleep, HRV, resting heart rate, stress, Body Battery, steps, training, with change and % change
recovery_correlationsWhether training goes with better or worse sleep and HRV the night after, with sample size and strength. Correlation, not cause.
trendOne metric by day, week or month, with direction (up, down or flat) and change per 30 days
weekly_reviewThe same review every time: this week (so far) against the same days last week and your previous 28 days, best and worst nights, and highlights from fixed rules

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 uvx isn't found, use its full path (run which uvx in Terminal) as the command.
  • 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

MIT

來源:README.md,提交 7cc4cfc

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.3.1最新Oct 29, 2026
  2. v0.2.1Oct 26, 2026
  3. v0.2.0Oct 26, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分