# LibreNMS MCP [Health: Active]

**Category:** 📊 Monitoring  
**Repository:** https://github.com/mhajder/librenms-mcp  
**GitHub Stars:** 45  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/librenms-mcp

## Description
MCP server for LibreNMS network monitoring - query devices, ports, alerts, and manage infrastructure

## Tools
Capabilities this server exposes over MCP:

- **alerts_get** — Get alerts from LibreNMS with optional filters.
- **alert_get_by_id** — Get a specific alert from LibreNMS by ID.
- **alert_acknowledge** — Acknowledge an alert in LibreNMS by ID.
- **alert_unmute** — Unmute an alert in LibreNMS by ID.
- **alert_rules_list** — List all alert rules from LibreNMS.
- **alert_rule_get** — Get details for a specific alert rule by ID.
- **alert_rule_add** — Add a new alert rule to LibreNMS.
- **alert_rule_edit** — Edit an existing alert rule in LibreNMS.
- **alert_rule_delete** — Delete an alert rule from LibreNMS by ID.
- **alert_templates_list** — List all alert templates from LibreNMS.
- **alert_template_get** — Get a specific alert template from LibreNMS by ID.
- **alert_template_create** — Create a new alert template in LibreNMS.
- **alert_template_edit** — Edit an existing alert template in LibreNMS.
- **bills_list** — List bills from LibreNMS with optional filters.
- **bill_get** — Get a specific bill from LibreNMS by ID.
- **bill_graph** — Render a bill graph as an image.

For the underlying numbers rather than a picture, use bill_graph_data.
- **bill_graph_data** — Get bill graph data from LibreNMS.
- **bill_history** — Get bill history from LibreNMS.
- **bill_history_graph** — Render a graph for a past billing period as an image.

For the underlying numbers rather than a picture, use
bill_history_graph_data.
- **bill_history_graph_data** — Get bill history graph data from LibreNMS.
- **bill_create_or_update** — Create or update a bill in LibreNMS.
- **bill_delete** — Delete a bill from LibreNMS by ID.
- **devices_list** — List devices from LibreNMS with optional filters.
- **device_add** — Add a new device to LibreNMS.
- **device_get** — Get device details from LibreNMS by hostname.
- **device_delete** — Delete a device from LibreNMS by hostname.
- **device_update** — Update device fields in LibreNMS.
- **device_ports** — List ports for a device from LibreNMS.
- **device_ports_get** — Get port info for a device by interface name.

Names like 'Te2/7' can fail by name behind proxies that reject or decode
the encoded slash. The port is then looked up by ID instead; that
response has the same shape but lacks the computed rate fields
(in_rate, out_rate, ...).
- **device_availability** — Get device availability from LibreNMS.
- **device_outages** — Get device outages from LibreNMS.
- **device_set_maintenance** — Set device maintenance in LibreNMS.
- **devicegroups_list** — List all device groups from LibreNMS.
- **devicegroup_add** — Add a new device group to LibreNMS.
- **devicegroup_update** — Update a device group in LibreNMS.
- **devicegroup_delete** — Delete a device group from LibreNMS by name.
- **devicegroup_devices** — List devices in a device group from LibreNMS.
- **devicegroup_set_maintenance** — Set maintenance for a device group in LibreNMS.
- **devicegroup_add_devices** — Add devices to a device group in LibreNMS.
- **devicegroup_remove_devices** — Remove devices from a device group in LibreNMS.
- **device_discover** — Trigger device rediscovery in LibreNMS.
- **device_rename** — Rename a device in LibreNMS.
- **device_maintenance_status** — Check if a device is currently in maintenance mode.
- **device_vlans** — Get VLANs configured on a specific device.
- **device_links** — Get network links for a specific device.
- **device_eventlog_add** — Add a custom event log entry for a device.
- **device_fdb** — List the forwarding database (learned MAC addresses) for a device.

Each entry carries the port_id it was learned on, so this is the
device-wide view of what is plugged into a switch.
- **device_nac** — List network access control (802.1X / MAB) sessions on a device.

Shows authenticated endpoints per port, including the authentication
method and the assigned VLAN where the device reports it.
- **device_graphs_list** — List the graph types available for a device.

