wellness-cgm-mcp
v0.3.1
Published
Local-first continuous glucose monitor MCP for AI agents — Dexcom Developer API (sandbox + production). Pair with wellness-nourish for meal-glucose correlation.
Downloads
477
Maintainers
Readme
⚡ 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
Overview
Local MCP server that exposes Dexcom CGM data (and synthetic mock data when no token is set) to any MCP-aware agent. v0.1 ships full Dexcom Developer API support — sandbox + production. FreeStyle Libre via LibreLink Up is roadmapped for v0.2.
Try It In 60 Seconds (mock mode, zero setup)
npx -y wellness-cgm-mcp doctor # see env / mode
npx -y wellness-cgm-mcp status
# In Claude Desktop / Cursor / etc., add:
# {
# "mcpServers": {
# "wellness-cgm": {
# "command": "npx",
# "args": ["-y", "wellness-cgm-mcp"]
# }
# }
# }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)
# 1. Sign up at https://developer.dexcom.com (sandbox is free)
# 2. Create an app, register your redirect URI
export DEXCOM_ENV=sandbox
export DEXCOM_CLIENT_ID=...
export DEXCOM_CLIENT_SECRET=...
export DEXCOM_REDIRECT_URI=https://your.callback/redirect
# 3. Get the OAuth URL, open it, grant access, copy the code from the redirect
npx -y wellness-cgm-mcp authorize
# 4. Swap code for tokens
npx -y wellness-cgm-mcp exchange <auth_code_from_redirect>
# 5. Set DEXCOM_ACCESS_TOKEN to the access_token, restart the MCP — flips from mock to live.Tools (10)
| Tool | Purpose |
|---|---|
| cgm_agent_manifest | Runtime contract |
| cgm_capabilities | Providers, metrics, privacy modes |
| cgm_connection_status | env, credentials, mode (live vs mock) |
| cgm_privacy_audit | Local storage + outbound destinations |
| cgm_data_inventory | Metric catalog + TIR ranges + GMI formula |
| cgm_glucose_now | Most recent EGV + trend |
| cgm_glucose_window | All EGVs over last N hours |
| cgm_daily_summary | Mean / GMI / CV / 2 TIR profiles |
| cgm_meal_response | Baseline → peak → return + band |
| cgm_authorize_url | Dexcom OAuth URL builder |
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
| Peak Δ from baseline | Band | |---|---| | < 30 mg/dL | excellent | | 30-49 | good | | 50-79 | moderate | | ≥ 80 | poor |
Combine with wellness-nourish to compute "what did I eat → what happened" automatically.
The killer combo
wellness-nourish: meal at 13:15 (rice + chicken)
↓
wellness-cgm-mcp.cgm_meal_response(meal_time)
↓
{ peak: 167, peak_delta: 72, band: "moderate", peak_time_minutes: 45 }
↓
whoop-mcp.recovery: 67%
↓
Agent: "That meal hit a moderate spike (peak +72 mg/dL at 45 min)
AND recovery is borderline. Try protein-first next time, or
swap white rice for lentils — should drop the peak ~30 mg/dL."Levels charges $199/mo for this. Here it is, free, local-first, MCP.
Privacy
- ✅ Tokens local only — DEXCOM_ACCESS_TOKEN stays in env vars.
- ✅ Mock mode by default — every tool returns synthetic data with
mock: trueuntil a token is configured. - ✅ No third-party telemetry — only outbound calls go to Dexcom.
Run wellness-cgm-mcp doctor to inspect.
Roadmap
- v0.2 — FreeStyle Libre via LibreLink Up community proxy. Refresh-token rotation. Cross-meal automation with wellness-nourish.
- v0.3 — Per-meal historical browser (which foods spike YOU?).
- v0.4 — Threshold alerts (agent notified when glucose holds > X mg/dL for Y minutes).
What this is NOT
- Not medical advice or diagnosis.
- Not for insulin/medication dosing decisions — defer to clinician.
- Not affiliated with Dexcom or Abbott.
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.
