Skip to main content
Glama
mcp-server-dexcom-health

mcp-server-dexcom-health

mcp-server-dexcom-health

MCP server for Dexcom CGM glucose data. Enables AI agents to access and analyze continuous glucose monitor data for health intelligence applications.

Features

  • Real-time glucose monitoring - Current readings with trend analysis

  • Historical data access - Up to 24 hours of glucose history

  • Time window queries - Query specific time ranges (e.g., "4-3 hours ago")

  • Clinical analytics - Time-in-range, GMI, CV%, AGP reports

  • Episode detection - Automatic hypo/hyper event identification with detailed context

  • Time-block analysis - Identify patterns by time of day

  • Persistence layer support - Pass external data for long-term analysis

Related MCP server: Dexcom MCP Server

Tools

Tool

Description

get_current_glucose

Current glucose reading with trend

get_glucose_readings

Historical readings with optional time windows

get_statistics

TIR, CV%, GMI, and other metrics

get_status_summary

Complete "how am I doing?" summary

detect_episodes

Find hypo/hyper episodes

get_episode_details

Deep analysis of each episode

analyze_time_blocks

Patterns by time of day

check_alerts

Real-time threshold alerts

export_data

Export for external storage

get_agp_report

Clinical AGP report

Installation

# Using uvx (recommended)
uvx mcp-server-dexcom-health

# Using pip
pip install mcp-server-dexcom-health

Configuration

Set environment variables:

Variable

Required

Description

DEXCOM_USERNAME

Yes

Dexcom username, email, or phone (+1234567890)

DEXCOM_PASSWORD

Yes

Dexcom password

DEXCOM_REGION

No

us (default), ous (outside US), or jp (Japan)

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "dexcom": {
      "command": "uvx",
      "args": ["mcp-server-dexcom-health"],
      "env": {
        "DEXCOM_USERNAME": "your_username",
        "DEXCOM_PASSWORD": "your_password",
        "DEXCOM_REGION": "us"
      }
    }
  }
}

Usage Examples

Basic usage with Claude

"What's my current glucose?"

"How was my overnight control?"

"Did I have any lows today?"

"Give me my statistics for the last 12 hours"

"What about the hour before that?" (follow-up queries work!)

Time Window Queries

Query specific time ranges using start_minutes and end_minutes:

# Last 3 hours (standard)
get_glucose_readings(minutes=180)

# Specific window: 4 hours ago to 3 hours ago
get_glucose_readings(start_minutes=240, end_minutes=180)

# Stats for 6-5 hours ago
get_statistics(start_minutes=360, end_minutes=300)

# Episodes between 8-4 hours ago
detect_episodes(start_minutes=480, end_minutes=240)

Supported tools: get_glucose_readings, get_statistics, detect_episodes, export_data

Persistence Layer Integration

Tools that analyze data accept an optional data parameter for external data sources:

# Pass your own historical data
result = get_statistics(
    data=[
        {"glucose_mg_dl": 120, "timestamp": "2024-01-15T08:00:00Z"},
        {"glucose_mg_dl": 135, "timestamp": "2024-01-15T08:05:00Z"},
        # ... more readings
    ]
)

This enables building long-term analytics by storing data externally and passing it back for analysis.

Requirements

  • Python 3.10+

  • Active Dexcom Share session (requires Dexcom mobile app with Share enabled)

  • At least one follower configured in Dexcom Share

License

MIT

Available Tools

10 tools
analyze_time_blocksA
Analyze glucose by time of day - find when problems happen.

Breaks down data into overnight (00-06), morning (06-12), 
afternoon (12-18), and evening (18-24).

Args:
    minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
    low: Low threshold in mg/dL (default 70)
    high: High threshold in mg/dL (default 180)
    data: Optional external readings for persistence layer integration.

Inputs: low, data, high, minutes.

check_alertsA
Check current glucose against alert thresholds.

Simple threshold check for real-time alerting.

Args:
    urgent_low: Urgent low threshold (default 54)
    low: Low threshold (default 70)
    high: High threshold (default 180)
    urgent_high: Urgent high threshold (default 250)

Inputs: low, high, urgent_low, urgent_high.

detect_episodesA
Detect hypoglycemic and hyperglycemic episodes.

Args:
    minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
    start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
    end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
    low: Low threshold in mg/dL (default 70)
    high: High threshold in mg/dL (default 180)
    data: Optional external readings for persistence layer integration.
          Schema: [{"glucose_mg_dl": int, "timestamp": "ISO-8601"}, ...]

Examples:
    detect_episodes(minutes=180)  # Episodes in last 3 hours
    detect_episodes(start_minutes=240, end_minutes=180)  # Episodes 4h to 3h ago

Inputs: low, data, high, minutes, +2 more.

export_dataA
Export glucose readings for persistence layer integration.

