npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

libreviewmcp

v0.1.1

Published

Model Context Protocol server for LibreView / FreeStyle Libre glucose data (via the LibreLinkUp API)

Downloads

66

Readme

libreviewmcp

A Model Context Protocol (MCP) server that exposes FreeStyle Libre glucose data to MCP clients (Claude Desktop, Claude Code, etc.) via the unofficial LibreLinkUp API.

Ask your assistant things like "What's my current glucose?", "Show my readings for the last few hours" or "What's my time-in-range today?".

⚠️ Unofficial & not a medical device. This project uses the reverse-engineered LibreLinkUp API. It is not affiliated with or endorsed by Abbott. Do not use it for treatment decisions — always rely on your official reader/app.

Tools

| Tool | Description | | --- | --- | | list_connections | List all patients sharing data with your LibreLinkUp account (returns their patientId and name). | | get_current_glucose | Latest reading: value, trend direction (rising/falling/stable), high/low flags, timestamp. | | get_glucose_history | Recent history (~12h, as provided by LibreLinkUp) as a time series. Optional limit. | | get_glucose_stats | Average, min/max, standard deviation, estimated HbA1c (GMI), and time-in-range percentages. |

All tools accept an optional unit (mgdl or mmol) and, where relevant, a patientId. When your account has exactly one connection, patientId can be omitted.

Prerequisites

  1. Install the LibreLinkUp mobile app and create an account.
  2. Have the FreeStyle Libre user (the patient) share their glucose data with your LibreLinkUp account and accept the invitation. The MCP server reads data through that share — the same way the app does.

Quick install (macOS)

Once the package is published to npm, macOS users can configure Claude Desktop with a single command — no clone, no build. It checks for Node.js, asks for your LibreLinkUp credentials, and wires up claude_desktop_config.json to run the server via npx:

curl -fsSL https://raw.githubusercontent.com/zaengerlein/libreviewmcp/main/install.sh | bash

Requires Node.js ≥ 18 (the script tells you how to install it if missing). Your credentials are stored in plaintext in the Claude Desktop config (as with any MCP server); the file is locked down to 600. It's good practice to read a script before piping it into your shell — see install.sh.

The installer speaks English by default and German when the macOS system language is German; force it with LIBRE_LANG=en or LIBRE_LANG=de.

To remove it again:

curl -fsSL https://raw.githubusercontent.com/zaengerlein/libreviewmcp/main/uninstall.sh | bash

Setup (manual / development)

npm install
npm run build

Provide your LibreLinkUp credentials via environment variables (see .env.example):

| Variable | Required | Description | | --- | --- | --- | | LIBRE_EMAIL | ✅ | LibreLinkUp account email. | | LIBRE_PASSWORD | ✅ | LibreLinkUp account password. | | LIBRE_REGION | | Region code (e.g. de, eu, us) to skip the login redirect. Auto-detected if omitted. | | LIBRE_UNIT | | Default output unit: mgdl (default) or mmol. |

Usage with Claude Desktop / Claude Code

Add the server to your MCP client configuration. Once the package is on npm, the simplest entry uses npx (this is what the quick install writes for you). Use the absolute path to npx so the client finds it regardless of its PATH — run command -v npx to get it:

{
  "mcpServers": {
    "libreview": {
      "command": "/absolute/path/to/npx",
      "args": ["-y", "libreviewmcp"],
      "env": {
        "LIBRE_EMAIL": "[email protected]",
        "LIBRE_PASSWORD": "your-password"
      }
    }
  }
}

Alternatively, from a local checkout you can point at the built entry point directly:

{
  "mcpServers": {
    "libreview": {
      "command": "node",
      "args": ["/absolute/path/to/libreviewmcp/dist/index.js"],
      "env": {
        "LIBRE_EMAIL": "[email protected]",
        "LIBRE_PASSWORD": "your-password"
      }
    }
  }
}

For local development you can run the server from TypeScript directly:

LIBRE_EMAIL=... LIBRE_PASSWORD=... npm run dev

The server communicates over stdio.

How it works

  • Authenticates against api.libreview.io and follows Abbott's regional redirect automatically (or uses LIBRE_REGION if set).
  • Sends the required product / version headers and the SHA-256 Account-Id header that authenticated endpoints expect.
  • Caches the auth token in memory and refreshes it before expiry (and on a 401).

If logins suddenly start failing, Abbott may have bumped the required client version — update CLIENT_VERSION in src/libre-client.ts.

Development

npm run typecheck   # type-check without emitting
npm run build       # compile to dist/
npm run dev         # run from source with tsx
npm test            # build, then run the test suite

Testing

The suite (Node's built-in test runner, no extra dependencies) runs without any LibreLinkUp credentials or network access:

  • test/glucose.test.js — unit tests for the pure helpers: unit conversion, trend-arrow mapping, and the statistics (average, min/max, GMI, time-in-range).
  • test/server.test.js — a smoke test that starts the server over stdio with dummy credentials and asserts it registers the four tools with the expected input schemas. The server only authenticates on a tool call, so listing tools needs no network.
npm test

To exercise the server end-to-end against the real LibreLinkUp API, set your credentials and drive it with the MCP Inspector:

LIBRE_EMAIL=... LIBRE_PASSWORD=... npx @modelcontextprotocol/inspector node dist/index.js

License

MIT