Garmin Connect Personal API

io.github.DynamicsNinja由 GitHub 帳號 DynamicsNinja 發布v1.0.0更新於 Oct 29, 2026

Read your Garmin sleep, HRV, steps, stress, Body Battery, and activities (unofficial)

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

概覽

AI 產生的概覽

非官方本機 MCP 伺服器,讓助理讀取你在 Garmin Connect 的睡眠、HRV、步數、壓力、Body Battery 與活動資料。

可以做什麼
  • 讀取單晚睡眠詳情與每晚睡眠摘要、HRV、心率及心率區間
  • 讀取每日步數、壓力、飲水、Body Battery、血氧及綜合每日摘要
  • 搜尋活動並取得活動詳情與訓練內容
  • 讀取體重紀錄、體重目標、飲食紀錄、健身年齡與個人資料設定
  • 讀取月經週期摘要與健康活動摘要
  • 透過通用請求工具呼叫其他任意 Personal API GET 路徑
適用情境
適合讓助理回答關於你自己 Garmin 資料的問題,例如比較本週與上週睡眠、判斷 HRV 是否上升、彙整最近幾次跑步,或分析睡眠不足與壓力的關係。
執行需求
透過 npx 以 stdio 方式在本機執行,需要 Node.js 20.4 或更新版本。需要 Garmin Connect Personal API 金鑰,可透過 GARMIN_PERSONAL_API_KEY 環境變數提供,或存放在 ~/.config/garmin 下的金鑰檔案。金鑰會換取 bearer token 並快取在本機。
安裝前請注意
API 金鑰屬於個人憑證,寫入用戶端設定會使其暴露在該設定中,金鑰檔案或環境變數需妥善保護。伺服器為唯讀,無法變更帳戶,但會讀取敏感健康資料,包括睡眠、心率、HRV、體重、飲食紀錄與月經週期資料,這些資料會從 Garmin 傳送到你連接的 AI 用戶端,並受該用戶端的隱私條款約束。此專案為非官方專案,與 Garmin 無關聯。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Garmin Connect Personal API MCP Server

[npm] [License]

Unofficial. This is a community project. It isn't affiliated with or endorsed by Garmin.

An MCP server that lets Claude and other AI assistants read your Garmin Connect data through Garmin's official Personal API. Ask questions such as:

  • "How has my sleep been this week compared with last week?"
  • "Is my HRV trending up or down this month?"
  • "Summarize my last five runs."
  • "On days I slept less than 6 hours, what was my stress like?"

It's built on garmin-connect-personal-api-js and is read-only: it can't change anything in your account.

Setup

  1. Create a Personal API key on Garmin Connect.
  2. Add the server to your AI client, as shown below, with the key in GARMIN_PERSONAL_API_KEY. You need Node.js 20.4 or newer.

Claude Desktop

Open Settings → Developer → Edit Config and add:

json
{  "mcpServers": {    "garmin": {      "command": "npx",      "args": ["-y", "garmin-connect-personal-api-mcp"],      "env": {        "GARMIN_PERSONAL_API_KEY": "your-personal-api-key"      }    }  }}

Restart Claude Desktop afterward.

Claude Code

shell
claude mcp add garmin --env GARMIN_PERSONAL_API_KEY=your-personal-api-key -- npx -y garmin-connect-personal-api-mcp

Other MCP clients

Run npx -y garmin-connect-personal-api-mcp as a stdio server with GARMIN_PERSONAL_API_KEY set.

Keeping the key out of client config

Instead of the environment variable, you can save the key in ~/.config/garmin/connect-personal-api-key (on Windows, %USERPROFILE%\.config\garmin\connect-personal-api-key) and leave env out of the configuration. This is the same key file the gc-personal CLI uses.

Tools

