MCP server for Nightscout CGM remote monitoring — Type 1 Diabetes management
Server has 11 tools with consistent naming (verb_noun pattern) and reasonable descriptions (avg ~150 chars). All tools are READ_ONLY except log_treatment (WRITE). Input schemas are present for most tools with type declarations. However, parameter descriptions are sparse or missing for several tools (e.g., get_recent_glucose 'count' param lacks detail on units/behavior). Output schemas are not formally documented, responses are inferred from code. Error handling is minimal; most tools return raw dicts without recovery guidance. No tool annotations (readOnlyHint/destructiveHint) present. Composition is sound (single responsibility per tool), but some tools could benefit from richer parameter constraints and output documentation.
Calculate Time-In-Range (TIR) statistics for the last N hours. Provides percentage of time in range, below range, and above range.
Get the most recent CGM glucose reading with value (sgv), direction/trend arrow, noise level, and timestamp. Returns a single entry.
Get all Nightscout profiles. Each profile contains: - Basal rates schedule (units/hour by time of day) - Insulin Sensitivity Factor (ISF) schedule - Insulin-to-Carb Ratio (IC/ICR) schedule - Target BG range schedule - DIA (Duration of Insulin Action) - Timezone and units These are the core settings that control insulin dosing calculations.
Get detailed glucose statistics for a specific day: average, median, standard deviation, min, max, time in range, and hourly averages.
Get raw CGM glucose readings for a short date range. For long-term ranges, prefer get_glucose_stats_batch() to avoid many repeated calls and client-side rate limits.
Output schemas not formally documented. Tools return dicts inferred from code (e.g., get_current_glucose returns {glucose_mgdl, direction, trend, noise, timestamp, device, type}), but no JSON Schema or structured type hints visible in tool registration. LLMs cannot reliably plan downstream calls without knowing response structure.
Parameter descriptions lack detail on constraints and units. E.g., 'count' param in get_recent_glucose says 'Number of entries to return (default 36 = ~3 hours)' but does not specify min/max bounds or what happens if count exceeds API limits. 'hours' in calculate_time_in_range lacks min/max (e.g., 1 - 365).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
Estimate current Insulin on Board (IOB) from recent boluses and the latest device status. Returns the latest loop/pump device status which typically includes IOB calculation from the loop algorithm.
Get recent CGM glucose readings. Default 36 entries (~3 hours at 5-min intervals).
Get recent treatments (insulin boluses, carb entries, temp basals, notes, etc.).
Get treatments for a specific date range.
Log a new treatment entry to Nightscout.
Get Nightscout server status including version, settings, enabled plugins, thresholds (urgent high, high, low, urgent low), units (mg/dL or mmol/L), and other server configuration.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All 10 READ_ONLY tools lack readOnlyHint=true; log_treatment (WRITE) lacks destructiveHint=true. Annotations help LLMs reason about safety and retry logic.
Error handling is minimal. Tools return raw error dicts (e.g., {"error": "No glucose entries found"}) without recovery guidance. Per pattern:recovery-guide, errors should suggest next steps (e.g., 'No glucose data found. Ensure Nightscout server is running and API token is valid.').
log_treatment parameter 'event_type' description is truncated ('E...'). Full enum of valid event types (Correction Bolus, Meal Bolus, Carb Correction, Snack Bolus, BG Check, Note, etc.) should be listed or linked. LLMs cannot infer valid values from truncated text.