Skip to main content
Glama
mcp-netalertx
by Je-Bin

mcp-netalertx

Publishing to the MCP Registry

This server is registered as io.github.je-bin/mcp-netalertx in the MCP Registry. server.json holds the registry metadata, and the mcp-name marker above is what the registry checks to prove ownership of the published package.

To publish a new version:

  1. Create the package on PyPI and configure Trusted Publishing for this repository and the publish-mcp.yml workflow.

  2. Bump the version in pyproject.toml (or server.json) and tag the release (git tag vX.Y.Z).

  3. Push the tag: the workflow publishes to PyPI and then to the MCP Registry.

An MCP (Model Context Protocol) server that gives an AI assistant a read-only view of the network inventory kept by NetAlertX, my homelab asset-discovery and monitoring tool.

The bridge speaks to the NetAlertX HTTP API and exposes 12 tools: the devices it knows, the network topology, the open ports it recorded, the events and sessions it logged, system health — plus two operational helpers, triggering a network scan and sending a Wake-on-LAN packet. Nothing that deletes data is exposed.

NetAlertX is the upstream project: https://github.com/netalertx/NetAlertX. This repository is only a bridge: it contains no NetAlertX code and talks to NetAlertX through its documented HTTP API. NetAlertX itself ships its own native MCP endpoint (SSE) — this bridge is a lighter, stdio-based, read-only alternative that you can point at any MCP client.

Related MCP server: Netdisco MCP

Features

Tool

What it does

netalertx_check_auth

Check that the configured API token is valid

netalertx_list_devices

List the known devices, optionally filtered by status

netalertx_get_device

Full detail of one device, by MAC address

netalertx_get_open_ports

Open ports recorded by the last NMAP scan, for an IP or MAC

netalertx_get_network_topology

Topology of the monitored network: nodes and links

netalertx_get_device_totals

Counters: total, connected, down, new, favorites, archived

netalertx_list_recent_events

Events of the last hours (connect, disconnect, new device…)

netalertx_list_sessions

Connection sessions, optionally for one device or one period

netalertx_get_system_health

Health of the NetAlertX host: database, memory, load, disk, CPU

netalertx_get_network_interfaces

Network interfaces of the NetAlertX host and their addresses

netalertx_trigger_network_scan

Trigger a network scan (ARPSCAN, NMAP, NMAPDEV, INTRNT, AVAHISCAN, NBTSCAN)

netalertx_wake_on_lan

Send a Wake-on-LAN magic packet to a device

Requirements

  • Python 3.10+

  • mcp 2.3.0 or later (provides mcp.server.mcpserver.MCPServer)

  • A running NetAlertX instance whose HTTP API is reachable, and an API token

Installation

git clone https://github.com/Je-Bin/mcp-netalertx.git
cd mcp-netalertx
python3 -m venv .venv
. .venv/bin/activate
pip install .

For a checkout without installing the package:

pip install -r requirements.txt   # or: pip install "mcp>=2.3.0"
python -m mcp_netalertx.server

Configuration

Everything is configured through environment variables:

Variable

Required

Default

Description

NETALERTX_URL

recommended

http://localhost:20212

Base URL of the NetAlertX API server. 20212 is the default API port of the official image (GRAPHQL_PORT); some deployments publish it behind nginx on 20211 under /api/.

NETALERTX_TOKEN

yes

(empty)

The NetAlertX API token, sent as Authorization: Bearer <token>. If it is missing, every tool returns an explicit configuration error instead of sending an unauthenticated request.

NETALERTX_TIMEOUT

no

30

Request timeout in seconds.

The token is generated in the NetAlertX UI (Settings → API) or with the apitoken CLI command. It is only ever read from the environment: it is never written to disk, never logged and never passed on the command line.

Example MCP client configuration

{
  "mcpServers": {
    "netalertx": {
      "command": "/path/to/mcp-netalertx/.venv/bin/mcp-netalertx",
      "env": {
        "NETALERTX_URL": "http://localhost:20212",
        "NETALERTX_TOKEN": "<your api token>"
      }
    }
  }
}

Running it manually

NETALERTX_URL=http://localhost:20212 NETALERTX_TOKEN='<your api token>' mcp-netalertx

The server speaks MCP over stdio, so it stays silent until a client talks to it.

Tools in action

A typical conversation looks like this:

You: which devices are currently down?
Assistant: (calls netalertx_list_devices with status="down")
{
  "tool": "netalertx_list_devices",
  "arguments": { "status": "down", "limit": 20 }
}
{
  "devices": [
    {
      "devMac": "aa:bb:cc:dd:ee:ff",
      "devName": "printer",
      "devIp": "192.0.2.42",
      "devStatus": "offline",
      "devType": "printer",
      "devVendor": "Example"
    }
  ]
}

Other examples:

{ "tool": "netalertx_check_auth", "arguments": {} }
{ "tool": "netalertx_get_device", "arguments": { "mac": "aa:bb:cc:dd:ee:ff" } }
{ "tool": "netalertx_get_network_topology", "arguments": {} }
{ "tool": "netalertx_get_open_ports", "arguments": { "target": "192.0.2.42" } }
{ "tool": "netalertx_get_device_totals", "arguments": {} }
{ "tool": "netalertx_list_recent_events", "arguments": { "hours": 24, "limit": 50 } }
{ "tool": "netalertx_list_sessions", "arguments": { "mac": "aa:bb:cc:dd:ee:ff" } }
{ "tool": "netalertx_get_system_health", "arguments": {} }
{ "tool": "netalertx_trigger_network_scan", "arguments": { "scan_type": "ARPSCAN" } }
{ "tool": "netalertx_wake_on_lan", "arguments": { "dev_mac": "aa:bb:cc:dd:ee:ff", "ip": "192.0.2.42" } }

