
Wellness Cgm Mcp
io.github.davidmosiah由 GitHub 帳號 davidmosiah 發布v0.4.0更新於 Oct 24, 2026
Local-first CGM MCP for AI agents: Dexcom Developer API + FreeStyle Libre via LibreLink Up.
概覽
本機 MCP 伺服器,讓 AI 助理讀取 Dexcom 或 FreeStyle Libre 的連續血糖監測資料,未設定時可回傳模擬資料
- 可以做什麼
- 讀取最新血糖值與趨勢,並取得指定小時數內的所有讀值,同時回報實際涵蓋的時間範圍。計算每日摘要,包含平均值、GMI、CV 與兩套目標範圍內時間設定,並偵測低血糖事件。分析餐後反應,從基準到高峰再到回落,並給出品質分級。查看連線狀態、能力、指標清單與隱私稽核,並產生 Dexcom OAuth 授權網址。檢查 LibreLink Up 設定並登入以列出所追蹤的感測器。管理本機個人檔案與導引輔助工具。
- 適用情境
- 適合配戴 Dexcom 或 FreeStyle Libre 感測器、希望助理整理血糖趨勢、標記血糖尖峰與低血糖,或把飲食與血糖反應關聯起來的使用者。模擬模式可在接上真實感測器前先試用整套流程。
- 執行需求
- 透過 npx 以 stdio 在本機執行,也可選用僅限本機回環的 HTTP 端點,由 WELLNESS_CGM_HOST、WELLNESS_CGM_PORT 與 WELLNESS_CGM_TRANSPORT 設定。Dexcom 即時資料需要開發者帳號以及 DEXCOM_CLIENT_ID、DEXCOM_CLIENT_SECRET、DEXCOM_REDIRECT_URI 與 DEXCOM_ACCESS_TOKEN。Libre 即時資料需要 LIBRELINKUP_EMAIL 與 LIBRELINKUP_PASSWORD,可選 LIBRELINKUP_REGION 與 LIBRELINKUP_PATIENT_ID。無憑證時回傳合成的模擬資料。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Wellness Cgm Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Wellness CGM MCP
Local-first continuous glucose monitor MCP for AI agents.
Dexcom Developer API. Levels-killer pattern, agent-first, $0.
[npm version] [npm downloads] [License MIT] [Site]
[GitHub stars] [Built for MCP] [Hermes] [OpenClaw]
🩸 Why this exists: Levels charges $199/mo to do exactly this — read your CGM, correlate with meals, flag spikes. wellness-cgm-mcp is the same game as a free local-first MCP. Stelo OTC + Dexcom developer API + your agent + wellness-nourish = the full metabolic loop.
⚡ One-command install — pick your runtime:
- Delx Wellness for Hermes:
npx -y delx-wellness-hermes setup- Delx Wellness for OpenClaw:
npx -y delx-wellness-openclaw setup
HTTP (v2 stateless)
Default is stdio. Optional Streamable HTTP — no session id, JSON responses, loopback only:
Env: WELLNESS_CGM_HOST, WELLNESS_CGM_PORT, WELLNESS_CGM_TRANSPORT=http.
Overview
Local MCP server that exposes CGM data (and synthetic mock data when nothing is configured) to any MCP-aware agent. Two real backends are supported: Dexcom (Developer API, sandbox + production) and FreeStyle Libre (the OTC sensor — Libre 2 / Libre 3) via LibreLink Up. Pick the backend with CGM_PROVIDER; it auto-detects Libre when only Libre credentials are set. Both feed the same ADA time-in-range / GMI / hypo / meal-response engine.
Try It In 60 Seconds (mock mode, zero setup)
The agent now has 10 CGM tools. Without a Dexcom token, every tool returns synthetic readings tagged mock: true — perfect for prototyping.
Live setup (Dexcom Developer)
Live setup (FreeStyle Libre — the OTC sensor)
No developer program, no app to build — just the same email/password you use in the LibreLinkUp follower app (the OTC Libre 2 / Libre 3 sensor works). In the LibreLink app, share your readings; in the LibreLinkUp app, accept the invite. Then:
Once logged in, every glucose tool (cgm_glucose_now, cgm_daily_summary, cgm_time_in_range, cgm_meal_response, cgm_hypo_events, …) reads from Libre and returns the same ADA TIR / GMI / hypo / meal-response metrics — each response carries a provider field so you always know the source. Without any credentials, everything returns synthetic mock: true data.
Libre history limit: ~12h per read
LibreLink Up's graph endpoint takes no start/end parameter — it always answers with its own fixed trailing window of roughly 12 hours. Asking for 24h or 72h does not widen it, so on Libre those extra hours simply do not exist.
Every windowed payload therefore reports what it actually covered:
Read hours_covered, never the requested hours / window_hours. A GMI (estimated A1C), CV or time-in-range built on 12h is not a 3-day result. For multi-day metrics use Dexcom, whose v3 API takes an explicit start/end and honours the request. Mock mode synthesises the full requested span, so it is never truncated.
The same applies to cgm_hypo_events, which takes an explicit from/to: "no hypoglycemia events" is only a claim about hours_covered. A 3-day question answered from a live Libre read is a 12-hour answer, and the payload says so in hours_covered, observed_window.hours, window_truncated_by_provider and notes. (events_per_day is safe either way — its denominator is the observed span, not the requested one — but the frame around it is not.)
window_truncated_by_provider is structural, not empirical
It answers "can this provider cover a span this wide?" — never "did this particular read come back short?". A sensor applied two hours ago answers cgm_daily_summary({ hours: 12 }) with hours_covered: 2, window_truncated_by_provider: false and an empty notes, because nothing is broken and warning there would be a false alarm. That is deliberate:
An empty
notesmeans "no known provider ceiling was hit", not "the window was fully covered".hours_coveredis the only number that states the real span — compare it againsthours_requestedbefore reporting any window.
Tools (19)
The table omits the shared profile/onboarding/quickstart/demo helpers (
cgm_profile_get,cgm_profile_update,cgm_onboarding,cgm_quickstart,cgm_demo) for brevity — callcgm_agent_manifestfor the full, always-current list.
Two Time-In-Range profiles in every summary
- Diabetic (70-180 mg/dL) — ADA standard for adults with diabetes.
- Metabolic health (70-140 mg/dL) — Levels-style for non-DM users.
Agents surface BOTH so the user picks the one that fits their context.
Meal response bands
Combine with wellness-nourish to compute "what did I eat → what happened" automatically.
The killer combo
Levels charges $199/mo for this. Here it is, free, local-first, MCP.
Privacy
- ✅ Credentials local only —
DEXCOM_ACCESS_TOKEN/LIBRELINKUP_*stay in env vars; the LibreLink Up auth token is never returned in tool output. - ✅ Mock mode by default — every tool returns synthetic data with
mock: trueuntil a provider is configured. - ✅ No third-party telemetry — outbound calls go only to your CGM provider (Dexcom or, for Libre, Abbott's LibreLink Up API).
Run wellness-cgm-mcp doctor to inspect.
Roadmap
- ✅ v0.4 — FreeStyle Libre via LibreLink Up (the OTC sensor). Shipped.
- next — Refresh-token rotation. Per-meal historical browser (which foods spike YOU?). Threshold alerts (agent notified when glucose holds > X mg/dL for Y minutes). Cross-meal automation with wellness-nourish.
What this is NOT
- Not medical advice or diagnosis.
- Not for insulin/medication dosing decisions — defer to clinician.
- Not affiliated with Dexcom or Abbott.
📧 Contact & Support
- 📨 [email protected] — general questions, integration help, partnerships
- 🐛 Bug reports / feature requests — GitHub Issues
- 🐦 Updates — @delx369 on X
- 🌐 Site — wellness.delx.ai
License
MIT — see LICENSE.
wellness-cgm-mcp is independent open-source software. Dexcom and FreeStyle Libre are trademarks of their respective owners. Neither company is affiliated with or endorses this project.
Skill or MCP
Same package, two doors. MCP registers tools on stdio/HTTP. The skill can drive the same tools through the CLI when the client has no MCP:
Copy skill/SKILL.md into your agent skills dir.
0.7.0 — candidate (2026-11-02)
This is a release candidate, not evidence of an npm publication. Existing installations are not updated automatically.
Migration and security boundaries
- HTTP transport accepts loopback only. LAN addresses and wildcard binds are rejected; use stdio or a local loopback client instead.
- Wellness profiles are validated, limited to 256 KiB, and protected with a cooperative lock. Oversized or invalid existing profiles must be corrected before use. Symbolic links, including dangling links and legacy profile paths, are rejected. These checks do not guarantee safety against a hostile local filesystem or non-cooperating processes.
- MCP inputs have a 10,000-element budget and HTTP bodies are limited to 1 MiB; compressed request bodies are rejected. Previously accepted oversized requests may now fail; reduce request sizes rather than disabling validation.
- Dependency fixes are included. Upgrade explicitly after publication and restart the connector; old installations retain their previous behavior.
來源:README.md,提交 c5065cd
工具
0版本歷史
1- v0.4.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分