Mcp Freestyle

io.github.lozit由 GitHub 账号 lozit 发布v0.1.4更新于 Oct 24, 2026

Read-only FreeStyle glucose sensor access via LibreLinkUp. Not a medical device.

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

只读 MCP 服务器,让助手通过 LibreLinkUp 云端获取 FreeStyle 血糖传感器的当前与近期读数。

可以做什么
读取最近一次血糖测量值,附带实际测量时间与该账户的目标范围,且从不当作实时读数呈现。获取最近 N 小时(最多 12 小时)的读数,含范围内时间、实际覆盖的时间范围、截断标记以及列出的采集中断。用自然语言回答关于当前血糖、今日范围内时间或最近几小时的问题。
适用场景
适合已通过 LibreLink 应用将 FreeStyle 传感器数据共享给 LibreLinkUp 关注者账户、并希望助手汇总近期血糖读数与范围内时间的用户。使用独立读取器的人不适用,因为数据不会持续上传。
运行要求
以 npx 运行的本地进程;需要 Node.js 20 或更高版本以及可用的操作系统钥匙串(macOS 钥匙串、Windows 凭据管理器或 Linux 上的 libsecret)。需要由 LibreLink 应用读取的 FreeStyle 传感器,并已通过 LibreLinkUp 共享给关注者账户。必须设置 LIBRELINKUP_EMAIL;可选 LIBRELINKUP_PASSWORD、LIBRELINKUP_VERSION、LIBRELINKUP_PRODUCT 和 LIBRELINKUP_BASE_URL。需要访问 Abbott 云端的网络。仅限桌面端。
安装前请注意
登录的是非官方、不受支持的 LibreLinkUp/LibreView API,可能随时失效。登录命令会把关注者账户密码存入操作系统钥匙串;LIBRELINKUP_PASSWORD 会覆盖钥匙串并把凭据写入配置文件,建议优先使用钥匙串。上游令牌不会被保存,服务器会重新认证。非医疗器械:不要用其输出做给药或治疗决策。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Freestyle,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-freestyle

[CI] [npm] [License: MIT] [Node: ≥20] [Not a medical device]

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.

Quickstart

1. Install

bash
npm install -g mcp-freestyle

Or from a clone, if you'd rather read the code first:

bash
git clone https://github.com/lozit/mcp-freestyle.git && cd mcp-freestylenpm install && npm run build

2. Log in once

bash
npm run login          # from a clonemcp-freestyle-login    # if installed globally

You'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:

bash
mcp-freestyle-install

It 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:

bash
mcp-freestyle-install code   # prints the exact `claude mcp add` command

The 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

VariableRequiredDefaultNotes
LIBRELINKUP_EMAILyes—Your LibreLinkUp follower account, not the primary LibreLink one
LIBRELINKUP_PASSWORDnokeychainOverrides the keychain. For CI or a one-off run — not the expected path
LIBRELINKUP_VERSIONno4.16.0Pinned client version. Upstream rejects stale values — if requests start failing, set this to the current LibreLinkUp app version
LIBRELINKUP_PRODUCTnollu.android
LIBRELINKUP_BASE_URLnohttps://api.libreview.ioEntry point only; the regional host is discovered at login

Tools

ToolWhat it returns
get_current_glucoseThe most recent measurement with the instant it was actually taken, plus the account's own target band. Never presented as a live "now" reading.
get_glucose_historyReadings over the last N hours (max 12) with time-in-range. Always states the range it actually covered and flags truncated when upstream returned less than asked. Collection gaps are listed, never interpolated across.

Upstream holds only ~12 hours of detailed data. Longer horizons are a deferred milestone, not a limitation of these tools.

Development

bash
npm test          # Node's built-in test runner — no build step needednpm run typecheck # strict TypeScript, the project's only lint gatenpm 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 file
  • CLAUDE.md — instructions for Claude Code
  • docs/ — project documentation (architecture, decisions, learnings)
  • intake/ — upstream notes and raw specs
  • docs/media/ — visual assets

Documentation

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.

bash
npm test          # Node's built-in runner, no network — `fetch` is injectablenpm run typecheck # strict TypeScript, the project's only lint gate

One 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

  • TrendArrow is not translated. Upstream sends an integer; its mapping is undocumented and has only been observed at one value. It is passed through as raw_trend_arrow rather 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 [email protected] — see docs/SECURITY.md.

License

MIT © Guillaume Ferrari

来源:README.md,提交 8eb5db1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.4最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分