Use this to discover the values accepted by the `graph_type` argument of
device_graph, for example 'device_icmp_perf' or 'device_poller_perf'.
- **device_graph** — Render a device-level graph as an image.
- **port_graph** — Render a per-port graph as an image, for example interface traffic.

Names like 'Te2/7' can fail by name behind proxies that reject or decode
the encoded slash. For 'bits' this tool then falls back to the port-group
endpoint, which renders the same traffic data by port ID, so callers
still get a graph.
- **port_group_graph** — Render a traffic graph for one or more ports, by port ID.

Plots every supplied port on the same axes, which makes it useful for
comparing members of a LAG. Unlike port_graph this takes numeric port
IDs rather than interface names.
- **health_list** — List available health graphs for a device.
- **health_by_type** — Get health data by sensor type for a device.
- **health_sensor_get** — Get a specific sensor by ID for a device.
- **sensors_list** — List all sensors across all devices.
- **inventory_device** — Get inventory for a device from LibreNMS.
- **inventory_device_flat** — Get flattened inventory for a device from LibreNMS.
- **locations_list** — List locations from LibreNMS.
- **location_add** — Add a new location to LibreNMS.
- **location_delete** — Delete a location from LibreNMS by ID or name.
- **location_edit** — Edit a location in LibreNMS.
- **location_get** — Get a specific location from LibreNMS by identifier.
- **location_set_maintenance** — Set maintenance mode for all devices in a location.
- **logs_eventlog** — Get event logs for a device from LibreNMS.
- **logs_syslog** — Get syslogs for a device from LibreNMS.
- **logs_alertlog** — Get alert logs for a device from LibreNMS.
- **logs_authlog** — Get authentication logs from LibreNMS.

Auth logs are server-wide rather than per-device, so this takes no hostname.
- **logs_syslogsink** — Add a syslog entry to LibreNMS via API sink.
- **arp_search** — Retrieve ARP entries from LibreNMS by search query.
- **bgp_sessions** — List BGP sessions from LibreNMS with optional filters.
- **bgp_session_get** — Get BGP session from LibreNMS by ID.
- **bgp_session_edit** — Edit BGP session in LibreNMS by ID.
- **routing_ip_addresses** — List all IP addresses from LibreNMS.
- **switching_vlans** — List all VLANs from LibreNMS.
- **switching_links** — List all links from LibreNMS.
- **fdb_lookup** — Look up a MAC address in the forwarding database.
- **ospf_list** — List all OSPF instances from LibreNMS.
- **ospf_ports** — List all OSPF ports/interfaces from LibreNMS.
- **vrf_list** — List all VRF (Virtual Routing and Forwarding) instances from LibreNMS.
- **nac_list** — List network access control (802.1X / MAB) sessions across all devices.

Note that LibreNMS answers with a 404 and "Nac entry does not exist"
rather than an empty list when nothing matches.
- **oxidized_list** — List devices tracked by Oxidized for config backup.
- **oxidized_config_get** — Get the stored device configuration from Oxidized for a specific device.
- **oxidized_config_search** — Search all Oxidized device configurations for a string.
- **poller_group_get** — Get poller group(s) from LibreNMS.
- **port_security_list** — List port security configuration across all devices.

Covers switchport port-security state such as the maximum number of
learned MAC addresses, violation mode and current status.
- **port_security_device** — Get port security configuration for every port on a device.
- **port_security_port** — Get port security configuration for a single port.
- **ports_list** — Get all ports from LibreNMS with optional filters.
- **ports_search** — Search ports in LibreNMS by search string.
- **ports_search_field** — Search ports in LibreNMS by specific field.
- **ports_search_mac** — Find the switch ports where a MAC address was learned (forwarding table).

This searches LibreNMS's FDB data, i.e. where a host's MAC appears on
the network, not the ports' own hardware addresses: a port's own MAC is
not found unless another device learned it. Results are ordered by how
many MACs each port has learned, so the access port the host is
plugged into usually comes first.
- **port_get** — Get port info from LibreNMS by port ID.
- **port_ip_info** — Get port IP info from LibreNMS by port ID.
- **port_transceiver** — Get port transceiver info from LibreNMS by port ID.
- **port_description_get** — Get port description from LibreNMS by port ID.
- **port_description_update** — Update port description in LibreNMS by port ID.
- **port_groups_list** — List port groups from LibreNMS.
- **port_group_add** — Add a port group to LibreNMS.
- **port_group_list_ports** — List ports in a port group from LibreNMS.
- **port_group_assign** — Assign ports to a port group in LibreNMS.
- **port_group_remove** — Remove ports from a port group in LibreNMS.
- **port_fdb** — List the MAC addresses learned on a port, from the forwarding database.

