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 分