
Garmin Local Mcp
io.github.anup-shesh由 GitHub 帳號 anup-shesh 發布v0.1.9更新於 Oct 27, 2026
Local-first Garmin data warehouse: sync once to SQLite, analyze trends and correlations offline.
發布方自己的服務:LMCP
概覽
本地優先的 Garmin 資料倉儲:把 Garmin Connect 歷史同步到 SQLite,讓助理離線分析趨勢、相關性與睡眠節律。
- 可以做什麼
- 同步與檢查 Garmin Connect 資料:登入狀態、增量同步、各表涵蓋範圍與缺漏
- 讀取單日合併檢視,或依日、週、月彙總的欄式指標時間序列
- 分析指標:含 -7 到 +7 天延遲掃描的 Pearson/Spearman 相關、個人基準、異常日與連續偏離
- 瀏覽活動:可依類型、日期與距離篩選的近期活動表,以及單一活動的已存摘要
- 估算時型、睡眠需求與建議起床時段,並附區間與樣本外證據
- 無需登入即可匯入手動匯出的 wellness FIT 資料包
- 適用情境
- 適合讓助理回答關於自身 Garmin 資料的跨月問題,例如睡眠與隔日靜止心率的關係,而不必每次為龐大的即時 API 回應付出成本。也適合在 Garmin 非官方 API 中斷時繼續分析,或先用合成示範資料試用這些工具。
- 執行需求
- 本機需 Python 3.12+(pip 安裝,或以 uv 搭配 uvx)。需要 Garmin Connect 帳號:先執行一次登入命令列(支援 MFA),再用同步命令列回填歷史,之後才啟動服務;MCP 伺服器本身不會要求憑證。可選環境變數 GARMIN_MCP_DATA_DIR、GARMINTOKENS、GARMIN_EMAIL 與 GARMIN_PASSWORD,以及可選的 config.toml。僅同步時需要網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Garmin Local Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
garmin-local-mcp
Local-first Garmin data warehouse with an analysis-grade MCP server. Sync once, analyze forever, even when the API is down.
[garmin-local-mcp answering questions from a local store, including with the network disconnected]
Try it without a Garmin account
If you don't own a Garmin, or just want to see what the tools return before handing over credentials, seed a synthetic store:
That generates 180 days across every table, then serves them over MCP. No login, no network, no account.
The data is generated rather than recorded, but it is not random. A latent recovery factor drives HRV up while resting heart rate goes down, training load raises the next day's resting heart rate, a six-day illness window sits in the middle of the range, and a few sleep nights are deliberately missing. Sleep timing carries a planted chronotype (MCTQ MSFsc 03:45, with alarm-pinned work mornings and later, longer free nights), and the sleep score drops with distance from that natural wake time. So the analysis tools have something real to find. Over the full 180 days (exact figures shift a little with the end date, because training days depend on the weekday):
The analysis tools default to the last 30 days, which misses the illness
window, so ask about the whole range (demo prints it). On a short window a
lag scan has little to work with; correlate says so in its note when the
strongest lag is not significant once all 15 lags are accounted for.
sync_status reports demo_store: true on these stores, so an assistant can
never present generated numbers as real measurements. The generator is
deterministic — --seed reproduces a store exactly, and --days changes the
range. demo refuses to overwrite a database it did not generate.
Why another Garmin MCP?
Most Garmin MCP servers are thin live wrappers around Garmin's unofficial API. Every question your AI assistant asks becomes one or more live API calls returning large raw JSON blobs (a single raw sleep response runs around 230 KB), which makes multi-month questions like "how does my sleep correlate with training load?" expensive to ask.
That design is no longer universal. Since Garmin's auth change in March 2026 broke the ecosystem for several weeks, a number of projects have added local storage, and the largest server computes training-load and HRV trends server-side. Data ownership and server-side analysis are both crowded ground now. Three things are not:
- Sleep-timing advice that is tested before it is given.
circadianestimates your chronotype from your watch's sleep times (the Munich Chronotype Questionnaire's sleep-debt-corrected mid-sleep) and the wake time that fits it, with an 80% interval on each and a check of how much the answer moves under other reasonable settings. Then it asks whether waking near that time actually went with higher Garmin scores on nights the model never saw, beyond what sleep duration and schedule regularity explain, and says plainly when it didn't. Chronotype on its own is not new: other tools, including at least one MCP server, report MCTQ-style chronotype from wearable sleep data. I have not found another that puts uncertainty on the answer or validates it out of sample. See Sleep timing and chronotype. - Ingest that needs no login. A standalone decoder for Garmin's undocumented wellness FIT messages (sleep score, HRV, skin temperature, sleep stages, naps) reads manually exported bundles with no credentials at all. Other servers parse FIT activity files; I have not found another that decodes the wellness export. It is the only ingest path here that keeps working when Garmin auth breaks.
- Correlation with lag. Pearson and Spearman between any two metrics with a scan over -7 to +7 day lags, so "training load raises my resting HR the next day" is a question with an answer.
The rest of the design follows from keeping your own copy:
- Sync once, analyze forever. Incremental sync into a local warehouse: immutable raw JSON snapshots plus a SQLite database, in a directory you own.
- Compact responses. Trends, correlations, baselines and anomaly detection
are computed locally and returned as small columnar tables. Typical responses
are under 2 KB (
circadian, the richest, stays under 3 KB), so nothing floods the model's context. - Offline resilience. An API breakage pauses new syncs only. Every query over already-synced history keeps working, and FIT import keeps filling gaps.
- Curated tools. 13 composable tools, not 110.
Quickstart
Requires Python 3.12+.
Or run it without installing, via uv:
1. Log in once (MFA supported; tokens persist locally, so future runs never ask for a password):
2. Backfill your history. The sync is resumable, safe to interrupt, and throttled to be polite to Garmin's servers. A year of history is roughly 1,800 requests; for long backfills, start it and let it run (overnight works well). If it gets rate limited or interrupted, re-run the same command and it resumes where it left off.
3. Register the MCP server with your client (see Client setup for Claude Desktop, Cursor, and other clients):
4. Ask questions. Examples of what Claude can now answer from your local warehouse in one or two tool calls:
- "How does my sleep score correlate with next-day resting HR?"
- "What were my anomalous HRV days this quarter?"
- "Show weekly training load vs sleep for the last 3 months."
Client setup
The server speaks stdio, so any MCP client works. pip install garmin-local-mcp
first (or use the uvx variants below, which need nothing installed beyond
uv).
Claude Code
Claude Desktop, one-click: download garmin-local-mcp-x.y.z.mcpb from the
latest release,
then in Claude Desktop open Settings > Extensions > Advanced settings, click
"Install Extension…", and select the file. Requires
uv on your PATH;
the extension installs and runs the server from PyPI via uvx, so no manual
Python setup is needed. If the install dialog warns about a missing
Python >=3.12, you can ignore it: uv provisions its own interpreter.
Claude Desktop, manual (Settings, then Developer, then Edit Config; add to
claude_desktop_config.json):
Cursor (~/.cursor/mcp.json, or .cursor/mcp.json in a project):
Any other stdio client / no local install (requires uv):
Note: login and the initial backfill sync are CLI steps (see
Quickstart); the MCP server itself never prompts for
credentials.
The 13 tools
Only sync and import_fit write anything, and only inside the data
directory. The server never prompts: auth problems come back as structured
errors with a hint pointing at the login CLI.
Available metric names include resting_hr, sleep_score, hrv, steps,
stress_avg, body_battery_high, skin_temp_dev_c, vo2max, fitness_age,
achievable_fitness_age, training_load, endurance_score, hill_score,
readiness_score, race_5k_s, the sleep-timing metrics sleep_onset_min,
wake_time_min and mid_sleep_min (minutes from midnight of the wake date, so
a 23:00 bedtime is −60), and about 35 more; any tool given an unknown name
returns the full list.
Performance scores
Garmin's periodic fitness scores land in their own performance table:
endurance score, hill score (with its endurance and strength sub-scores),
training readiness (score, level, recovery time) and race predictions for 5k,
10k, half and full marathon (all in seconds).
These update on Garmin's own cadence rather than daily, so performance is
deliberately excluded from gaps — a day without a new endurance score is
normal, not a hole. Race predictions and hill score only move after qualifying
running activity, so long stretches of nulls are expected for anyone whose
training is mostly hiking, cycling or strength work.
Sleep timing and chronotype
circadian answers "when does my body clock want me to wake up?" from the sleep
start and end times already in the store. It returns three separate quantities,
each with an 80% interval from a week-block bootstrap:
- Chronotype (
msf_sc). The Munich Chronotype Questionnaire measure: mid-sleep on free days, corrected for the extra sleep taken to repay workday debt. Labelledearly(before 03:30),intermediateorlate(after 04:30); the bands are approximate and the number is the main value. - Sleep need. Your mean free-night sleep window, unless you pass
sleep_need_min. The range where your Garmin scores level off is reported alongside as a cross-check. - Circadian-compatible wake window.
msf_sc + sleep_need / 2. This is an inference, not an MCTQ output. With no catch-up sleep it is simply your average free-day wake time; with catch-up sleep it is that time moved earlier by half the catch-up.
It then checks the inference against what actually happened:
- Stability. The estimate is recomputed over 90, 180 and 365 days, mean and
median mid-sleep, and three travel-filter widths.
stability: lowusually means your schedule changed; pass astartafter the change. - Evidence. On a rolling holdout (train 120 days, test the next 30), it
compares a sleep-duration-only model with one that adds distance from your
circadian wake, and controls for schedule regularity with a separate pair of
models. The level is
consistent,supportive,suggestiveorunsupported. These describe how consistently the pattern held on unseen nights. They are not statistical significance, and evidence needs at least 180 days of history. - What it can't show. Readiness and sleep score are Garmin's own composite scores, not physiological measurements. The strongest possible conclusion is that waking near your window was associated with higher Garmin scores on nights the model never saw, beyond what sleep duration and regularity predict. It does not show that wake timing changes physiology.
When the formula and your past scores disagree by more than 30 minutes, the
tool keeps both and suggests a 21-night experiment between them rather than
averaging them away. Free days default to Saturday and Sunday mornings
(free_days changes that), and if you set alarms on free days the chronotype
comes out earlier than your body clock. Daylight-saving changes in the range
are listed, using the configured timezone or the host's. Shift workers
(daytime main sleep) get the rhythm and chronotype but no wake window.
Data layout and ownership
Everything lives in one directory you own (default ~/.garmin-mcp, override
with the GARMIN_MCP_DATA_DIR environment variable or --data-dir):
The raw JSON snapshots are the source of truth and are never overwritten. The
SQLite database is a derived, rebuildable index: garmin-local-mcp reparse
rebuilds it from the raw snapshots entirely offline, which is the universal
escape hatch for schema evolution and parser fixes. Your data never leaves
your machine.
Data quality note
Garmin watches report a provisional on-device resting heart rate that can diverge sharply from Garmin Connect's finalized value on nights with sparse sampling. A real observed case: the watch reported 69 bpm on-device while Garmin Connect later finalized the same night at 56 bpm.
This project handles that in two ways:
- The API sync stores Garmin Connect's finalized value.
- The FIT importer cross-checks the provisional on-device value against the
overnight heart-rate floor. A resting HR sitting more than 10 bpm above the
lowest overnight sample is a rate the watch never actually observed; it gets
flagged (
rhr_far_above_hr_floor) and withheld, leaving the field for the API to backfill rather than storing a misleading number.
Sparse sleep-stage logging is flagged the same way
(sparse_sleep_stage_logging), and flags surface in get_day so the analysis
layer knows which numbers to trust.
Offline / fallback runbook
If Garmin breaks the unofficial API again (it has before):
- Everything analytical keeps working. All query, correlation, baseline, anomaly, and gap tools run on your already-synced local history. Only new syncs pause.
- Keep ingesting without auth. Download a daily FIT bundle from the
Garmin Connect website and import it locally (exact steps below).
garmin-local-mcp import-fit <folder>decodes the bundle with zero authentication and fills the gap days. FIT-sourced rows never overwrite API-sourced rows (unless you pass--force). - Resume when the community catches up. Watch the
python-garminconnect
project for a fix, upgrade, and run
garmin-local-mcp syncagain. Thanks to resumable sync state, it picks up exactly where it stopped.
Downloading a wellness bundle, step by step
-
Sign in at connect.garmin.com in any browser.
-
Go directly to https://connect.garmin.com/app/settings/accountInformation (or click your avatar in the top-right corner, then Settings, then Account Information in the left sidebar).
-
Scroll to the bottom of the page, to the section titled Export Wellness Data ("Download your wellness FIT files from a specific day. This includes data such as steps, sleep, stress, HRV and more.").
-
Pick a date in the Date field and click Export. Your browser downloads a small zip for that one day, containing roughly 12 to 15 binary
.fitfiles (*_WELLNESS.fit,*_SLEEP_DATA.fit,*_HRV_STATUS.fit,*_SKIN_TEMP.fit,*_METRICS.fit, and similar). -
Unzip it into a folder and run:
-
Repeat for each missing day (one bundle per date). The
gapstool orgarmin-local-mcp statustells you which days need filling.
Two things worth knowing:
- Overnight sleep belongs to the wake date. To get last night's sleep, export yesterday's date if you slept into this morning, i.e. the date you woke up on.
- This per-day export is instant and separate from Garmin's full account
export (the "Data Management" link on the same page), which is a bulk
archive that can take days to arrive by email and is not what
import-fitexpects.
Configuration
Optional config.toml in the data directory:
Environment variables:
Development
The test suite runs fully offline against sanitized JSON fixtures and small FIT samples; CI never touches the live API.
Disclaimer
This project is not affiliated with, endorsed by, or supported by Garmin Ltd. It uses the community python-garminconnect library with your own credentials to access your own data. Garmin's APIs are unofficial and can change or break at any time; when that happens, your synced history remains fully usable and the FIT import path keeps working.
All data stays on your machine. Nothing phones home: no telemetry, no third-party services, no cloud. Treat your data directory like the personal health record it is, and never commit it to a repository.
License
MIT
來源:README.md,提交 d3989fc
工具
0版本歷史
3- v0.1.9最新Oct 4, 2026
- v0.1.7Sep 26, 2026
- v0.1.6Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Local-Mcp 整合
LMCP
com.local-mcp官方發布者
把 ChatGPT、Claude、Cursor 等 MCP 用戶端連接到你的電子郵件、行事曆、訊息、待辦事項和檔案,讓助理彙整脈絡並據此採取行動。

Autodesk Fusion
com.autodesk.aps.api
把 MCP 用戶端連接到執行中 Autodesk Fusion 內建 MCP 伺服器的橋接工具,讓助理建立、修改與檢視 CAD 幾何。

Cicadas local MCP
由 GitHub 帳號 kevinwowo 發布
連接 Cicadas.ai 客戶 API 的實驗性本機橋接,讓助理列出影片模型、查詢點數餘額、估算費用並查看自有影片任務

Local Mcp
由 GitHub 帳號 lanchuske 發布
一款原生 macOS 與 Windows 桌面應用程式,提供 82 個 MCP 工具,涵蓋郵件、行事曆、Teams、OneDrive 等應用。

BLACKPROOF Local MCP
由 GitHub 帳號 l0gfr 發布
一個本機、唯讀的 MCP 伺服器(alpha),讓助理執行網路證據完整性檢查與彙總比較。