ToolData
get_daily_sleep_summariesOne summary per night: duration, stages, sleep score
get_daily_sleepDetailed sleep for one night
get_daily_summariesDaily steps, calories, heart rate, stress, Body Battery, intensity minutes
get_daily_hrv, get_daily_hrv_summariesHeart rate variability for a night, or per night over a range
get_daily_heart_rate, get_heart_rate_zonesHeart rate samples for a day, and heart rate zones
get_daily_stress, get_daily_steps, get_daily_hydrationDaily statistics over a date range
get_daily_body_battery, get_daily_spo2Body Battery and SpO2
search_activities, get_activity, get_activity_workoutsActivities and their details
get_weight_measurements, get_effective_weight_goals, get_daily_food_logsWeight, goals, and nutrition
get_fitness_age, get_user_profile_settingsFitness age and profile settings
get_menstrual_cycle_summary, get_menstrual_cycle_day_viewMenstrual cycle data
get_wellness_activity_summariesWellness activity summaries
api_getAny other Personal API GET endpoint

Dates use YYYY-MM-DD and default to today. Date ranges are inclusive.

How it works

The server exchanges your API key for a bearer token and caches it in ~/.config/garmin/connect-personal-api-bearer-token.json, shared with the gc-personal CLI. Tokens are renewed before they expire, and a rejected token is replaced automatically.

Your data goes from Garmin to the AI client you connect, so it's subject to that client's privacy terms.

License

Apache 2.0. See LICENSE.

來源:mcp/README.md,提交 339f39f

工具

24

search_activities

Activities

Get activities. Returns summaries with activityId, name, type, start time, distance, duration, and heart rate. Use activityId with get_activity for full details.

輸入參數limitstartendDatestartDateactivityType

get_daily_stress

Daily Stress

Get daily stress.

輸入參數endDatestartDate

get_daily_steps

Daily Steps

Get daily steps.

輸入參數endDatestartDate

get_daily_hydration

Daily Hydration

Get daily hydration.

輸入參數endDatestartDate

get_effective_weight_goals

Effective Weight Goals

Get effective weight goals.

輸入參數endDatestartDate

get_weight_measurements

Weight Measurements

Get weight measurements.

輸入參數endDatestartDate

get_daily_food_logs

Food Logs

Get food logs.

輸入參數date

get_user_profile_settings

User Profile Settings

Get user profile settings. Includes units, time zone, and date format, which help interpret other responses.

無需輸入參數。

get_daily_sleep

Daily Sleep

Get daily sleep. Detailed sleep for one night, including stages, scores, and overnight readings.

輸入參數date

get_daily_sleep_summaries

Daily Sleep Summaries

Get daily sleep summaries. One summary per night, including duration, stages, and sleep score. Prefer this over get_daily_sleep for trends.

輸入參數endDatestartDate

get_daily_body_battery

Daily Body Battery

Get daily body battery.

輸入參數chunksendDatestartDate

get_daily_summaries

User Daily Summaries

Get user daily summaries. One summary per day with steps, calories, heart rate, stress, Body Battery, intensity minutes, and respiration. Use the same start and end date for a single day.

輸入參數endDatestartDate

get_daily_heart_rate

Daily Heart Rate

Get daily heart rate. All heart rate samples for one day; the response can be large.

輸入參數date

get_daily_hrv

Daily HRV

Get heart rate variability (HRV) summary and readings for a calendar date.

輸入參數date

get_daily_hrv_summaries

Daily HRV Summaries

Get daily heart rate variability (HRV) summaries for an inclusive date range. One HRV summary per night with weekly average, baseline, and status.

輸入參數endDatestartDate

get_heart_rate_zones

Heart Rate Zones

Get heart rate zones.

無需輸入參數。

get_menstrual_cycle_summary

Menstrual Cycle Summary

Get menstrual cycle summary.

輸入參數date

get_menstrual_cycle_day_view

Menstrual Cycle Day View

Get menstrual cycle day view.

輸入參數datetodayDate

get_fitness_age

Fitness Age

Get fitness age.

輸入參數date

get_daily_spo2

Daily SpO2

Get daily spo2.

輸入參數date

get_wellness_activity_summaries

Wellness Activity Summaries

Get wellness activity summaries.

輸入參數endDatestartDate

get_activity

Activity Details

Get activity details.

輸入參數activityId必填

get_activity_workouts

Activity Workouts

Get activity workouts.

輸入參數activityId必填

api_get

Personal API GET

GET any Personal API path that has no dedicated tool, such as one from the Personal API Swagger documentation. The path starts with a slash, for example /usersummary-service/stats/steps/daily/2026-10-01/2026-10-07.

輸入參數path必填params

版本歷史

1
  1. v1.0.0最新Oct 23, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分