LibreNMS MCP — Claude Code MCP server: features and setup
Connect an AI agent to LibreNMS to inspect devices, ports, and alerts, or manage network resources from your coding environment.
claude mcp add --env LIBRENMS_URL=<LIBRENMS_URL> --env LIBRENMS_TOKEN=<LIBRENMS_TOKEN> --env LIBRENMS_VERIFY_SSL=<LIBRENMS_VERIFY_SSL> --env LIBRENMS_TIMEOUT=<LIBRENMS_TIMEOUT> --env READ_ONLY_MODE=<READ_ONLY_MODE> --transport stdio librenms-mcp -- uvx librenms-mcpWhat LibreNMS MCP does
LibreNMS MCP gives an agent access to network data such as device health, interface statistics, topology, event logs, alert history, and endpoints found by MAC or IP address. It can also look up device and port groups, routing details, and network services. Queries support filtering.
The server can create, edit, and remove devices, ports, and groups. Set READ_ONLY_MODE to disable write operations before connecting if the agent should only inspect your network. Running it requires Python 3.11–3.15, access to LibreNMS, and a token with suitable permissions.
For Claude Code, the setup runs the server with uvx and passes the LibreNMS URL and token as environment variables. SSL verification and request timeouts are configurable. A token without permission for a requested action will prevent that operation from succeeding.
What it helps with
- check device health and find affected ports
- inspect traffic and interface status
- review alert history and event logs
- locate endpoints by MAC or IP address
- update LibreNMS devices and groups
Example prompts for the agent
- Find devices in LibreNMS that have a problem status and list their ports.
- Review the alert history and event logs for the selected period.
- Look up the device with this IP address and update its LibreNMS details.
How to install LibreNMS MCP
Platform CLI
claude mcp add --env LIBRENMS_URL=<LIBRENMS_URL> --env LIBRENMS_TOKEN=<LIBRENMS_TOKEN> --env LIBRENMS_VERIFY_SSL=<LIBRENMS_VERIFY_SSL> --env LIBRENMS_TIMEOUT=<LIBRENMS_TIMEOUT> --env READ_ONLY_MODE=<READ_ONLY_MODE> --transport stdio librenms-mcp -- uvx librenms-mcpReplace <…> with your own values. 19 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from librenms-mcp <command>
Platform CLI
codex mcp add librenms-mcp --env LIBRENMS_URL=<LIBRENMS_URL> --env LIBRENMS_TOKEN=<LIBRENMS_TOKEN> --env LIBRENMS_VERIFY_SSL=<LIBRENMS_VERIFY_SSL> --env LIBRENMS_TIMEOUT=<LIBRENMS_TIMEOUT> --env READ_ONLY_MODE=<READ_ONLY_MODE> -- uvx librenms-mcpReplace <…> with your own values. 19 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from librenms-mcp <command>
Config file
{
"mcpServers": {
"librenms-mcp": {
"command": "uvx",
"args": [
"librenms-mcp"
],
"env": {
"LIBRENMS_URL": "<LIBRENMS_URL>",
"LIBRENMS_TOKEN": "<LIBRENMS_TOKEN>",
"LIBRENMS_VERIFY_SSL": "<LIBRENMS_VERIFY_SSL>",
"LIBRENMS_TIMEOUT": "<LIBRENMS_TIMEOUT>",
"READ_ONLY_MODE": "<READ_ONLY_MODE>"
}
}
}
}Replace <…> with your own values. 19 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from librenms-mcp <command>
Config file
{
"servers": {
"librenms-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"librenms-mcp"
],
"env": {
"LIBRENMS_URL": "<LIBRENMS_URL>",
"LIBRENMS_TOKEN": "<LIBRENMS_TOKEN>",
"LIBRENMS_VERIFY_SSL": "<LIBRENMS_VERIFY_SSL>",
"LIBRENMS_TIMEOUT": "<LIBRENMS_TIMEOUT>",
"READ_ONLY_MODE": "<READ_ONLY_MODE>"
}
}
}
}Replace <…> with your own values. 19 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from librenms-mcp <command>
Platform CLI
gemini mcp add -e LIBRENMS_URL=<LIBRENMS_URL> -e LIBRENMS_TOKEN=<LIBRENMS_TOKEN> -e LIBRENMS_VERIFY_SSL=<LIBRENMS_VERIFY_SSL> -e LIBRENMS_TIMEOUT=<LIBRENMS_TIMEOUT> -e READ_ONLY_MODE=<READ_ONLY_MODE> librenms-mcp uvx librenms-mcpReplace <…> with your own values. 19 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from librenms-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about LibreNMS MCP
How do I install LibreNMS MCP in Claude Code?
Run claude mcp add librenms-mcp -e LIBRENMS_URL=<LIBRENMS_URL> -e LIBRENMS_TOKEN=<LIBRENMS_TOKEN> -- uvx librenms-mcp. Replace the placeholders with your LibreNMS address and a token with the required permissions.
What does LibreNMS MCP do?
It lets an AI agent query LibreNMS and manage network resources. Available data includes devices, ports, alerts, groups, and logs.
Can LibreNMS MCP run in read-only mode?
Yes. Set READ_ONLY_MODE=true to turn off write operations.