Returns clean, consistent data structure for storage in external databases.
Call periodically to build long-term data history.

Args:
    minutes: Time period to export (1-1440, default 1440 = 24h)
    start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
    end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
    format: Export format - "json" or "csv" (default "json")
    data: Optional external readings to format/export instead of fetching.

Examples:
    export_data(minutes=180)  # Export last 3 hours
    export_data(start_minutes=240, end_minutes=180)  # Export 4h to 3h ago

Inputs: data, format, minutes, end_minutes, +1 more.

get_agp_reportA
Generate an Ambulatory Glucose Profile (AGP) report.

AGP is the clinical standard used by endocrinologists. Shows glucose
percentiles by time of day to identify patterns.

Args:
    minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
    data: Optional external readings for persistence layer integration.

Inputs: data, minutes.

get_current_glucoseA
Get the current glucose reading.

Returns the most recent glucose value, trend direction, 
and timestamp. Reading must be within the last 10 minutes.

Inputs: no named parameters.

get_episode_detailsA
Get detailed context for each glucose episode - what led to it,
how severe it was, and how recovery went.

Args:
    minutes: Time period if using Dexcom API (1-1440, default 1440 = 24h)
    low: Low threshold in mg/dL (default 70)
    high: High threshold in mg/dL (default 180)
    data: Optional external readings for persistence layer integration.

Inputs: low, data, high, minutes.

get_glucose_readingsA
Get historical glucose readings.

Args:
    minutes: Number of minutes to look back from now (1-1440, default 60)
    start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
    end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
    max_count: Maximum readings to return (1-288, default 288)
    data: Optional external readings for persistence layer integration.

Examples:
    get_glucose_readings(minutes=60)  # Last hour
    get_glucose_readings(start_minutes=240, end_minutes=180)  # 4h ago to 3h ago
    get_glucose_readings(start_minutes=360, end_minutes=300)  # 6h ago to 5h ago

Note: When using start_minutes/end_minutes, we fetch from start_minutes back
and filter to the window. start_minutes should be > end_minutes (further back in time).

Inputs: data, minutes, max_count, end_minutes, +1 more.

get_statisticsA
Get glucose statistics for a time period.

Args:
    minutes: Number of minutes to analyze (1-1440, default 1440 = 24h)
    start_minutes: Window start - minutes ago from now (e.g., 240 = 4 hours ago)
    end_minutes: Window end - minutes ago from now (e.g., 180 = 3 hours ago)
    low: Low threshold in mg/dL (default 70)
    high: High threshold in mg/dL (default 180)
    data: Optional external readings for persistence layer integration.

Examples:
    get_statistics(minutes=180)  # Stats for last 3 hours
    get_statistics(start_minutes=240, end_minutes=180)  # Stats for 4h to 3h ago

Inputs: low, data, high, minutes, +2 more.

get_status_summaryA
Get a complete status summary - the "how am I doing?" tool.

Returns current glucose, recent trend, stats for the specified period,
any alerts, and a plain-English summary. Perfect for quick check-ins,
clinical dashboards, or health intelligence apps.

Args:
    minutes: Time period for context stats (1-1440, default 180 = 3 hours)

Returns:
    - current: Real-time glucose, trend, arrow
    - period_stats: Average, min, max, time-in-range for the period
    - alerts: Any recent lows/highs detected
    - summary: Plain-English interpretation with urgency level

Inputs: minutes.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools target distinct functions (current, history, stats, summary, episodes, details, time analysis, alerts, export, AGP). However, get_status_summary overlaps with get_statistics and get_current_glucose, and get_episode_details overlaps with detect_episodes, though descriptions clarify the different purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., get_current_glucose, detect_episodes, analyze_time_blocks, check_alerts, export_data). No mixed conventions or vague verbs.

    Tool Count5/5

    10 tools is well-scoped for a CGM health analytics server. Each tool serves a distinct analytical or data-access purpose, and the count fits the typical 3-15 range comfortably.

    Completeness4/5

    The server covers current readings, historical data, statistics, summaries, episode detection/details, time-of-day analysis, alert checks, data export, and AGP reports. Minor gaps exist such as no tool for managing alert thresholds or user preferences, but for a read-only glucose analyzer, the coverage is strong.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      A local-first MCP server that enables AI agents to read user-authorized Google Health API v4 data from Fitbit, Pixel Watch, and partners via OAuth, with tokens never leaving the machine.
      26
      875 npm
      84
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      A Model Context Protocol (MCP) server that connects Claude to your personal Dexcom CGM (Continuous Glucose Monitor) for assistive diabetes management intelligence.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Open-source MCP server for MetricBridge (formerly Health Export AI). 16 tools and 22 prompts let any MCP agent query 190 Apple Health metrics from files on your own machine. The server is read-only, has zero dependencies and makes zero network calls.
      22
      412 npm
      11
      MIT