LibreNMS MCP

v1.14.0
io.github.mhajder/librenms-mcp Checked 1 hour ago Published 2 days ago

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

Values you need

VariableWhat it is
LIBRENMS_URLrequired LibreNMS instance URL (e.g., https://librenms.example.com)
LIBRENMS_TOKENrequired secret LibreNMS API token with appropriate permissions
LIBRENMS_VERIFY_SSLoptional Verify TLS certificates for LibreNMS requests (true/false) Default: true
LIBRENMS_TIMEOUToptional HTTP timeout for LibreNMS API requests in seconds Default: 30
READ_ONLY_MODEoptional Enable read-only mode to block write operations Default: false
REDACT_SNMP_CREDENTIALSoptional Replace SNMP community and SNMPv3 credentials in API responses with <redacted> Default: true
DISABLED_TAGSoptional Comma-separated tool tags to disable (e.g., alerts,bills)
LOG_LEVELoptional Logging level (DEBUG, INFO, WARNING, ERROR) Default: INFO
RATE_LIMIT_ENABLEDoptional Enable per-client rate limiting (true/false) Default: false
RATE_LIMIT_MAX_REQUESTSoptional Maximum requests allowed per rate-limit window Default: 100
RATE_LIMIT_WINDOW_MINUTESoptional Rate-limit window duration in minutes Default: 1
TOOL_SEARCH_ENABLEDoptional Enable FastMCP tool search transform Default: false
TOOL_SEARCH_STRATEGYoptional Tool search strategy: 'bm25' (natural language) or 'regex' (pattern match) Default: bm25
TOOL_SEARCH_MAX_RESULTSoptional Maximum number of tools returned by search_tools Default: 5
RESOLVE_SHORT_HOSTNAMESoptional Resolve short device names to the stored hostname of the one matching device Default: false
SENTRY_DSNoptional secret Sentry DSN for optional error tracking
SENTRY_TRACES_SAMPLE_RATEoptional Sentry traces sample rate (0.0-1.0) Default: 1.0
SENTRY_SEND_DEFAULT_PIIoptional Send PII to Sentry: tool inputs and outputs, HTTP bodies, stack frame variables, user details, cookies and client IP headers; secret-looking names (password, token, key) stay filtered (true/false) Default: false
SENTRY_ENVIRONMENToptional Sentry environment name (e.g., production)
SENTRY_RELEASEoptional Sentry release identifier
SENTRY_PROFILE_SESSION_SAMPLE_RATEoptional Sentry profile session sample rate (0.0-1.0; 0.0 turns profiling off) Default: 0.0
SENTRY_PROFILE_LIFECYCLEoptional Sentry profiling lifecycle mode (trace or manual) Default: trace
SENTRY_ENABLE_LOGSoptional Send application logs to Sentry Logs (true/false; defaults to the SENTRY_SEND_DEFAULT_PII value)
MCP_HTTP_PORToptional Port for HTTP server (default: 8000) Default: 8000
MCP_HTTP_BEARER_TOKENoptional secret Optional bearer token for HTTP transport authentication
MCP_TRANSPORToptional MCP transport type: stdio, sse, or http (alias: streamable-http). Unknown values stop the server at startup.

PyPI (uvx) verified

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add librenms-mcp -e 'LIBRENMS_TOKEN=<LIBRENMS_TOKEN>' -e 'LIBRENMS_URL=<LIBRENMS_URL>' -- uvx librenms-mcp==1.14.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "librenms-mcp": {
      "args": [
        "librenms-mcp==1.14.0"
      ],
      "command": "uvx",
      "env": {
        "LIBRENMS_TOKEN": "<LIBRENMS_TOKEN>",
        "LIBRENMS_URL": "<LIBRENMS_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "librenms-mcp": {
      "args": [
        "librenms-mcp==1.14.0"
      ],
      "command": "uvx",
      "env": {
        "LIBRENMS_TOKEN": "<LIBRENMS_TOKEN>",
        "LIBRENMS_URL": "<LIBRENMS_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "LIBRENMS_TOKEN",
      "id": "librenms-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "LIBRENMS_URL",
      "id": "librenms-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "librenms-mcp": {
      "args": [
        "librenms-mcp==1.14.0"
      ],
      "command": "uvx",
      "env": {
        "LIBRENMS_TOKEN": "${input:librenms-token}",
        "LIBRENMS_URL": "${input:librenms-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.librenms-mcp]
command = "uvx"
args = ["librenms-mcp==1.14.0"]
env = { "LIBRENMS_TOKEN" = "<LIBRENMS_TOKEN>", "LIBRENMS_URL" = "<LIBRENMS_URL>" }

For AI agents

  1. Ask the user for: LIBRENMS_URL, LIBRENMS_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: alerts_get, alert_get_by_id, alert_acknowledge, alert_unmute, alert_rules_list, alert_rule_get, alert_rule_add, alert_rule_edit, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json