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 分