You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires MCP SDK 2.0 (mcp[cli]>=2.0,<3.0). mcp.server.fastmcp no longer exists in 2.0; the server is now built with MCPServer and reports its package version in the stdio handshake.
Fixed
Authentication could never use auth.login_ex. It defaulted the username to empty, which TrueNAS answers with AUTH_ERR, and the fallback to the deprecated auth.login_with_api_key silently rescued every login — so the tool depended entirely on a deprecated method while appearing future-proof. login_ex is now used whenever username is configured (both 25.04 and 26 serve it) and its failures are reported, not masked: a wrong username used to be papered over. With no username, the deprecated call is used and warned about.
The method table was pinned to one release's names. Snapshots are zfs.snapshot.* on 25.04 and pool.snapshot.* on TrueNAS 26 — each namespace absent from the other — and service.restart became service.control. Routes now carry candidates resolved against the appliance's own core.get_methods, so one build works on both. smart_test_results has no equivalent on 26 and refuses with a teaching error rather than returning an empty list.
The CLI printed success for a failed write. A governed twin returning {"error": ...} still produced a green line and exit 0 — live-caught on TrueNAS 26 where the middleware rejected the call outright. Every CLI write now goes through checked(): error → exit 1, undetermined → exit 2.
The pool RCA sanitised the pool name but not its status. Unlike the sibling tools, whose RCAs are handed already-sanitized ops output, this one receives RAW /pool records — so appliance-controlled text reached a finding an agent reads without passing the control-character filter. .upper() is not a sanitiser. A line-wide sweep confirmed this repo was the only one affected; the other RCAs re-stringify values their ops layer already cleaned.
undo apply works from the CLI. Every write tool is imported lazily inside its own CLI command, so a CLI-driven undo ran in a process where the inverse tool was never registered and failed with "inverse tool is not registered" — for every write tool. Only the MCP entry point, which imports the whole server, worked.
Added
JSON-RPC 2.0 over WebSocket transport (/api/current) — the API that survives TrueNAS 26, which removed REST v2.0. New transport: setting per target: auto (default; probes the appliance and prefers WebSocket), websocket, or rest. The transport presents the same get/post/delete surface over REST-shaped paths, so no ops module changed. Every middleware method was taken from a live appliance's core.get_methods and cross-checked against its REST result; the full write→audit→undo→verified-restore loop passes over WebSocket. websockets is now a declared dependency (it was only transitive via mcp), and the frame ceiling is raised well above the library's 1 MiB default, which closes the connection with 1009 message too big on any large listing.
doctor reports the transport in use, and no longer warns that "this tool needs a WebSocket transport" while using one.
Pool reads accept a pool name, not just the numeric id./pool/id/{id} takes TrueNAS's numeric id, so get_pool / pool_status / scrub_status returned 404 … the id may be stale for a pool name — the only identifier a caller ever has. This tool's own pool-health finding r