truenas-aiops
This server (truenas-aiops) provides AI-powered TrueNAS SCALE storage management via REST API v2.0, offering 25 governed tools with audit logging, risk tiers, and undo/governance capabilities. Compatible with TrueNAS SCALE up to 25.10.x (TrueNAS 26+ not supported).
System & Overview
overview– One-shot health summary of pools, alerts, and servicessystem_info– Version, hostname, memory, CPU, uptime
ZFS Pools
pool_list,pool_get,pool_status,scrub_status,pool_capacity– Read pool health, topology, capacity, and scrub statepool_scrub_start(write, medium risk) – Start a pool integrity scrub
ZFS Datasets
dataset_list,dataset_get– List/inspect datasetsdataset_create(write, medium risk) – Create a new dataset
ZFS Snapshots
snapshot_list– List snapshots, optionally filtered by datasetsnapshot_create(write, medium risk) – Create a snapshot (records undo token)snapshot_delete(write, high risk) – Permanently delete a snapshot (irreversible; before-state captured for audit)
Disks & S.M.A.R.T.
disk_list– Physical disks with name, serial, model, size, pool assignmentsmart_test_results– Recent S.M.A.R.T. self-test results per disk
Alerts & Services
alert_list– Active alerts with level, class, and dismissed statusservice_list– Services with state (RUNNING/STOPPED) and enabled statusservice_restart(write, medium risk) – Restart a service (e.g., smb, nfs, ssh)
Replication & Cloud Sync
replication_list,cloudsync_list– List configured tasks with state and direction
Diagnostics
Pool health RCA, alert + capacity root-cause analysis
Governance & Undo
undo_list– View recorded, unapplied undo tokensundo_apply(write, medium risk) – Reverse a previous write operation (supports--dry-run)
Key Safety & Security Features
Every operation is logged to a local audit database with risk tiers and before-state capture
Destructive CLI operations require double confirmation and support dry-run
API keys stored encrypted (never plaintext), supports multi-target configuration
Provides tools for managing TrueNAS SCALE storage operations, including pools, datasets, snapshots, disks, alerts, services, and replication/cloud sync tasks.
Click on "Install 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., "@truenas-aiopslist current alerts"
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.
TrueNAS AIops
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by iXsystems or the TrueNAS project. "TrueNAS" is a trademark of its owner. MIT licensed.
AI-powered TrueNAS SCALE storage operations with a built-in governance
harness — unified audit log, policy engine, token/runaway budget guard,
undo-token recording, and descriptive risk tiers. Self-contained: no
external dependencies beyond httpx and the MCP SDK. Mock-validated
only, not yet verified against a live TrueNAS appliance.
Verification status: mock-validated only; REST endpoint paths are modelled from the documented API and not yet confirmed against a live appliance. See docs/VERIFICATION.md.
Supported TrueNAS versions — read this before upgrading
This tool talks to TrueNAS over the REST API v2.0 (/api/v2.0), and iXsystems
is retiring that API on a published timeline:
TrueNAS version | REST API v2.0 | What |
≤ 25.10.0 | supported | works normally |
25.10.1 – 25.10.x | deprecated; every REST call raises a deprecation alert on the appliance | works, and |
26 and newer | removed | does not work at all — |
TrueNAS 26 removed REST entirely, replacing it with JSON-RPC 2.0 over a
persistent WebSocket at /api/current. truenas-aiops does not speak that
transport yet, so upgrading an appliance to TrueNAS 26 is a breaking change for
this tool — not a routine upgrade. There is no configuration that works around
it; a WebSocket backend is a separate piece of work (new dependency, persistent
connection, and a different auth flow, since 26 also deprecates
auth.login_with_api_key).
Two things make this visible rather than mysterious:
truenas-aiops doctorreads the server version from/system/infoand says plainly whether REST is supported, deprecated, or gone. If the version cannot be read or parsed it reports UNKNOWN — never a clean bill of health it cannot justify.The connection layer recognises the failure shape. On a TrueNAS 26 box every REST path 404s; a 404 on an endpoint that exists on every REST-capable TrueNAS (e.g.
/system/info,/pool) raisesUnsupportedServerVersionwith an explanation, instead of a pile of "resource not found — the id may be stale" errors that send you hunting a stale id that was never the problem.
If you are on 25.10.x today, this tool works — plan the 26 upgrade knowing it will stop.
Related MCP server: TrueNAS Scale MCP Server
What works
CLI (
truenas-aiops ...):init,overview,system,pool list/get/status/scrub-status/capacity/scrub-start,dataset list/get/create,diagnose pool-health/alerts,snapshot list/create/delete,disk list/smart,alert list,service list/restart,replication list/cloudsync,secret set/list/rm/migrate/rotate-password,doctor,mcp.MCP server (
truenas-aiops mcportruenas-aiops-mcp): 25 tools (19 read, 6 write), every one wrapped with the bundled@governed_toolharness.Encrypted credentials: the TrueNAS API key lives in an encrypted store
~/.truenas-aiops/secrets.enc(Fernet + scrypt) — never plaintext on disk. Unlock with a master password fromTRUENAS_AIOPS_MASTER_PASSWORD(MCP/CI) or an interactive prompt (CLI).Reversibility:
snapshot_createrecords an inversesnapshot_deleteundo descriptor. The irreversiblesnapshot_delete(highrisk) captures the snapshot's BEFORE state for the audit record and declares no undo.Safety: destructive CLI ops (
snapshot delete,service restart) require double confirmation and support--dry-run.
What this tool does, and does not, decide
It delivers TrueNAS SCALE storage operations — reads and writes — accurately and efficiently, and records every one of them. It does not decide whether a write is allowed to happen. That is the agent's judgement, or the permission of the account you connect it with: scope the TrueNAS API key to a limited-privilege account and the writes fail at the appliance — the place that actually owns the permission.
So there is no read-only switch, no policy file, no approval gate to configure.
The one thing the tool guarantees is that nothing is silent: every call, over
MCP and over the CLI alike, lands an audit row in ~/.truenas-aiops/audit.db,
and reversible writes still capture their before-state and record an inverse.
Each tool declares a
risk_level, kept in agreement with its[READ]/[WRITE]documentation tag by a test, and carried into the audit row as a descriptive tier — so a reviewer can see at a glance that a row was a high-risk delete. It is a label, not a gate.
Running a smaller / local model? See agent-guardrails.md — it lists the guardrails this tool now enforces for you (so you don't spend prompt budget restating them) and gives a ready-made system prompt for what's left.
Playbook: triage a degraded pool
truenas-aiops diagnose pool-health # worst-first: bad state, error counters, capacity
# → e.g. CRITICAL tank "pool status is DEGRADED", and "read=4 checksum=2" on a vdev
truenas-aiops pool status tank # inspect the topology / scan detail it cited
truenas-aiops pool scrub-start tank # kick an integrity scrub (governed, medium risk)
truenas-aiops diagnose alerts # cross-check active alerts + any datasets near fullEach finding cites the measured number that tripped it (status string, error counts, used-percent) so you see why it was flagged, then points at the exact read/write command to act on it.
Capability matrix (25 MCP tools)
Category | Tools | Count | R/W |
Overview / System |
| 2 | read |
Diagnostics / RCA |
| 2 | read |
Pools |
| 5 | read |
| 1 | write (medium) | |
Datasets |
| 2 | read |
| 1 | write (medium) | |
Snapshots |
| 1 | read |
| 2 | write | |
Disks |
| 2 | read |
Alerts |
| 1 | read |
Services |
| 1 | read |
| 1 | write (medium) | |
Replication |
| 2 | read |
Undo (governance) |
| 1 | read |
| 1 | write (medium) |
Quick start
uv tool install truenas-aiops
truenas-aiops init # interactive wizard: connection details + encrypted API key
truenas-aiops doctor # verify config, encrypted store, connectivity (hits /system/info)init writes ~/.truenas-aiops/config.yaml (non-secret connection details) and
stores the API key encrypted in ~/.truenas-aiops/secrets.enc. Example
config it produces:
targets:
- name: nas1
host: 10.0.0.30
port: 443
verify_ssl: false # self-signed lab certs only
api_path: /api/v2.0Create the API key in the TrueNAS UI under Credentials → API Keys. For non-interactive use (MCP server, CI, cron) export the master password so the store can be unlocked without a prompt:
export TRUENAS_AIOPS_MASTER_PASSWORD='your-master-password'Managing secrets
truenas-aiops secret set nas1 # prompts hidden for the API key
truenas-aiops secret list # names only, values never shown
truenas-aiops secret rm nas1
truenas-aiops secret rotate-password # re-encrypt under a new master password
truenas-aiops secret migrate # import a legacy plaintext .env, then deletes itA legacy plaintext env var TRUENAS_<TARGET_NAME_UPPER>_APIKEY is still honoured
as a fallback with a deprecation warning (migrate with truenas-aiops secret migrate).
支持范围 / Supported scope
Versions: TrueNAS builds that still serve the REST API v2.0 — i.e. up to and including 25.10.x, with a deprecation warning from 25.10.1. TrueNAS 26 and newer are not supported (REST removed); see Supported TrueNAS versions.
Read: system info, ZFS pools (list/get/status/scrub-status/capacity), datasets
(list/get), snapshots (list), disks + S.M.A.R.T. results, alerts, services,
replication & cloud-sync tasks, one-shot health overview, and read-only
diagnostics / RCA (pool_health_rca, alert_and_capacity_rca). Mutating (governed,
dry-run + double-confirm where destructive): pool_scrub_start,
dataset_create, snapshot_create, snapshot_delete, service_restart.
缺功能?(Missing something?) Coverage is intentionally focused. Open an issue or PR at github.com/AIops-tools/TrueNAS-AIops — feature requests, contributions, and comments are all welcome.
Caveats
TrueNAS 26 is not supported: REST v2.0 — the only transport this tool speaks — was removed in TrueNAS 26. See Supported TrueNAS versions.
Mock-only: all behaviour is validated against mocked REST responses; not yet run against a live TrueNAS SCALE appliance.
truenas-aiops doctoris the fastest live check.Endpoint paths (e.g.
/pool/scrub/run,/zfs/snapshot/id/{id},/smart/test/results,/alert/list) are modelled against the documented TrueNAS SCALE REST v2.0 API and need live verification.Out of scope by design: anything that destroys bulk data (dataset/pool deletion, replication runs that overwrite) — only
snapshot_deleteremoves data, and it ishighrisk + double-confirmed.
Not for
Other NAS/storage or backup products, hypervisor VM lifecycle, container clusters, or network devices — those are out of scope for this tool.
License
Maintenance
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude Desktop and other MCP clients to interact with TrueNAS Core systems through the TrueNAS API, supporting user management, storage operations, sharing, and snapshot creation.Last updated2029MIT
- Alicense-qualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants to manage TrueNAS Scale Custom Apps using natural language commands, with tools for deploying, managing, and monitoring Docker Compose applications.Last updated6MIT
- AlicenseBqualityDmaintenanceMCP server for TrueNAS Scale that enables AI assistants to manage storage pools, datasets, apps, VMs, snapshots, and more via the native WebSocket API.Last updated59MIT
- AlicenseAqualityAmaintenanceAI-powered MCP server for managing Proxmox VE VMs and containers with built-in governance, audit logging, and reversibility.Last updated432MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/TrueNAS-AIops'
If you have feedback or need assistance with the MCP directory API, please join our Discord server