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
git clone https://github.com/ssuppe/nightscout-mcpThis 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
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
- Clone the repository:
git clone https://github.com/ssuppe/nightscout-mcp.git cd nightscout-mcp - Install dependencies:
npm install - Create a
.envfile 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.