Skip to content

Releases

USBGuard-MCP 0.1.0

Choose a tag to compare

@0x5t4l1n 0x5t4l1n released this 05 Dec 22:42
v0.1.0
fe76214

USBGuard-MCP 0.1.0

First release of an independent, read-only MCP server that
lets AI agents inspect USBGuard: devices, policy, events and
evidence-based security findings. Not affiliated with or endorsed by USBGuard.

Install

uvx usbguard-mcp --version
pip install usbguard-mcp
usbguard-mcp --mock    # synthetic data, no USBGuard needed

Requires Linux, Python 3.11+, and for real data a running USBGuard daemon with a read-only IPC ACL
(see docs/permissions.md).

Highlights

  • 32 read-only tools, 6 resources, 5 prompts over STDIO (reference).
  • Read-only by construction: the only commands ever run are usbguard --version, list-devices,
    list-rules and watch. No sudo, no shell, no write operations.
  • Policy analysis that respects USBGuard semantics (first-match-wins, set operators, wildcards);
    reports only what it can prove and states what it cannot evaluate.
  • Explainable findings: evidence, severity, confidence, limitations, remediation. Never a
    "malicious" verdict; no malware or firmware detection is claimed.
  • Untrusted-metadata handling and privacy by default: device text is sanitized and kept out of
    finding prose; serials, hashes and ports are redacted unless you opt out.
  • Explicit mock mode with synthetic scenarios; never selected automatically.

Validation

Validated on a Fedora KDE laptop against USBGuard 1.1.4 with a real USB flash drive (detected,
classified, blocked by policy, unplug/replug events captured). Live tests passed with Claude Code,
Codex and OpenCode. Least-privilege IPC (Devices=list,listen + Policy=list) was verified as a
non-wheel user: reads work, write calls are refused by the daemon. CI: Python 3.11-3.13, Ruff, strict
mypy, 176 tests (96.9% coverage), pip-audit, CodeQL, secret scan. Full record:
docs/validation.md.

Real hardware found four defects that mock data could not, all fixed in this release: duplicate
interface entries, firmware-update interfaces mislabelled as composite devices, misleading event
timestamps (now collected_at), and a guessing oracle in baseline comparison.

Known limitations

  • Only Fedora and USBGuard 1.1.4 were exercised; other distributions and versions are untested.
  • Claude Desktop and VS Code example configs are untested.
  • usbguard-daemon.conf is root-only, so the daemon's implicit policy target is not evaluated;
    rule conditions (if ...) are not evaluated.
  • Event timestamps are collection time (USBGuard provides none); only order is reliable. Events come
    from a bounded in-memory buffer; there is no history. Device IDs change when a device is replugged.
  • No native IPC backend, HTTP transport, or write operations.

Verify your download

Published to PyPI by GitHub Actions via Trusted Publishing (OIDC); no API token is used.

9e1126ed99a53c079e103a4c16e5eafa57ff3e7a5f443719ed64aba92b57be93  usbguard_mcp-0.1.0-py3-none-any.whl
2322b1796278dc7a2b6362bfacead593e76e4d1d401d8d7d20deb2dc145ce6ca  usbguard_mcp-0.1.0.tar.gz

These are the SHA-256 sums of a local reproducible build; the release workflow attaches its own build
and SHA256SUMS as assets. Verify with sha256sum -c SHA256SUMS.

Changelog: CHANGELOG.md. Licence: MIT; see THIRD_PARTY_NOTICES.md.