Purpose
wellness-cgm-mcp is a local-first continuous glucose monitoring (CGM) MCP server that lets AI agents read CGM data and perform metabolism-related analysis. The project describes its goal as "Levels-killer, agent-first, $0", i.e. using a free, local-first MCP approach to implement capabilities such as reading CGM, correlating meals, and flagging glucose spikes.
Main capabilities
- Exposes CGM data (as well as synthetic simulated data when no backend is configured) to any MCP-capable agent.
- Supports two real backends: Dexcom (Developer API, including sandbox and production) and FreeStyle Libre (OTC sensors Libre 2 / Libre 3, via LibreLink Up).
- Selects the backend via the CGM_PROVIDER environment variable; Libre is automatically detected when only Libre credentials are set.
- Both backends share the same ADA time-in-range / GMI / hypoglycemia / postprandial response engine.
- Provides 10 CGM tools, including cgm_glucose_now, cgm_daily_summary, cgm_time_in_range, cgm_meal_response, cgm_hypo_events, etc.; there are also shared profile/onboarding/quickstart/demo helper tools (cgm_profile_get, cgm_profile_update, cgm_onboarding, cgm_quickstart, cgm_demo), and a complete and always up-to-date tool list can be obtained via cgm_agent_manifest.
- Each summary provides two Time-In-Range configurations: Diabetic (70-180 mg/dL, ADA adult diabetes standard) and Metabolic health (70-140 mg/dL, Levels style, for non-diabetic users), presented simultaneously by the agent so users can choose according to their own situation.
- Postprandial response bands (meal response bands), which can be combined with wellness-nourish to automatically calculate "what I ate → what happened".
- Each response carries a provider field to make it easy to identify the data source.
How to use
One-click installation (choose by runtime)
- Delx Wellness for Hermes:
npx -y delx-wellness-hermes setup - Delx Wellness for OpenClaw:
npx -y delx-wellness-openclaw setup
HTTP (v2 stateless)
stdio is used by default. Optional Streamable HTTP—no session id, JSON responses, loopback only:
Environment variables: WELLNESS_CGM_HOST, WELLNESS_CGM_PORT, WELLNESS_CGM_TRANSPORT=http.
60-second trial (mock mode, zero configuration)
No Dexcom token is needed; every tool returns synthetic readings with mock: true, suitable for prototyping.
Live configuration (Dexcom Developer)
The material only mentions that the Dexcom Developer API supports sandbox and production, and does not provide specific configuration steps.
Live configuration (FreeStyle Libre — OTC sensors)
No developer program, no app to build—just use the same email/password as the LibreLinkUp follower app (OTC Libre 2 / Libre 3 sensors work). Share readings in the LibreLink app; accept the invitation in the LibreLinkUp app. After logging in, all glucose tools (cgm_glucose_now, cgm_daily_summary, cgm_time_in_range, cgm_meal_response, cgm_hypo_events, etc.) read from Libre and return the same ADA TIR / GMI / hypoglycemia / postprandial response metrics.
Skill approach
Same package, two entry points. MCP registers tools over stdio/HTTP; when the client does not have MCP, the skill can drive the same tools via CLI: copy skill/SKILL.md to your agent skills directory.
Applicable scenarios
- Let AI agents read and analyze CGM data to calculate metabolic metrics such as time in range, GMI, hypoglycemia events, and postprandial response.
- Combine with wellness-nourish to automatically correlate "what was eaten → how blood glucose changes".
- When no real backend is configured, use mock mode for prototyping andTest.
- For users who want a local-first, free alternative to paid CGM analysis services.
Limitations and caveats
- Libre history limit: about 12 hours per read. The LibreLink Up graph endpoint does not accept start/end parameters and always returns its own fixed tail window of about 12 hours; requesting 24h or 72h will not widen the window, so those extra hours simply do not exist on Libre.
- Every windowed response reports the actual coverage: read hours_covered, not the requested hours / window_hours. GMI (estimated A1C), CV, or time in range calculated from 12 hours is not a 3-day result. Multi-day metrics should use Dexcom, whose v3 API accepts explicit start/end and honors the request. Mock mode synthesizes the full requested span, so it will not be truncated.
- cgm_hypo_events likewise accepts explicit from / to: "no hypoglycemia events" is only a claim about hours_covered. Answering a 3-day question with a live Libre read is actually a 12-hour answer, and the payload states this in hours_covered, observed_window.hours, window_truncated_by_provider, and notes. The denominator of events_per_day is the observed span rather than the requested span, so it is safe in itself, but its surrounding framing is not.
- This mechanism answers "can this provider cover a span this wide?", not "did this read return too little?". For example, a sensor applied two hours ago returns hours_covered: 2, window_truncated_by_provider: false, and empty notes for cgm_daily_summary({ hours: 12 }), because everything is normal and a warning would be a false positive. Empty notes means "no known provider limit was hit", not "the window was fully covered". hours_covered is the only number that states the true span, and it should be compared with hours_requested before reporting any window.
- Credentials are stored only in local environment variables (DEXCOM_ACCESS_TOKEN / LIBRELINKUP_*); the LibreLink Up auth token does not appear in tool output.
- Default mock mode: before a provider is configured, every tool returns synthetic data with mock: true.
- No third-party telemetry: outbound calls go only to your CGM provider (Dexcom, or Abbott LibreLink Up API for Libre). You can run wellness-cgm-mcp doctor to check.
- Version status: v0.4 has shipped FreeStyle Libre via LibreLink Up (OTC sensors). Planned next: refresh token rotation, per-meal history browser (which foods spike your glucose?), threshold alerts (notify the agent when glucose stays > X mg/dL for Y minutes), cross-meal automation with wellness-nourish.
- This project is not medical advice or diagnosis, is not for insulin/medication dosing decisions, and you should follow your clinician. It is 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, and neither company is affiliated with or endorses this project.
Contact and support
- Email: support@delx.ai (general questions, integration help, partnerships)
- Bug reports / feature requests: GitHub Issues
- Updates: @delx369 on X
- Website: wellness.delx.ai