Dexcom MCP Server
Uses Turso as a remote database for storing Dexcom access tokens and glucose data for persistence across sessions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dexcom MCP ServerWhat's my latest glucose reading?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dexcom MCP Server
A Model Context Protocol (MCP) server that connects Claude to your personal Dexcom CGM (Continuous Glucose Monitor) for assistive diabetes management intelligence.
๐ฏ Prime Directive
This is a human-in-the-loop assistive intelligence system:
โ Claude analyzes, reasons, and recommends
โ User decides and acts
โ No automation, no control, no silent changes
Related MCP server: Garmin MCP Server
๐ Features
Real-time CGM Data: Fetch current and historical glucose readings
Trend Analysis: Analyze patterns, post-meal spikes, and overnight stability
Event Logging: Track insulin doses, carbohydrate intake, and exercise
Adaptive Modeling: Learn how your metabolism behaves over time
Predictive Intelligence: Estimate glucose impact of insulin and carbs
Visualizations: Generate charts and AGP (Ambulatory Glucose Profile)
Parameter Drift Detection: Identify when your insulin sensitivity changes
๐ Prerequisites
Node.js 18+
Dexcom Developer API credentials (apply here)
A Dexcom CGM device actively transmitting data
๐ง Installation
Clone this repository:
git clone https://github.com/cykj40/dexcom-mcp-server.git cd dexcom-mcp-serverInstall dependencies:
npm installConfigure environment variables:
cp .env.example .envEdit
.envand fill in your credentials:DEXCOM_CLIENT_ID- From Dexcom Developer PortalDEXCOM_CLIENT_SECRET- From Dexcom Developer PortalDEXCOM_REDIRECT_URI- OAuth redirect URITURSO_DATABASE_URL- Turso database URL for token and glucose persistenceDEXCOM_ACCESS_TOKEN/DEXCOM_REFRESH_TOKEN- Optional one-time bootstrap only when Turso has no tokens
Build the project:
npm run build
๐ฎ Usage
Running the Server Directly
npm startIntegrating with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"dexcom": {
"command": "node",
"args": ["/absolute/path/to/dexcom-mcp-server/dist/index.js"],
"env": {
"DEXCOM_CLIENT_ID": "your_client_id",
"DEXCOM_CLIENT_SECRET": "your_client_secret",
"DEXCOM_REDIRECT_URI": "your_redirect_uri",
"TURSO_DATABASE_URL": "libsql://your-db.turso.io",
"TURSO_AUTH_TOKEN": "your_turso_auth_token"
}
}
}
}Restart Claude Desktop, and you'll have access to all Dexcom tools.
๐ ๏ธ Available Tools
Glucose Reading Tools
get_latest_glucose- Get current glucose with trendget_glucose_range- Get readings within a time rangeget_daily_summary- Daily glucose statisticsget_glucose_statistics- Comprehensive stats for any period
Analysis Tools
analyze_trends- Analyze patterns over days/weekscompare_expected_vs_actual- Compare predictions to realitydetect_parameter_drift- Identify if ISF/ICR has changed
Event Logging Tools
log_insulin- Log insulin doselog_carbs- Log carbohydrate intakelog_exercise- Log physical activityget_event_timeline- View all events with glucose context
Chart Tools
generate_chart- Create visualizations (timeline, daily, weekly, AGP)
Modeling Tools
get_baseline_parameters- View your ISF, ICR, and basal dosepredict_glucose_impact- Predict effect of insulin or carbsget_adaptive_insights- See how predictions compare to reality
๐ Database
All data is stored locally in SQLite at ./data/dexcom.db:
Glucose readings (from Dexcom API and Share API)
Insulin, carb, and exercise events
Adaptive observations (expected vs actual outcomes)
No data is shared with third parties.
๐ Security
Environment variables only: Never hardcode credentials
Local storage: All data stays on your machine
OAuth 2.0: Uses official Dexcom Developer API
Read-only device access: Cannot modify pump settings
๐ฅ Medical Disclaimer
This is an assistive tool, not medical advice.
All recommendations are based on your personal data
You are the final authority on all diabetes management decisions
Never rely solely on this tool for treatment decisions
Consult your healthcare provider before changing insulin doses
This is not FDA-approved medical software
๐งช Development
Run in Development Mode
npm run devBuild
npm run buildProject Structure
dexcom-mcp-server/
โโโ src/
โ โโโ config/ # Environment validation
โ โโโ db/ # SQLite database layer
โ โโโ services/ # Business logic
โ โโโ tools/ # MCP tool definitions
โ โโโ types/ # TypeScript types
โ โโโ index.ts # Server entrypoint
โโโ data/ # SQLite database (gitignored)
โโโ dist/ # Compiled JavaScript๐ License
ISC License - See LICENSE file for details
๐ค Contributing
This is a personal diabetes management tool. If you'd like to adapt it for your own use:
Update baseline parameters in
src/types/index.tsAdjust target ranges if needed
Modify modeling algorithms to match your physiology
๐ง Support
For issues or questions, please open a GitHub issue.
Remember: This tool learns from your patterns but never acts autonomously. You decide, you act, you control.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cykj40/dexcom-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server