Skip to main content

MCP server for Dexcom CGM glucose data - continuous health intelligence for AI agents

Project description

mcp-server-dexcom

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
  • 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

Tools

Tool Description
get_current_glucose Current glucose reading with trend
get_glucose_readings Historical readings (up to 24h)
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

# Using pip
pip install mcp-server-dexcom

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"],
      "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"

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:00"},
        {"glucose_mg_dl": 135, "timestamp": "2024-01-15T08:05:00"},
        # ... 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


---

## **3. Create `LICENSE`:**

MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


---

## **4. Create `.gitignore`:**

pycache/ *.py[cod] *$py.class .env .venv/ dist/ build/ *.egg-info/ .mypy_cache/ .ruff_cache/


---

## **5. Final project structure:**

mcp-server-dexcom/ ├── pyproject.toml ├── README.md ├── LICENSE ├── .gitignore ├── .env # (not committed) └── src/ └── mcp_server_dexcom/ ├── init.py └── server.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_dexcom_health-0.1.0.tar.gz (68.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_dexcom_health-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_dexcom_health-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_server_dexcom_health-0.1.0.tar.gz
  • Upload date:
  • Size: 68.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_server_dexcom_health-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12514b1eb8639fa09ee02fd1249b8df594c586de5bb5543ef9d4b997f80e1769
MD5 36b266618e108c13c6c22f768f134fb6
BLAKE2b-256 b40f5cc82a3a01c2d2c2936678427112e82a62a1aa3ae03f5ab8ee84dff729c4

See more details on using hashes here.

File details

Details for the file mcp_server_dexcom_health-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_server_dexcom_health-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mcp_server_dexcom_health-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca330611798d9bf3ab4d0bdc73e567944bbf7194b850662b872c21c3996612ab
MD5 dd7c5a7b248e32266287644dd08c1bf5
BLAKE2b-256 7c4b7a06d45586e5d835514be6c05cf38848ff82b7975b76996334e71f84a87a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page