This answers "what is connected to this port". To go the other way and
find which port a known MAC sits on, use fdb_lookup instead.
- **services_list** — List all services from LibreNMS with optional filters.
- **services_for_device** — Get services for a device from LibreNMS.
- **service_add** — Add a service for a device in LibreNMS.
- **service_edit** — Edit a service in LibreNMS by service ID.
- **service_delete** — Delete a service from LibreNMS by service ID.
- **system_info** — Get system info from LibreNMS.
- **ping** — Simple API health check - ping LibreNMS API.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "librenms-mcp": {
    "command": "uvx",
    "args": ["librenms-mcp"],
    "env": {
      "LIBRENMS_URL": "",
      "LIBRENMS_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `LIBRENMS_URL`, `LIBRENMS_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What LibreNMS MCP does

LibreNMS MCP provides an MCP interface to LibreNMS network monitoring. Agents can inspect devices, ports, availability, alerts, alert rules, alert templates, and bills, then perform supported management actions such as adding, updating, or deleting devices and alert configuration.

The device tools cover filtered device listings, hostname-based details, port inventories, interface-specific port information, and availability checks. Alert tools support filtered alert retrieval, lookup by ID, acknowledgement, unmuting, and management of alert rules and templates. Billing tools return bill records, history, and graph information, and can render billing graphs as images.

## How it works

The server is written in Python and communicates with a LibreNMS instance using the configured URL and token. It can use stdio, Server-Sent Events, or HTTP Streamable transport; stdio is the default. The Docker image exposes the HTTP MCP endpoint at `/mcp` on port 8000 by default.

Read and write operations are available through separate MCP tools. Read-only mode can disable write requests, which is useful when the agent should inspect monitoring data without changing LibreNMS. Responses can redact SNMP community and SNMPv3 credentials by default.

## Setup and configuration

Install the package with `uvx librenms-mcp` or `pip install librenms-mcp`, then provide the LibreNMS connection settings:

- `LIBRENMS_URL`: URL of the LibreNMS instance.
- `LIBRENMS_TOKEN`: LibreNMS API token with suitable permissions.

Source installation uses `uv sync` or an editable pip install. The server can then be started with `uv run librenms-mcp` or the installed `librenms-mcp` command.

For container deployments, use the image `ghcr.io/mhajder/librenms-mcp:latest`. HTTP deployments can set `MCP_HTTP_HOST`, `MCP_HTTP_PORT`, and an optional `MCP_HTTP_BEARER_TOKEN`. `MCP_TRANSPORT` selects stdio, SSE, or HTTP; `streamable-http` is accepted as an HTTP alias.

Additional settings control TLS verification, request timeouts, read-only behavior, SNMP credential redaction, disabled tool groups, logging, rate limiting, tool search, and short-hostname resolution.

## Tools and capabilities

- Query devices with optional filters and retrieve or modify device records.
- Add or remove devices and inspect device availability.
- List a device's ports or retrieve an interface by name.
- Query alerts and manage acknowledgement and mute state.
- List, inspect, create, edit, and delete alert rules.
- List, inspect, create, and edit alert templates.
- List, inspect, create, update, and delete bills.
- Retrieve bill history and graph data, or render billing graphs as images.

For billing analysis, use `bill_graph_data` or `bill_history_graph_data` when the agent needs numerical values rather than an image.

## Limitations and notes

Port names containing encoded slashes, such as `Te2/7`, may fail when a proxy rejects or decodes the slash. The server can fall back to looking up the port by ID; that response retains the same general shape but omits computed rate fields such as `in_rate` and `out_rate`.

Write operations depend on the LibreNMS token's permissions and can be disabled globally with `READ_ONLY_MODE`. HTTP deployments can be protected with the optional MCP bearer token. TLS verification is configurable through `LIBRENMS_VERIFY_SSL`.

_Full upstream README: https://allmcps.com/mcp/librenms-mcp/readme_