Security

  • Read-only by design. The bridge only calls GET routes of the NetAlertX API, plus the two operational routes /nettools/trigger-scan and /nettools/wakeonlan. The NetAlertX routes that delete devices, events, sessions, notifications or database rows are never called and are not exposed as tools.

  • The token is never embedded in the code. It is read from the NETALERTX_TOKEN environment variable, which has no default value. When the variable is missing or empty, the tools return a clear, actionable configuration error and no request is sent to NetAlertX.

  • No secret in the logs. Errors returned by NetAlertX are truncated to 400 characters and are forwarded verbatim; the token is never part of an error message and is never echoed back.

  • Least privilege on the NetAlertX side. NetAlertX API tokens are per-instance; keep the API bound to the local network or behind a reverse proxy with TLS.

  • Local transport. The server communicates over stdio with the MCP client: it opens no listening socket on your network.

  • No arbitrary code execution. The bridge only performs HTTP requests against the configured NetAlertX URL; it never runs shell commands and never touches the file system.

License

MIT — see LICENSE.

NetAlertX is a separate project licensed under the GPL-3.0; it is not part of this repository.

Available Tools

12 tools
netalertx_check_authA

Check that the configured NetAlertX API token is valid. Returns the answer of the NetAlertX /auth endpoint.

Inputs: no named parameters. Returns: result

netalertx_get_deviceC

Full detail of one device, by MAC address.

Inputs: mac (required). Returns: result

netalertx_get_device_totalsA

Counters of the device inventory: total, connected, down, new, favorites and archived devices.

Inputs: no named parameters. Returns: result

netalertx_get_network_interfacesB

Network interfaces seen by the NetAlertX host, with their addresses.

Inputs: no named parameters. Returns: result

netalertx_get_network_topologyB

Network topology of the monitored network: the nodes (devices) and the links between them, as seen by NetAlertX.

Inputs: no named parameters. Returns: result

netalertx_get_open_portsA

Open ports recorded by NetAlertX for a target (IP address or MAC address). The data comes from the last NMAP scan; if nothing is stored, run an NMAP scan from the NetAlertX UI (Net tools) first.

Inputs: target (required). Returns: result

netalertx_get_system_healthB

Health of the NetAlertX host: database size, memory usage, load, disk usage and CPU temperature.

Inputs: no named parameters. Returns: result

netalertx_list_devicesA

List the devices known by NetAlertX. status: optional filter (connected, down, favorites, new, archived, all, offline). limit: maximum number of devices returned (1-1000). offset: number of devices to skip.

Inputs: limit, offset, status. Returns: result

netalertx_list_recent_eventsC

Events recorded by NetAlertX over the last hours (connect, disconnect, new device, IP change...). hours: time window, limit: max events returned.

Inputs: hours, limit. Returns: result

netalertx_list_sessionsC

Connection sessions recorded by NetAlertX. All arguments are optional: mac restricts the result to one device, start_date and end_date filter the period (ISO 8601, e.g. 2026-11-01T00:00:00).

Inputs: mac, end_date, start_date. Returns: result

netalertx_trigger_network_scanA

Trigger a network scan on the NetAlertX host. scan_type is one of ARPSCAN (default), NMAPDEV, NMAP, INTRNT, AVAHISCAN or NBTSCAN. This is an operational action: it makes NetAlertX probe the network.

Inputs: scan_type. Returns: result

netalertx_wake_on_lanB

Send a Wake-on-LAN magic packet from the NetAlertX host to a device. dev_mac: MAC address of the target. ip: optional IP address of the target, useful when the MAC is unknown.

Inputs: dev_mac (required), ip. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 12 tools

    Disambiguation4/5

    Each tool targets a distinct resource or action, and the read tools (devices, ports, sessions, events, topology, health, interfaces) are clearly separated. The only mild overlaps are netalertx_list_devices vs netalertx_get_device_totals (inventory vs counters) and netalertx_get_network_interfaces vs netalertx_get_network_topology, but descriptions make the distinction clear.

    Naming Consistency5/5

    Every tool uses the netalertx_ prefix followed by a consistent verb_noun pattern (list_devices, get_device, trigger_network_scan, wake_on_lan). No camelCase or style mixing; names are predictable and readable.

    Tool Count5/5

    Twelve tools is well within the ideal range and every tool covers a distinct facet of the NetAlertX domain (auth, inventory, ports, sessions, events, topology, health, interfaces, scans, WoL). Nothing feels redundant or padded.

    Completeness3/5

    Read coverage is strong and two operational actions (scan trigger, Wake-on-LAN) exist, but the write/lifecycle surface is notably thin: no way to favorite, archive, rename, or delete a device, and no event acknowledgement or alert/notification rule management. Agents can inspect and trigger scans but cannot mutate inventory or alert state.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to interact with the Netdisco network management platform through its complete REST API, supporting device inspection, port queries, VLAN searches, and job management.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to safely troubleshoot networks through read-only tools for device inventory, interface status, VLAN paths, BGP neighbors, route lookups, and interface error detection. Integrates with Microsoft Copilot Studio and Teams for natural-language-driven network diagnostics.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant such as Claude to read and edit the self-hosted network inventory: search and manage entries, check live TCP reachability, map hosts, link and derive relationships, inspect topology, compare configured read-only sources like Docker, OPNsense, AdGuard and Traefik against what is declared, surface conflicts and new devices, and review the audit log.
      MIT