Skip to main content

Argus server

Python MCP + FastAPI server. NetBox source-of-truth tools for coding agents and the Argus web dashboard. See the top-level README and docs/ARCHITECTURE.md.

Install

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

Configure

Copy .env.example to .env (or export the vars):

NETBOX_URL=https://netbox.lan
NETBOX_TOKEN=<netbox api token>
NETBOX_VERIFY_SSL=true
HTTP_HOST=0.0.0.0
HTTP_PORT=8080

# Optional — all default to off; see .env.example for the full list.
HTTP_TOKEN=                  # bearer token for /api + /webhooks (unset = open)
NETBOX_WEBHOOK_SECRET=       # verify NetBox X-Hook-Signature HMAC on /webhooks (unset = off)
SCHEDULE_INTERVAL=0          # scheduled drift loop: seconds between cycles (0 = off)
SCHEDULE_COLLECTOR=unifi     # collector the scheduled drift cycle runs
ALERT_WEBHOOK_URL=           # Slack-compatible webhook; alerts on detected drift
NETBOX_TENANT=               # shared-instance: stamp this tenant on objects reconcile creates (unset = single-tenant)

If unset, tools return a clear "NetBox not configured" message instead of erroring.

Run

argus-mcp     # MCP server over stdio (for Claude Code etc.)
argus-http    # FastAPI HTTP server on :8080 (for the web app + webhooks)

argus-maint-mcp  # separate maintenance MCP surface — release preview/verify (devtools; read-only)

The HTTP server also:

  • receives NetBox webhooks at POST /webhooks/netbox — it classifies and structured-logs each change event (observability only; no discovery or reconcile is triggered yet). Set NETBOX_WEBHOOK_SECRET to verify NetBox's X-Hook-Signature HMAC (HMAC-SHA512 of the raw body); a missing or mismatched signature is rejected 401 (unset leaves verification off).
  • runs an optional scheduled drift loop — set SCHEDULE_INTERVAL (seconds) and Argus discovers + diffs on that interval, read-only (never apply). The latest outcome is served at GET /api/drift/status, and setting ALERT_WEBHOOK_URL POSTs a Slack-compatible alert when drift is found.
  • gates /api + /webhooks behind a bearer token when HTTP_TOKEN is set (/health stays public); unset leaves the API open for local/dev use.

Examples

Enable API auth, then call /api/* with the bearer token:

export HTTP_TOKEN="$(openssl rand -hex 32)"
argus-http
curl -H "Authorization: Bearer $HTTP_TOKEN" http://localhost:8080/api/devices

Enable scheduled drift detection (every 5 min) with an optional Slack alert, then read the latest outcome:

export SCHEDULE_INTERVAL=300                                    # 0 = off
export SCHEDULE_COLLECTOR=unifi
export ALERT_WEBHOOK_URL="https://hooks.slack.com/services/…"   # optional
argus-http
curl http://localhost:8080/api/drift/status

Install from PyPI (the published distribution is argus-netbox; the import package stays argus and the console scripts are argus-mcp / argus-http):

pip install argus-netbox
argus-http     # or argus-mcp

Container images are published to GHCR — see the top-level README's Published artifacts.

Develop

ruff check src tests
mypy src
pytest -v          # offline — NetBox is mocked

Tools

Tool Kind Status
list_devices, get_device, list_prefixes, list_ip_addresses, search read real (needs NetBox)
list_collectors, discovery_scan, network_topology discovery UniFi real — devices + clients + uplink topology (needs UNIFI_*); SNMP/LLDP real for non-UniFi gear (needs SNMP_TARGETS + argus-netbox[discovery]); list_collectors (also GET /api/collectors) surfaces each vendor pack's manufacturer/transport/capabilities/config_vars
drift_report, reconcile_apply reconcile real — diffs and (on confirm) persists, auto-creating supporting NetBox objects
evaluate_practices practices real — runs a collector's best-practice rules, returning advisory Findings (read-only; also GET /api/practices)
health meta real

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argus_netbox-0.2.2.tar.gz (71.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argus_netbox-0.2.2-py3-none-any.whl (57.1 kB view details)

Uploaded Python 3

File details

Details for the file argus_netbox-0.2.2.tar.gz.

File metadata

  • Download URL: argus_netbox-0.2.2.tar.gz
  • Upload date:
  • Size: 71.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for argus_netbox-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5e18bfd4773b1f710e21732aea674b646289e140b0883be953f43524a9e08440
MD5 00cc3d6b44bf9348f906d593dd5b634e
BLAKE2b-256 f0fcb17fd9273a57baa084e33e8283dc2d3ba765fce54f593d9d29f0595156ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for argus_netbox-0.2.2.tar.gz:

Publisher: release.yml on freed-dev-llc/argus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file argus_netbox-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: argus_netbox-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 57.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for argus_netbox-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61f55b42c895fff0d8d2294ae6790d1217c5ad1e18a86bcea532d84d47838d79
MD5 d4160e2a71b38f5776b705bba6fc4de4
BLAKE2b-256 b982e031bc1896d55f27ffee63f52fbdbf702df0484d8c2a9bb516f509628f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for argus_netbox-0.2.2-py3-none-any.whl:

Publisher: release.yml on freed-dev-llc/argus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page