unas-mcp
Provides tools for managing a Ubiquiti UNAS Pro 8 NAS, including health monitoring, storage/disk inventory, NFS export visibility, read-only file inspection, and gated lifecycle operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@unas-mcpWhat's the current health of the NAS?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
unas-mcp
MCP server for managing a Ubiquiti UNAS Pro 8 NAS (6×26 TB RAID-6, ~104 TB
usable) — health monitoring, storage/disk inventory, NFS export visibility,
read-only file inspection, and gated lifecycle operations. 20 tools, deployed
as a container on VM 102 (http://10.0.40.25:8490/mcp).
What it is
The UNAS Pro 8 exposes two independent surfaces, and this server is a thin, safety-gated layer over both:
SSH (
root@<host>, key-only,src/unas_mcp/ssh.py) —/proc/mdstat,smartctl,df,rpcinfo,exportfs,uptime/last,uname, and a handful of read-only filesystem commands (ls,du). This is the same transportdocs/reference/unas-pro-8-capabilities.md(in thehomelabrepo) documents as voiding Ubiquiti's warranty — used here only where the UI and the Drive API cannot answer the question.UniFi Drive API (
src/unas_mcp/api.py, unofficial/undocumented — findings indocs/drive-api-findings.md) — physical bay mapping (slotId), vendorhealthScore/riskReasons, and per-RAID-groupcurrentProtectionvsexpectedProtection. SSH's/proc/mdstatandsmartctlare enough for pass/fail health, but they don't carry which physical bay to pull at the rack or the vendor's own risk scoring — that's the entire reason the Drive API transport exists in this server.
Every parser in this project is "tolerant but honest": a field genuinely
absent from a live reply is surfaced as None (or raises, for the small set
of fields health decisions are gated on), and is never silently defaulted
to a value that reads as healthy (0, "ok", False, or a label count
standing in for a verdict actually read). See api.py, parsers/smart.py,
and tools/storage.py's module docstrings for the specific traps this
pattern was built to close.
Related MCP server: unifi-mcp
Tool inventory (20 tools, 5 groups)
Group | Tool | Tier | What it does |
Health (SSH) |
| read | Rolled-up |
| read | Parsed | |
| read | One SMART record per drive bay (sda-sdf): verdict + the three failure-predicting counters | |
| read | Full SMART health + identity record for one drive bay | |
| read | Media volume capacity in bytes (total/used/avail) + used_pct, from | |
| read | Whether nfsd/mountd are registered with the local RPC portmapper | |
| read |
| |
| read |
| |
Lifecycle (SSH) |
| direct | Start a SMART self-test (short/long) on a drive bay |
| direct | Read a drive bay's SMART self-test log | |
| read | Firmware/OS release identity | |
| read | Running systemd services | |
| confirm | Reboot the appliance — ~9.5 min of NFS downtime for every client; requires | |
Storage (Drive API) |
| read | Every pool's status/type/capacity/usage + per-RAID-group protection state |
| read | Every physical disk + cache slot: | |
| read | Raw fan-control status | |
NFS (SSH) |
| read | Live |
| confirm | Recursive | |
Files (SSH) |
| read |
|
| read |
|
Tiers: read = no gate. direct = additive/trivially reversible, no
gate. confirm = requires confirm="yes" (safety.requires_confirmation) —
anything else raises PermissionError and issues no remote command.
Deliberate exclusions
Two categories of tool are absent by design, not merely unimplemented — their absence is the actual protection, not a confirmation prompt sitting in front of them:
No write file operations. Not move, delete, copy, upload, or mkdir. The same bytes are already reachable through nine NFS client mounts with ordinary tools (
mv,rm,cp,rsync, ...) — a second write path to the same ~75 TB of data only doubles the ways to corrupt it. Seetools/files.py's module docstring. (unas_fix_permissionsis the one narrow exception: achown, not a data-touching write, and the only survivor of an investigated-and-cut NFS-allow-list write path — seetools/nfs.py's module docstring for why that one was rejected.)No pool or disk lifecycle tools at all — no create/destroy/format/ reshape/expand for pools, RAID groups, or disks.
safety.pycalls this theabsenttier: "a confirmation prompt is a speed bump; absence is a wall."is_forbidden_tool_name()insafety.pyis defence in depth on top of that absence (it blocks an obviously-named destructive tool from being registered by accident), but the real guarantee is the exact-match allowlist test (tests/test_health_tools.py:: test_registers_exactly_the_twenty_expected_tool_names) — any new tool, named anything, fails it until a human deliberately updates the expected set.
Environment contract
Variable | Purpose |
| Hostname/IP of the UNAS Pro 8 |
| Path to the SSH private key used to reach the UNAS |
| UniFi Drive API key ( |
| Port the MCP server listens on (default |
Development
python3.12 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest -vDocker
docker build -t unas-mcp .The image includes an openssh-client for the SSH transport.
Deployed
Live on VM 102 (10.0.40.25:8490), registered for Claude Code:
claude mcp add unas --transport http http://10.0.40.25:8490/mcp --scope userThis server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for Product Management
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables AI assistants to manage UniFi network infrastructure, including cloud management, local network devices, and Protect cameras, through natural language.62MIT
- AlicenseNot gradedqualityCmaintenanceA safety-first MCP server for managing UniFi networks, exposing 17 tools for telemetry, diagnostics, and guarded mutations with dry-run previews and confirm requirements.14MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for UniFi Network Controller enabling AI assistants to manage UniFi infrastructure via natural language. It supports firewall rules, IPv6, and uses lazy/eager tool modes to minimize context usage.5Mozilla Public 2.0
- AlicenseAqualityBmaintenanceMCP server providing typed, safety-gated access to UniFi Network consoles via the official API, enabling management of devices, clients, networks, WiFi, firewall policies, and more.1618 npmMIT