librenmsctrl
ActiveYour LibreNMS UI shows you a wall of green and one red row, but your agent cannot read it and your scripts have to hand-roll REST calls against the token. librenms-mcp gives shells, cron, and any MCP client a typed command surface over your monitored network: devices, ports, port health, alerts, alert history, and events, with every write gated behind an explicit confirm.
See it workrepresentative session
Representative session. Illustrative values, RFC 5737 addresses. Reads are open, writes need confirm: true, and your token never leaves the box.
What it does
Point any MCP client, or a plain shell, at librenms-mcp and your LibreNMS instance becomes a scriptable control surface instead of a UI you have to click through. It authenticates with a LibreNMS API token, talks to the `/api/v0` REST API under the hood, and exposes 13 named tools that emit structured data an agent can reason over or human-readable tables you can pipe. It differs from handing an agent a generic HTTP tool and the raw token in the way that matters once a write is possible: every write is refused unless the call carries `confirm: true`, every argument is bounds- and enum-checked against a published TypeBox schema before a URL is built, and the token is redacted from all output, so a hallucinated tool call cannot change your monitoring state by accident. The read-only `librenmsctrl` CLI shares the same client core for cron and CI.
Capabilities13 tools across the monitoring surface
Devices & inventory
3 toolsInstance status, list monitored devices, fetch a single device by id.
Ports & health
3 toolsList ports across devices, pull one port detail, view port health and utilization.
Alerts & events
4 toolsList and fetch current alerts, read alert history, tail the device event log.
Safe writes (gated)
3 toolsAcknowledge an alert, unmute an alert, set device maintenance. Each needs confirm: true.
Setup
npm install -g @solomonneas/librenms-mcp
Needs Node 20+ and two env vars: LIBRENMS_URL and LIBRENMS_TOKEN (start with a Read Only token role). LIBRENMS_TLS_INSECURE=true is optional for homelab self-signed certs.
{ "mcpServers": { "librenms": { "command": "npx", "args": ["-y", "@solomonneas/librenms-mcp"], "env": { "LIBRENMS_URL": "https://librenms.example.local", "LIBRENMS_TOKEN": "<your-api-token>" } } } }