Garmin Connect Personal API

io.github.hannta由 GitHub 账号 hannta 发布v1.1.1更新于 Nov 7, 2026

Read-only Garmin Connect data on Garmin's official Personal API: training, sleep, HRV, recovery.

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

只读的 MCP 服务器,让助手通过 Garmin 官方 Personal API 查询你自己的 Garmin Connect 训练、睡眠、HRV、恢复与健康数据。

可以做什么
  • 查看单日或日期范围的概览:睡眠、HRV、Body Battery、压力、静息心率、步数、强度分钟与活动
  • 搜索活动并深入查看单项活动:配速、心率区间、跑步动态、功率、训练效果、计圈与间歇、时间序列数据流、结构化训练
  • 读取每晚睡眠与 HRV 详情,包括评分构成、睡眠需求与基线状态
  • 获取每日汇总、心率、血氧、压力、补水、饮食记录、体重与身体成分、健身年龄、心率区间与体重目标
  • 读取健康监测会话与月经周期数据,包括记录的流量、症状与情绪
适用场景
适合让助手解读你自己的 Garmin 训练与恢复数据,例如回顾一个训练周期、比较睡眠与 HRV 趋势,或解释恢复状况变化的原因。它只读,因此更适合分析与教练式对话,而不是修改 Garmin Connect 中的内容。
运行要求
需要一个在 Garmin Connect 网页版创建的 Garmin Connect Personal API 密钥,通过 GARMIN_PERSONAL_API_KEY 提供,或由服务器的 auth 命令保存。本地使用需 Node.js 22+,通过 npx 以 stdio 运行;也可选择部署到你自己的 Cloudflare 账户。需要能访问 Garmin API 的网络。
安装前请注意
该服务器处理敏感健康数据,包括睡眠、HRV、心率、身体成分、饮食记录与月经周期信息;README 说明位置、性行为与性欲数据不会被返回。Personal API 密钥属于机密,应避免放入共享配置。所有工具均为只读,不会修改 Garmin 数据。自行托管到 Cloudflare 时涉及用于所有者登录的口令。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Garmin Connect Personal API,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Watch with a heart-rate line]

Garmin Connect Personal API MCP

Not affiliated with or endorsed by Garmin. Garmin and Garmin Connect are trademarks of Garmin Ltd.

A read-only MCP server that gives AI assistants your own Garmin Connect training, recovery and health data through the official Garmin Connect Personal API. Run it on your own computer, or host it on your own Cloudflare account to use it from anywhere.

AI agents: to set this up for a user, follow docs/AGENT-SETUP.md.

Setup

You need a Garmin Connect Personal API key, which you create in Garmin Connect on the web.

Run locally

The quickest way, for Claude Code, Claude Desktop, Cursor, VS Code and other clients that run local servers. Needs Node.js 22+.

Paste this into your coding agent:

text
Connect @hannta/garmin-connect-personal-api-mcp

Or do it yourself: docs/LOCAL.md.

Host on Cloudflare

For Claude on the web and on mobile, and any other client that connects to remote servers with OAuth. The free plan is enough, apart from one known limitation.

Then connect your MCP client, such as Claude, ChatGPT, Cursor or VS Code.

Tools

ToolWhat it returns
garmin_get_dayOne day at a glance: sleep, HRV, Body Battery, stress, resting HR, intensity minutes, activities
garmin_get_daysThe same over a date range, one row per day, with daily activity totals and training load
garmin_search_activitiesActivities in a date range with Garmin IDs and fastest splits, or totals per week
garmin_get_activityOne activity in depth: pace, HR zones, running dynamics, power, training effect, interval totals, strength sets per exercise
garmin_get_activity_streamsOne activity's time series (HR, pace, grade-adjusted pace, cadence, power, elevation, …)
garmin_get_activity_lapsOne row per lap and interval rep, from the activity's FIT file
garmin_get_sleepOne night's sleep in detail: score components with optimal ranges, sleep need and why it changed, naps
garmin_get_sleep_summariesSleep per night over a date range
garmin_get_hrvOne night's HRV with baseline, status and overnight readings
garmin_get_hrv_summariesHRV per night over a date range
garmin_get_daily_summariesResting HR, Body Battery, stress, intensity minutes, steps per day over a date range
garmin_get_weightWeigh-ins and body composition over a date range
garmin_get_profileProfile settings and heart-rate zones
garmin_get_body_batteryBody Battery per day: charged, drained and the sleep / activity events behind it
garmin_get_stressStress per day: average level and minutes at rest / low / medium / high
garmin_get_stepsSteps per day with goal and distance
garmin_get_heart_rateOne day's resting / min / max heart rate, optionally averaged per 15 minutes
garmin_get_spo2One day's blood oxygen (Pulse Ox), optionally hourly with altitude
garmin_get_fitness_ageFitness age and its components (resting HR, BMI, vigorous days / minutes)
garmin_get_heart_rate_zonesHeart-rate zones per sport
garmin_get_weight_goalsWeight goals in effect (target kg)
garmin_get_activity_workoutsThe structured workout an activity followed: steps, targets (HR, pace, power) and repeats
garmin_get_hydrationHydration per day: intake, goal, sweat loss (ml)
garmin_get_food_logOne day's food log: calories and macros eaten vs. goals, per meal and food
garmin_get_wellness_activitiesWellness sessions (e.g. Health Snapshot, breathwork) with HR, stress, HRV, SpO2
garmin_get_menstrual_cycleCycle day, period and fertile window, predictions and cycle analysis
garmin_get_menstrual_dayOne day's logged flow, symptoms and moods, with that day's cycle summary

Good to know

  • Range tools default to the last 7 days. If a range is too long for one Garmin request, the error says the maximum and the assistant splits it into several calls.
  • Output is metric, with the unit in every field name. Dates are YYYY-MM-DD in your time zone; sleep and HRV are keyed by the wake-up date.
  • Location, sexual activity and sex drive data are never returned.
  • Known limitation: garmin_get_activity_laps can fail on long activities on the Cloudflare free plan. See Known limitations.

Development

Requires Node.js 24+.

bash
npm installcp .dev.vars.example .dev.vars   # then add GARMIN_API_KEY and OWNER_PASSPHRASEnpm run check                     # typecheck, lint, format check, testsnpm run today                     # print today's recovery data using your keynpm run dev                       # MCP server at http://localhost:8787/mcpnpm run build                     # local server in dist/cli.mjs

To try the local server, connect the MCP Inspector to it and sign in with OWNER_PASSPHRASE.

Architecture and conventions: docs/DEVELOPMENT.md.

License

MIT

来源:README.md,提交 f8f1df1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.1最新Nov 7, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分