Skip to main content
Glama
nightscout-mcp
by vgmakeev

Nightscout MCP Server

Access your CGM data from Nightscout in AI assistants like Claude, Cursor, etc.

Quick Start

uvx --from git+https://github.com/vgmakeev/nightscout-mcp nightscout-mcp

Related MCP server: Dexcom G7 MCP Server

Setup

Add to your MCP config (e.g. ~/.cursor/mcp.json):

{
  "mcpServers": {
    "nightscout": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/vgmakeev/nightscout-mcp", "nightscout-mcp"],
      "env": {
        "NIGHTSCOUT_URL": "https://YOUR_TOKEN@your-site.nightscout.com"
      }
    }
  }
}

Configuration

Variable

Description

Default

NIGHTSCOUT_URL

Nightscout URL (can include token: https://token@site.com)

Required

NIGHTSCOUT_API_SECRET

API secret (optional if using token in URL)

-

GLUCOSE_UNITS

Display units: mmol or mgdl

mmol

GLUCOSE_LOW

TIR lower bound (auto-detects units: <30 = mmol)

3.9 (70 mg/dL)

GLUCOSE_HIGH

TIR upper bound (auto-detects units: <30 = mmol)

7.8 (140 mg/dL)

Example with custom TIR range

{
  "nightscout": {
    "command": "uvx",
    "args": ["--from", "git+https://github.com/vgmakeev/nightscout-mcp", "nightscout-mcp"],
    "env": {
      "NIGHTSCOUT_URL": "https://TOKEN@your-site.nightscout.com",
      "GLUCOSE_UNITS": "mmol",
      "GLUCOSE_LOW": "4.0",
      "GLUCOSE_HIGH": "10.0"
    }
  }
}

Tools

Tool

Description

glucose_current

Current glucose reading

glucose_history

History for last N hours

analyze

TIR, CV, HbA1c for any date range

analyze_monthly

Monthly breakdown for a year

treatments

Insulin and carbs log

status

Nightscout server status

devices

Pump, CGM, uploader status

Examples

Ask your AI assistant:

  • "What's my current glucose?"

  • "Show my glucose history for the last 6 hours"

  • "Analyze my glucose control for December 2025"

  • "Give me a monthly breakdown for 2025"

License

MIT

Available Tools

7 tools
analyzeA

Analyze glucose patterns for any date range. Supports dates (YYYY-MM-DD), months (YYYY-MM), or relative periods (7d, 2w, 3m, 1y)

Inputs: to, from, tirGoal.

analyze_monthlyA

Analyze glucose data broken down by month. Great for yearly reviews.

Inputs: year (required), tirGoal, toMonth, fromMonth.

devicesB

Get status of connected devices (pump, CGM, phone)

Inputs: count.

glucose_currentA

Get the current blood glucose reading from Nightscout

Inputs: no named parameters.

glucose_historyB

Get blood glucose history for a specified time period

Inputs: count, hours.

statusA

Get Nightscout server status and settings

Inputs: no named parameters.

treatmentsC

Get recent treatments (insulin doses, carbs, etc.)

Inputs: count, hours.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Tools are mostly distinct, but 'glucose_history' and 'analyze' both support time ranges, which could cause misselection. However, descriptions clarify that one returns raw data and the other analyzes patterns.

    Naming Consistency3/5

    Tool names mix noun-based (glucose_current, treatments) and verb-based (analyze) conventions. There's no consistent verb_noun pattern, though names are still readable and predictable.

    Tool Count5/5

    7 tools is a well-scoped set for a Nightscout server, covering monitoring, analysis, and status without bloat.

    Completeness4/5

    The surface covers current glucose, history, analysis, treatments, devices, and status—core Nightscout interactions. Minor gaps like write operations or detailed alerts exist, but the read-only monitoring workflow is complete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to query glucose data from health storage APIs, providing natural language access to glucose readings, trends, and statistics for diabetes management and health monitoring.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects AI assistants to Nightscout for real-time glucose monitoring, analysis, and treatment logging, enabling natural language interaction with CGM data.
      7
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Bridges your Nightscout CGM data with AI assistants via the Model Context Protocol, enabling natural language queries about glucose readings, treatments, statistics, and pattern analysis.
      21
      GPL 3.0