mcp-freestyle
Provides tools to read glucose data from Abbott FreeStyle Libre sensors via LibreLinkUp, including current glucose readings and historical time-in-range data.
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., "@mcp-freestyleWhat's my glucose right now?"
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.
mcp-freestyle
A Model Context Protocol server that reads data from a FreeStyle glucose sensor.
Requirements
This server reads your data from Abbott's cloud, so it only works if your data already gets there. You need all of the following:
A FreeStyle sensor read by the LibreLink app on a phone. If you use a standalone FreeStyle reader instead, nothing is uploaded continuously and this server cannot help you.
LibreLinkUp sharing set up from that LibreLink app to a follower account. The server signs in as the follower.
Node.js ≥ 20, and a working OS keychain (macOS Keychain, Windows Credential Manager, or libsecret on Linux).
The server talks to the unofficial LibreLinkUp / LibreView API, which is not affiliated with or supported by Abbott. It can stop working without notice. See
docs/decisions/0002-data-source-librelinkup.md.
Related MCP server: mcp-server-dexcom-health
Quickstart
1. Install
npm install -g mcp-freestyleOr from a clone, if you'd rather read the code first:
git clone https://github.com/lozit/mcp-freestyle.git && cd mcp-freestyle
npm install && npm run build2. Log in once
npm run login # from a clone
mcp-freestyle-login # if installed globallyYou're prompted for your LibreLinkUp follower e-mail and password. The password is verified by actually authenticating — if it's wrong, or sharing isn't set up, you find out now rather than at the first question you ask Claude. It is then stored in your OS keychain, never in a config file.
The token upstream issues is not stored. It lives ~180 days with no revocation path, so keeping it around would be the bigger risk; the server re-authenticates instead.
At the end, login offers to wire the server into Claude Desktop in one step.
3. Hook it up to Claude
Claude Desktop — one command:
mcp-freestyle-installIt merges an entry into ~/Library/Application Support/Claude/claude_desktop_config.json
(%APPDATA%\Claude\… on Windows) using absolute paths, backing up any existing config
first and leaving your other servers untouched. It refuses to overwrite a config it can't
parse. Quit Claude Desktop fully (⌘Q) and relaunch.
Claude Code:
mcp-freestyle-install code # prints the exact `claude mcp add` commandThe written entry contains only your e-mail — an identifier, not a secret. That is the point of the keychain step: a config file that gets synced, backed up, or pasted into a bug report never holds a credential.
To remove the stored password: mcp-freestyle-logout.
Configuration
Variable | Required | Default | Notes |
| yes | — | Your LibreLinkUp follower account, not the primary LibreLink one |
| no | keychain | Overrides the keychain. For CI or a one-off run — not the expected path |
| no |
| Pinned client version. Upstream rejects stale values — if requests start failing, set this to the current LibreLinkUp app version |
| no |
| |
| no |
| Entry point only; the regional host is discovered at login |
Tools
Tool | What it returns |
| The most recent measurement with the instant it was actually taken, plus the account's own target band. Never presented as a live "now" reading. |
| Readings over the last N hours (max 12) with time-in-range. Always states the range it actually covered and flags |
Upstream holds only ~12 hours of detailed data. Longer horizons are a deferred milestone, not a limitation of these tools.
Development
npm test # Node's built-in test runner — no build step needed
npm run typecheck # strict TypeScript, the project's only lint gate
npm run build # emits dist/Usage
Once connected, ask in plain language:
What's my glucose right now?
How has my time in range been today?
Show me the last 6 hours.
The answers carry the instant each reading was actually taken, the range the data actually covered, and any collection gaps — so a reply about "today" says how much of today it could see. If you ask for more than upstream holds, it tells you what it got instead of quietly answering over less.
Not a substitute for your reader or your app. This is informational only — see the disclaimer above.
Project structure
README.md— this fileCLAUDE.md— instructions for Claude Codedocs/— project documentation (architecture, decisions, learnings)intake/— upstream notes and raw specsdocs/media/— visual assets
Documentation
Vision:
docs/VISION.mdArchitecture:
docs/ARCHITECTURE.mdDecisions:
docs/decisions/Learnings:
docs/LEARNINGS.mdGlossary:
docs/GLOSSARY.mdData model:
docs/DATA_MODEL.mdSecurity & privacy:
docs/SECURITY.mdRoadmap:
docs/ROADMAP.md
Disclaimer
Not a medical device. This project is informational only. Do not use its output to make any treatment decision (dosing, correction, therapy adjustment). Always rely on your official reader/app and your care team.
Contributing
Issues and pull requests are welcome — especially from anyone who can help map the
TrendArrow values (see below), or who hits a LibreLinkUp region or payload shape this
hasn't seen.
npm test # Node's built-in runner, no network — `fetch` is injectable
npm run typecheck # strict TypeScript, the project's only lint gateOne rule that is not negotiable: never commit a real glucose reading, sensor serial, account identifier, or credential — not in a fixture, not in an issue, not in a screenshot. Tests use synthetic fixtures only. A value paired with a timestamp is a health measurement even with no name attached.
Design decisions live in docs/decisions/ and the verified upstream
contract in docs/ARCHITECTURE.md. Read those before changing how
readings are fetched or aggregated — several non-obvious upstream behaviours are documented
there because they cost real debugging to find.
Known gaps
TrendArrowis not translated. Upstream sends an integer; its mapping is undocumented and has only been observed at one value. It is passed through asraw_trend_arrowrather than guessed at — a confidently wrong arrow is worse than none.~12 hours of history, maximum. Upstream ignores any longer request. See ADR 0003 for the long-term plan.
Security
Report vulnerabilities privately to guillaume.ferrari@protonmail.com — see
docs/SECURITY.md.
License
MIT © Guillaume Ferrari
Available Tools
2 toolsget_current_glucoseCurrent glucoseARead-only
Read the most recent glucose measurement from the FreeStyle sensor, with the instant it was actually measured. The value is the latest one upstream holds, not a live reading — always report measured_at rather than calling it 'now'. Informational only: this is not a medical device and must not be used for any treatment decision.
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit for the returned values. Storage is always mg/dL; this only affects display. | mg/dL |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark readOnlyHint=true, but the description adds critical behavioral context: the value is not a live reading, the measured_at timestamp must be used, and the tool is informational only and not for medical treatment decisions. This goes well beyond the structured annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, each serving a distinct purpose: stating what the tool does, warning about the timestamp semantics, and adding the safety disclaimer. No redundant or vague wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with no output schema, the description covers the essential semantics: the return includes the value and measured_at, the data may be stale, and there is a safety caveat. This is sufficient for an agent to invoke and interpret the result correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully describes the single 'unit' parameter with enum, default, and meaning ('Storage is always mg/dL; this only affects display'). The description does not add any parameter-specific details, so baseline 3 applies per the rubric.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Read' and the resource 'most recent glucose measurement from the FreeStyle sensor', with the additional detail 'with the instant it was actually measured'. This distinguishes it from the sibling tool get_glucose_history, which presumably returns historical data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear context on when to use the tool (to get the latest upstream value) and gives important usage guidance: do not treat it as a live reading and always report measured_at rather than 'now'. However, it does not explicitly mention get_glucose_history or state when not to use this tool, so it lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_glucose_historyGlucose history and time in rangeARead-only
Glucose readings over the last N hours (max 12), with time-in-range computed against the account's own target band. Upstream holds only about 12 hours of detailed data and ignores any longer request, so the response always states the range it actually covered and sets truncated when that is less than asked — report that range, never the one requested. Collection gaps are listed separately and are not interpolated across; a percentage over a series with gaps describes only the covered time. Informational only: not a medical device, and not a basis for any treatment decision. This is not an HbA1c or GMI estimate — those need weeks of data.
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit for the returned values. Storage is always mg/dL; this only affects display. | mg/dL |
| hours | No | Hours of history to cover, 1 to 12. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotation readOnlyHint already signals a safe read, but the description goes further by disclosing the upstream 12-hour limit, the `truncated` flag behavior, and the instruction to report the actually covered range. It also details how collection gaps are handled, which is critical for interpreting percentages. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is around 120 words but every sentence adds necessary context: purpose, truncation behavior, gap handling, and medical disclaimer. It's front-loaded with the core function and then layers caveats efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description covers the critical behavioral details: truncation, range reporting, gap handling, and the non-medical nature. It gives enough for the agent to interpret responses correctly, though it doesn't enumerate all return fields.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds value by explaining that hours over 12 are ignored and that the response always reports the actual covered range, which affects how the `hours` parameter result should be interpreted. It doesn't add much about `unit`, but the schema already explains display-only conversion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Glucose readings over the last N hours (max 12)', clearly specifying the resource (glucose history) and temporal scope. It distinguishes from the sibling 'get_current_glucose' by focusing on historical data and adds the unique capability of time-in-range computation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It implies when to use (when historical readings are needed) without naming the sibling alternative, but explicitly states when not to use it: not for treatment decisions, not as an HbA1c/GMI estimate, and notes the 12-hour limit. This provides clear exclusions, though no named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.3- First observed
get_current_glucose - First observed
get_glucose_history
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one returns the most recent glucose reading, while the other returns a historical series over a requested time range. There is no overlap or ambiguity between them.
Both tool names follow the same 'get_' prefix followed by a descriptive noun (current_glucose, glucose_history). The naming pattern is consistent and predictable.
With only two tools, the server feels thin, but the domain is narrow (reading glucose data from a sensor). The two tools cover the essential operations, making the count borderline but not unreasonable.
The server provides access to both current and historical glucose data, which covers the core read-only functionality for the domain. Minor gaps exist (e.g., no health/sensor status), but the available tools are sufficient for the stated purpose.
Maintenance
Related MCP Connectors
MCP server for Withings health data — sleep, activity, heart, and body metrics.
MCP server wrapping the Tesla Fleet API and TeslaMate API
MCP server for medicare-coverage
Remote MCP server for training, nutrition, wellness, and performance data with OAuth 2.0.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server that connects Claude to your personal Dexcom CGM (Continuous Glucose Monitor) for assistive diabetes management intelligence.MIT
- AlicenseAqualityDmaintenanceMCP server for Dexcom CGM glucose data, enabling AI agents to access and analyze continuous glucose monitor readings for health intelligence applications.10MIT
- AlicenseAqualityDmaintenanceProvides real-time Dexcom CGM glucose data to MCP clients via the unofficial Share API, enabling queries like current glucose and recent readings within the last 24 hours.2MIT
- AlicenseAqualityAmaintenanceLocal-first CGM MCP for AI agents: Dexcom Developer API and FreeStyle Libre via LibreLink Up.1951 npm1MIT