LibreLink MCP Server
Provides access to FreeStyle LibreLink continuous glucose monitoring data, enabling real-time readings, historical analysis, and pattern recognition.
Click on "Deploy 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., "@LibreLink MCP Server what's my current glucose?"
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.
LibreLink MCP Server
A local Model Context Protocol (MCP) server that provides Claude Desktop with secure access to your FreeStyle LibreLink continuous glucose monitoring (CGM) data.
π Features
Real-time glucose monitoring - Get current readings with trend arrows
Historical data analysis - Retrieve glucose history over customizable periods
Comprehensive analytics - Time-in-range, GMI, variability metrics
Pattern recognition - Dawn phenomenon, meal responses, stability analysis
Privacy-first design - All data stays local on your machine
Secure credential management - Local encrypted storage
Cross-platform health integration - Works alongside other health MCP servers
Related MCP server: Diabetes:M MCP Server
π Prerequisites
LibreLink Account: Active FreeStyle LibreLink account with glucose data
Compatible Sensor: FreeStyle Libre 2 or 3 with data sharing enabled
Node.js: Version 18.0.0 or higher
Claude Desktop: For MCP integration
π Quick Start
1. Installation
# Clone the repository
git clone https://github.com/yourusername/librelink-mcp-server.git
cd librelink-mcp-server
# Install dependencies
npm install
# Build the project
npm run build2. Configuration
# Configure your LibreLink credentials
npm run configureYou'll be prompted for:
Email: Your LibreLink account email
Password: Your LibreLink account password
Region: US or EU (based on your location)
Target ranges: Glucose target ranges (default: 70-180 mg/dL)
3. Test Connection
# Test your LibreLink connection
node test-real-connection.js4. Claude Desktop Integration
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"librelink": {
"command": "node",
"args": ["/path/to/librelink-mcp-server/dist/index.js"]
}
}
}5. Restart Claude Desktop
Restart Claude Desktop to load the new MCP server.
π©Έ Usage Examples
Once integrated with Claude Desktop, you can ask:
Basic Glucose Queries
"What's my current glucose level?"
"Show me my glucose readings from the past 6 hours"
"What's my average glucose today?"
Analytics & Insights
"Calculate my time in range for this week"
"Analyze my glucose patterns and trends"
"Do I have dawn phenomenon?"
"How stable are my overnight glucose levels?"
Health Correlations
When combined with other health MCP servers:
"How does my sleep quality affect my glucose control?"
"Compare my glucose variability with my stress levels"
"Show the impact of my supplements on glucose stability"
π Available MCP Tools
Tool | Description | Parameters |
| Real-time glucose reading with trend | None |
| Historical glucose data |
|
| Statistics and time-in-range |
|
| Pattern analysis |
|
| Sensor status and info | None |
| Update LibreLink credentials |
|
| Set target glucose ranges |
|
| Test LibreLink connection | None |
π Sample Output
Current Glucose Reading
{
"current_glucose": 105,
"timestamp": "2025-07-14T21:19:24.000Z",
"trend": "Flat",
"status": "Normal",
"color": "green"
}Glucose Statistics
{
"analysis_period_days": 7,
"average_glucose": 93.46,
"glucose_management_indicator": 5.55,
"time_in_range": {
"target_70_180": 100.0,
"below_70": 0.0,
"above_180": 0.0
},
"variability": {
"standard_deviation": 7.52,
"coefficient_of_variation": 8.04
}
}Trend Analysis
{
"period": "daily",
"patterns": [
"Good postprandial glucose control",
"Excellent overnight glucose stability"
],
"dawn_phenomenon": false,
"meal_response_average": 0,
"overnight_stability": 2.08
}π§ Development
Running Tests
# Run all tests
npm test
# Test MCP protocol
npm run test:mcp
# Test analytics with mock data
npm run test:analytics
# Test with real LibreLink data (requires configuration)
node test-real-data.jsBuilding
# Build TypeScript
npm run build
# Type checking
npm run typecheck
# Development mode
npm run devProject Structure
librelink-mcp-server/
βββ src/
β βββ index.ts # Main MCP server
β βββ librelink-client.ts # LibreLink API wrapper
β βββ glucose-analytics.ts # Analytics and statistics
β βββ config.ts # Configuration management
β βββ configure.ts # CLI configuration tool
β βββ types.ts # TypeScript definitions
βββ config/
β βββ default.json # Default configuration
βββ test-*.js # Test suites
βββ package.json
βββ README.mdπ Security & Privacy
Data Privacy
Local processing only - No data sent to external servers
Your data stays on your machine - Complete privacy control
No analytics or tracking - Zero telemetry
Credential Security
Local storage - Credentials stored in
~/.librelink-mcp/config.jsonFile permissions - Automatically set to user-only access (600)
No cloud storage - Never uploaded or shared
Security Best Practices
# Verify file permissions
ls -la ~/.librelink-mcp/config.json
# Should show: -rw------- (user read/write only)
# Optional: Encrypt config directory
# (Implementation details in documentation)β οΈ Important Notes
LibreLink API Usage
This project uses an unofficial API through reverse engineering
Not affiliated with Abbott or FreeStyle Libre
Use at your own discretion and ensure compliance with LibreLink terms
API may change - community maintained compatibility
Data Sharing Requirements
Ensure your LibreLink app has data sharing enabled
Your sensor must be active and transmitting data
LibreLink account (not LibreLinkUp) credentials required
Sensor Compatibility
β FreeStyle Libre 2
β FreeStyle Libre 3
β FreeStyle Libre 1 (may work, not tested)
π Troubleshooting
Common Issues
"No connections found"
Verify you're using LibreLink (not LibreLinkUp) credentials
Check that data sharing is enabled in your LibreLink app
Ensure your sensor is active and connected
"Authentication failed"
Double-check email and password
Verify correct region (US/EU)
Try logging into LibreLink app to confirm credentials
"Connection timeout"
Check internet connection
Verify LibreLink service status
Try again after a few minutes
Getting Help
Run diagnostics:
node diagnose-account.jsCheck logs: Look for error messages in the console output
Test connection:
node test-real-connection.jsOpen an issue: Include diagnostic output and error messages
π€ Contributing
We welcome contributions! Please:
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes with tests
Follow the existing code style
Submit a pull request
Development Guidelines
TypeScript required - Maintain type safety
Test coverage - Add tests for new features
Documentation - Update README for new functionality
Security first - Never commit credentials or sensitive data
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
libre-link-unofficial-api - Community-maintained LibreLink API client
MCP Protocol - Anthropic's Model Context Protocol
FreeStyle Libre Community - Inspiration and reverse engineering efforts
Open Source Diabetes Projects - Nightscout, OpenAPS, and others
β Support
If this project helps you manage your diabetes with AI assistance, please:
β Star the repository
π Report issues you encounter
π‘ Suggest improvements
π€ Contribute to the project
Disclaimer: This is an unofficial project not affiliated with Abbott or FreeStyle Libre. Use responsibly and in compliance with applicable terms of service. Always consult healthcare professionals for medical decisions.
Available Tools
8 toolsconfigure_credentialsA
Set up or update your LibreLink account credentials for data access. Required before using any glucose reading tools. Credentials are stored securely on your local machine only.
Inputs: email (required), password (required), region.
configure_rangesA
Customize your target glucose range for personalized time-in-range calculations. Standard range is 70-180 mg/dL, but your healthcare provider may recommend different targets based on your individual needs.
Inputs: target_low (required), target_high (required).
get_current_glucoseA
Get the most recent glucose reading from your FreeStyle Libre sensor. Returns current glucose value in mg/dL, trend direction (rising/falling/stable), and whether the value is in target range. Use this for real-time glucose monitoring.
Inputs: no named parameters.
get_glucose_historyA
Retrieve historical glucose readings for analysis. Returns an array of timestamped glucose values. Useful for reviewing past glucose levels, identifying patterns, or checking overnight values. Default retrieves 24 hours of data.
Inputs: hours.
get_glucose_statsA
Calculate comprehensive glucose statistics including average glucose, GMI (estimated A1C), time-in-range percentages, and variability metrics. Essential for diabetes management insights and identifying areas for improvement.
Inputs: days.
get_glucose_trendsA
Analyze glucose patterns including dawn phenomenon (early morning rise), meal responses, and overnight stability. Helps identify recurring patterns that may need attention or treatment adjustments.
Inputs: period.
get_sensor_infoA
Get information about your active FreeStyle Libre sensor including activation date, remaining lifetime, and connection status. Use this to check if sensor is working properly or needs replacement.
Inputs: no named parameters.
validate_connectionA
Test the connection to LibreLink servers and verify your credentials are working. Use this if you encounter errors or after updating credentials. Returns success/failure status.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 8 tools
Most tools have distinct purposes: current glucose, history, stats, trends, sensor info, credentials, ranges, and connection validation. However, get_glucose_stats and get_glucose_trends both perform analysis on glucose data and could be confused by an agent, though their descriptions clarify the difference.
All tool names follow a consistent verb_noun pattern with lowercase and underscores: get_* for data retrieval, configure_* for setup, and validate_connection for testing. No mixed conventions or inconsistent verb styles.
The 8 tools are well-scoped for a glucose monitoring server. Each tool addresses a distinct need: current reading, history, statistics, trends, sensor information, credential setup, range configuration, and connection validation. No redundant or unnecessary tools.
The tool set covers core glucose monitoring workflows: reading current values, retrieving history, calculating stats, analyzing trends, and checking sensor status. Configuration and connection validation are also included. A minor gap is the lack of a tool to filter history by specific time ranges, but the default 24-hour window is likely sufficient for most use cases.
Maintenance
Related MCP Connectors
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Your Apple Health data, food diary and lifts, for ChatGPT, Claude and Gemini. Approved on iPhone.
Your lab results and health record in Claude: trends, retests, meds, conditions and symptoms.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables access to FreeStyle Libre glucose data through Claude Desktop, providing current readings, historical data, statistics, and trend analysis from LibreLinkUp accounts with secure credential storage.101MIT
- AlicenseAqualityBmaintenanceIntegrates Diabetes:M data with Claude Desktop to access glucose readings, insulin data, food diary, and health metrics through natural language conversations.11MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading real-time continuous glucose monitor data from Dexcom sensors via the Share API, allowing Claude to access glucose levels, trends, and statistics.-
- AlicenseAqualityDmaintenanceEnables Claude to access Abbott Freestyle Libre CGM data from multiple providers (LibreView, Terra, Thryve) to retrieve current glucose, history, and summaries via natural language.42MIT