1. Conduid
  2. Analytics
  3. Nightscout MCP
MCP server · Analytics

Nightscout MCP

An MCP server for AI agent interactions with Nightscout, the remote web CGM monitoring tool for diabetics.

Unclaimed MIT last commit a year ago analytics
49Fair

Scored 8 days ago · breakdown

About Nightscout MCP

Nightscout MCP is an MCP server published by ssuppe in the Analytics category: an MCP server for AI agent interactions with Nightscout, the remote web CGM monitoring tool for diabetics.

The repository has 3 stars and 3 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/ssuppe/nightscout-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Nightscout MCP

Powered by Claude · Grounded in docs

I know everything about Nightscout MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository yesterday. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

Nightscout MCP Server

This project is a read-only MCP (Model Context Protocol) server for Nightscout, built with the @modelcontextprotocol/sdk. It allows AI agents and other tools to interact with your Nightscout data in a structured and secure way, enabling advanced analysis, insights, and visualizations.

Features

  • Get Entries: Retrieve raw data from your Nightscout instance, such as blood glucose readings, and device statuses.
  • Get Treatments: Retrieve treatment data from your Nightscout instance, such as insulin doses and carb intake.
  • Extensible: Easily add new tools to expose more of the Nightscout API.
  • Secure: Your Nightscout URL and token are kept secure on the server and are not exposed to the AI model.

API Support

  • Nightscout API v1: Currently, this server only supports v1 of the Nightscout API.

Getting Started

Prerequisites

  • Node.js and npm
  • A Nightscout instance

Installation

  1. Clone the repository:
    git clone https://github.com/ssuppe/nightscout-mcp.git
    cd nightscout-mcp
    
  2. Install dependencies:
    npm install
    
  3. Create a .env file in the root of the project and add the following environment variables:
    NIGHTSCOUT_URL=https://your-nightscout-site.com
    NIGHTSCOUT_TOKEN=your-nightscout-api-token
    

Running the Server

You can run the server in two modes:

  • Development Mode: This will run the server using ts-node, which will automatically transpile and run the TypeScript code. This is the recommended way to run the server during development.
    npm run dev
    
  • Production Mode: This will first build the project by compiling the TypeScript code to JavaScript, and then run the compiled code.
    npm run build
    npm start
    

The server will start and listen on http://localhost:3000/mcp. You will see a confirmation message in the console.

Query Quickstart

Try commands like:

  • What is my most recent blood glucose reading?
  • What is my average blood sugar since 8am?
  • What treatments have I taken this morning?

Your mileage may vary. I intend to add more specific tooling for more predictable results.

TODO

  • Add additional read-only capabilities directly from the API (starting with Profiles)
  • Create helper tools (such as averages, percentiles, finding high and low times of day, etc)

Contributing

Contributions are welcome! Please see the Contributing Guidelines for more details on how to get involved.

License

This project is licensed under the MIT License. See the LICENSE file for details.

README fetched from the repository yesterday. The original is authoritative.

Questions

About Nightscout MCP

How do I install Nightscout MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Nightscout MCP safe to use with an AI agent?

Its trust score is 49 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Nightscout MCP still maintained?

The last commit was a year ago and 2 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.