血糖监测数据分析服务

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

  • by IshaanRSharma
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 IshaanRSharma/mcp-server-dexcom-health

使用说明

mcp服务器dexcom运行状况

用于Dexcom CGM葡萄糖数据的MCP服务器。使AI代理能够访问和分析健康智能应用程序的连续葡萄糖监测数据。

特性

  • 实时血糖监测 -当前读数与趋势分析
  • 历史数据访问 -长达24小时的葡萄糖病史
  • 时间窗口查询 -查询特定时间范围(例如,“4-3小时前”)
  • 临床分析 -范围内时间、GMI、CV%、AGP报告
  • 事件检测 -具有详细上下文的自动低/高事件识别
  • 时间块分析 -按时间识别模式
  • 持久层支持 -传递外部数据进行长期分析

工具

工具 说明
get_current_glucose 当前葡萄糖读数趋势
get_glucose_readings 具有可选时间窗口的历史读数
get_statistics TIR、CV%、GMI和其他指标
get_status_summary 完成“我过得怎么样?”总结
detect_episodes 查找低/高发作
get_episode_details 对每一集进行深入分析
analyze_time_blocks 按时间划分的模式
check_alerts 实时阈值警报
export_data 导出以供外部存储
get_agp_report 临床AGP报告

安装

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

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

配置

设置环境变量:

变量 必填 描述
DEXCOM_USERNAME 是 Dexcom用户名、电子邮件或电话(+1234567890)
DEXCOM_PASSWORD 是 Dexcom密码
DEXCOM_REGION 没有 us (默认), ous (美国境外),或 jp (日本)

克劳德桌面版

添加到您的 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"
      }
    }
  }
}

使用示例

Claude的基本用法

“我现在的血糖是多少?”

“我一夜之间的控制力怎么样?”

“我今天情绪低落吗?”

“给我过去12小时的统计数据”

“那之前的一个小时呢?”(后续查询有效!)

时间窗口查询

使用查询特定时间范围 start_minutes 和 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)

支持的工具: get_glucose_readings, get_statistics, detect_episodes, export_data

持久层集成

分析数据的工具接受可选 data 外部数据源的参数:

# 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
    ]
)

这使得通过在外部存储数据并将其传递回进行分析来构建长期分析成为可能。

需求

  • Python 3.10+
  • 活动Dexcom共享会话(需要启用共享的Dexcom移动应用程序)
  • Dexcom Share中至少配置了一个关注者

许可证

麻省理工学院