- redact.go: scan the interior of string values for secret-keyed
key:value / key=value assignments, so a POSTGRES_PASSWORD embedded in a
custom app's compose YAML (returned by get_app_config as one blob) is
masked instead of reaching the model context. Non-secret lines and
ordinary prose are left byte-for-byte unchanged.
- registry.go: run the raw pool.query response through RedactJSON before
embedding it in handleQueryPools' parse-error string; handler errors are
returned unredacted, bypassing the normal choke point.
- poller.go/types.go: honor PollerConfig.MaxPollAttempts. It was declared
("0 = unlimited") but never read, so it read as a safety cap that wasn't
enforced. A task now fails once it exhausts the cap; 0 stays unlimited,
so default behavior is unchanged.
Flips the redact_gaps compose-blob test from asserting the gap to
asserting it is closed.
An independent audit of this fork found the headline claim -- 'the API key never
reaches a log line' -- was broken on a path I had not covered.
formatAPIErrorWithContext serialized the request params into the error string, and
for auth.login_ex those params ARE the plaintext key. Not debug-gated, not
redacted. Any middleware error frame on authentication (bad key, or a reconnect
that re-authenticates and fails mid-session) put the key into log.Fatalf at startup
AND, through CallTool's error return, into the model's context and the transcript.
My redaction test only covered the debug request-log frame, which is precisely why
this survived.
Worse, the deprecated auth.login_with_api_key passes the key as a bare positional
param -- a naked string with no key name -- so key-based redaction was structurally
incapable of masking it. redactParamsForError now masks every scalar param of any
auth.* method outright, leaving maps to key-based redaction so username/mechanism
still show up in the error.
Redaction gaps also closed: env vars come back as [{name:DB_PASSWORD,value:
...}], where the secret sits under the generic key value and no key rule could
see it; bindpw/keytab/bare-key were absent from the hints (upstream's
maskCredentials only masks those at the top level, so a nested one bypassed both);
and the float64 round-trip silently corrupted 64-bit integers like ZFS guids.
-insecure was a no-op: verification was always off while the flag claimed to be
what turned it off. That undercuts the ws:// rejection entirely -- refusing
plaintext to protect the key is hollow if the wss:// connection trusts any cert.
Verification is now on by default; -insecure genuinely disables it and warns.
TrueNAS is self-signed, so -insecure is required against a stock box -- but as an
explicit choice, not a silent default.
Remaining limit is documented, not hidden: redaction is key-name-based, so a secret
inside an opaque string blob (a custom app's compose YAML) is not caught. A test
pins that behaviour so it can't be mistaken for safety.
Read-only gate audited clean: gate before dispatch, fail-closed for unknown tools,
no mutating middleware method reachable from an allowlisted tool.
I briefly switched the default endpoint to the modern /api/current, but live
testing on 25.10.4 showed it hangs: the client speaks the legacy DDP-style
protocol ({msg:connect}, {msg:method}), which /api/current (pure JSON-RPC 2.0)
does not accept. The TCP connection opens, the handshake is ignored, and the
read blocks forever with no fallback.
So /websocket is the correct path for this protocol layer, and it works on
25.10 and through Fangtooth. Moving to /api/current -- the endpoint that
survives the REST removal in TrueNAS 26 -- is a rewrite of the connect/method
framing, not a URL swap. Documented as a known issue. The port de-hardcoding
from the previous commit stands.
Verified end-to-end against TrueNAS 25.10.4 over the br2 bridge.
auth.login_ex: auth.login_with_api_key is deprecated in TrueNAS 26 and removed
in 27. Switch to auth.login_ex (API_KEY_PLAIN), which needs the key's owning
username; add -username / TRUENAS_USERNAME, and fall back to the old call when
it is absent. API keys themselves are unaffected -- only the login method
changed.
Connection port: buildConnectionURLs discarded any port on the endpoint and
forced 443, breaking every install whose UI moved off the default (TrueNAS
ui_httpsport, or a reverse proxy holding 443 -- both true here: the UI is on
444). Honour an explicit host:port via net.SplitHostPort; default to 443 only
when none is given.
Credential logging: the client logged every request frame unconditionally --
including the auth.login_ex params, i.e. the plaintext API key -- with no
-debug guard. Thread -debug through to the client, gate all wire logging behind
it, and redact credential-shaped fields even then. A key must never reach a log
file, debug or not.
-api-key-file: read the key from a file so it stays out of argv (world-readable
via /proc) and out of the environment.
Tests cover port selection incl. IPv6 and ws:// rejection, and that the API key
is redacted from a logged auth frame while non-secret fields survive.
Upstream is unsafe to point at a NAS that hosts anything of consequence:
- system_reboot is registered with an empty input schema and a handler that
calls system.reboot immediately, so a model can take the host down in one
unconfirmed tool call. The README's claim of dry-run on 'all write
operations' is not accurate: dry-run is opt-in per call, and
ExecuteWithDryRun() falls through to real execution when the argument is
omitted.
- get_app_config returns app.config verbatim, putting database passwords,
encryption keys and API tokens into the model's context and into any
transcript that persists it.
-read-only is a fail-closed allowlist: 31 non-mutating tools are served, the
other 21 are refused, and anything not explicitly reviewed -- including tools
upstream adds later -- is refused by default. A denylist would silently admit
the next system_reboot. Refused tools are hidden from tools/list and rejected
at dispatch.
Redaction is unconditional, read-write mode included. A credential has no
business reaching the model, and relying on the operator to field-filter is
not a control.
Tests assert the mutating-tool list against the live registry, so an upstream
rename breaks the build instead of quietly widening the boundary.
Enables the full read-modify-write workflow for app configuration:
- get_app_config: calls app.config to retrieve current user-specified values
- update_app: job-based call to app.update with dry_run support and
host_path storage validation (reuses enforceHostPathStorage)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- get_system_metrics: add cputemp and uptime graph options
- get_disk_metrics: add type parameter to support disktemp in addition to disk I/O
- get_arc_metrics: new tool for ZFS ARC metrics (25 graph types including size, demand hit/miss rates, L2ARC stats)
- get_ups_metrics: new tool for UPS metrics (charge, runtime, voltage, current, frequency, load, temperature)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds two new job-based MCP tools for controlling app lifecycle:
- start_app: starts a stopped app via app.start, 10-minute job TTL
- stop_app: stops a running app via app.stop, 5-minute job TTL
Both tools follow the upgrade_app pattern: return a task_id and job_id
for async tracking via tasks_get, and support dry_run mode to preview
the operation without executing it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit addresses two critical bugs:
1. Job ID Parsing: Handle both integer and array responses
- TrueNAS API inconsistently returns job IDs as either int (123) or array ([123])
- Updated app.create, app.delete, and app.upgrade handlers to try parsing as int first
- If int parsing fails, parse as array and extract first element
- Fixes: "json: cannot unmarshal array into Go value of type int" error
2. WebSocket Buffer Overflow: Increase buffer sizes to 64KB
- Default 4KB buffers caused panic: "slice bounds out of range [:8192] with capacity 4096"
- Set ReadBufferSize and WriteBufferSize to 65536 bytes (64KB)
- Complements existing 10MB message limit for large API responses
- Prevents buffer overflow when TrueNAS sends large upgrade summaries
Files modified:
- tools/apps.go: handleInstallApp and handleDeleteApp job ID parsing
- tools/registry.go: handleUpgradeApp job ID parsing
- truenas/client.go: WebSocket dialer buffer configuration
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit introduces major improvements to the TrueNAS app installation
wizard, making it more efficient and easier to debug.
Schema Optimization (96% size reduction):
- Summarize large enums (600+ timezones) to show count + 3 examples instead of
listing all values, reducing schema output from 158KB to ~6KB
- Preserve small enums (≤10 items) completely for full visibility
- Extract only essential fields (variable, type, required, default, min/max)
- Recursively handle nested schemas and attributes
- Add formatSchemaForWizard() and summarizeQuestion() functions
Proactive Wizard Guidance:
- Enhanced storage_workflow with explicit step-by-step instructions
- Auto-query available pools instead of asking user to type pool names
- Present pool options or auto-select if only one pool exists
- Clear guidance: "NEVER ask user to type pool name - always query and present"
- Updated generateWizardGuidance() with 10-step workflow (was 9)
Auto-Create Dataset Ancestors:
- Change create_ancestors default from false to true in both registry and Go code
- Automatically creates parent datasets (e.g., tank/apps, tank/apps/syncthing)
- Prevents "parent dataset does not exist" errors
- Works like mkdir -p for ZFS datasets
Generic API Error Reporting:
- Add formatAPIErrorWithContext() to include request details in all API errors
- Show method name, complete params/payload, and full trace in every error
- Format trace as readable JSON when it's an object
- Enables instant debugging without checking logs or adding debug code
Testing:
- Add comprehensive tests for schema summarization and wizard guidance
- All 27+ test suites pass
- Successfully tested with Syncthing installation on TrueNAS 31
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements comprehensive Active Directory, LDAP, and FreeIPA integration:
- 7 new tools: status, query, configure, leave, refresh cache, list certificates
- Integration with system_health for automatic DS status monitoring
- Share creation tools now show directory service warnings
- Full credential masking for security (passwords/keytabs)
- Dry-run support for all write operations with safety warnings
- Task tracking for long-running join/leave operations
Uses unified directoryservices.* API methods for all operations.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove full WebSocket URL configuration options:
- Remove Option 2 (full WebSocket URL) from Claude Desktop config
- Remove "Add with full WebSocket URL" from Claude Code section
- Simplify --truenas-url flag description to only mention hostname
- Remove full WebSocket URL example from command-line examples
Remove Limitations section:
- Remove "Pool Capacity Historical Data" limitations section
- Remove from table of contents
These changes simplify the documentation by focusing on the recommended
hostname-based configuration approach and removing API limitation details
that are better tracked in issue trackers or release notes.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create docs/full-features.md with complete feature documentation
- Create docs/examples.md with all example queries organized by category
- Condense README features section to brief overview with link
- Condense README examples section to quick start with link
- Remove verbose "Storage Maintenance Best Practices" section
- Remove "Next Steps" section
- Reduce README from 817 to 431 lines for easier navigation
This improves maintainability and makes it easier for users to find
information without overwhelming the main README.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The boot.environment.destroy API expects parameters as a map/object
rather than a bare string. Updated the delete handler to pass the ID
as {"id": "name"} format, which resolves the "API error (code 0)" when
attempting to delete boot environments.
Tested successfully: deletion now works and correctly frees space.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds three new MCP tools for managing ZFS boot environments:
- query_boot_environments: List and filter boot environments with sorting
- delete_boot_environment: Safely delete old boot environments with dry-run
- get_current_boot_environment: Quick reference for active/activated environments
Features:
- Multi-layer safety checks prevent deleting active/activated/protected environments
- Dry-run support shows warnings and space to be freed
- Filtering by name, protected status, and deletable status
- Sorting by name, creation date, or size
- Human-readable size formatting and storage summaries
- Comprehensive test suite with 4 test functions
Updates system update workflow documentation to include boot environment
cleanup as part of the recommended maintenance process.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove -e flag examples from Claude Code installation section
- Keep only command-line argument approach (--truenas-url, --api-key)
- Update all three examples to use args instead of env vars
- Environment variable support can be added in future update
Users reported environment variables don't work with claude mcp add.
Sticking to proven command-line argument approach for now.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Table of Contents:
- Add comprehensive linked TOC at top of README
- Links to all major sections with proper anchor links
- Include subsections for installation steps and advanced features
- Improves navigation for long README document
Claude Code Installation:
- Add new "Claude Code" subsection under Step 3
- Document `claude mcp add` command with examples
- Show three configuration methods:
- Environment variables (recommended)
- Command-line arguments
- Full WebSocket URL
- Include verification and management commands (list, get, remove)
- Update Step 4 and Step 5 to cover both Claude Desktop and Claude Code
Additional Improvements:
- Restructure Step 3 with Claude Desktop and Claude Code subsections
- Generalize Step 4/5 headers to "MCP Client" instead of just Claude Desktop
- Replace example API key with placeholder for better security
- Maintain consistent formatting throughout
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Features Section:
- Add "System update and maintenance operations" section
- Document check_updates - check for available system updates
- Document download_update - download updates with task tracking
- Document apply_update - apply updates with optional reboot
- Document update_status - monitor update progress
- Document system_reboot - reboot system after updates
- Include safety warnings for destructive operations
Example Queries:
- Add "System Updates" section with 7 example queries
- Cover checking, downloading, applying, and monitoring updates
- Include system reboot examples
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add prominent warning notice at top of README
- Clarify project is in active development
- Note APIs and features may change
- Advise against production use
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add build.yml workflow that runs on push to main
- Runs linters and tests
- Builds binaries for macOS ARM64, Windows AMD64, Linux AMD64
- Uploads binaries as artifacts (30 day retention)
- Add release.yml workflow that runs on version tags (v*.*.*)
- Builds and packages binaries (tar.gz for Unix, zip for Windows)
- Generates SHA256 checksums
- Creates GitHub release with attached binary packages
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements NFS share creation following the same pattern as SMB shares, with interactive wizard flow for Unix/Linux file sharing.
**NFS Share Creation (create_nfs_share):**
- Network/host access restrictions (CIDR notation, IP/hostname)
- User mapping for security (maproot_user/group, mapall_user/group)
- Read-only or read-write access
- Security level selection (SYS, Kerberos)
- Comprehensive validation (CIDR format, host format)
- Security warnings for unrestricted access
- Dry-run mode with security analysis
- Mount command examples
**Wizard Guidance:**
Embedded in tool description to guide LLM through:
- Dataset selection (new with share_type=NFS, acltype=POSIX)
- Access control (read-only vs read-write)
- Network/host restrictions (CIDR and hostname validation)
- User mapping recommendations (maproot_user='nobody' for security)
- Security level selection (SYS default, Kerberos optional)
- Security warnings and confirmation flow
- Best practices for NFS security
**Validation:**
- CIDR notation validation for network restrictions
- Host format validation (no quotes or spaces)
- Path validation (must start with /mnt/, child datasets only)
**Security Features:**
- Warns if no network/host restrictions (accessible from anywhere)
- Warns if no maproot_user (root clients get root access)
- Recommends maproot_user='nobody' and maproot_group='nogroup'
- Highlights read-write + unrestricted as high risk
Reuses create_dataset tool for consistent dataset creation across SMB/NFS/iSCSI protocols.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed from 'existing directory' to 'existing ZFS dataset' with proper warnings:
- Query datasets first when using existing
- Never suggest pool root (e.g., tank, flash)
- Always use child datasets
- Clarified path description to show proper dataset mountpoints
This ensures users follow ZFS best practices and don't accidentally share pool roots or arbitrary directories.
Implements Phase 1 & 2 of SMB share creation plan with interactive wizard flow guided by comprehensive tool descriptions. The LLM naturally walks users through configuration by following embedded guidance in tool descriptions.
**Dataset Creation (create_dataset):**
- Reusable for SMB, NFS, iSCSI, and apps
- Supports FILESYSTEM and VOLUME types
- Encryption with auto-key or passphrase
- Compression (LZ4, ZSTD, GZIP), quotas, ACLs
- Share type optimization (SMB, NFS, MULTIPROTOCOL, APPS)
- Comprehensive validation and error handling
- Dry-run mode for previewing changes
**SMB Share Creation (create_smb_share):**
- Purpose-based configuration (standard, Time Machine, multi-protocol, etc.)
- Access control (IP restrictions, read-only, browsability)
- Audit logging support
- Security warnings for public shares
- Network path generation
- Dry-run with security analysis
**Wizard Guidance:**
Embedded in tool descriptions to guide LLM through:
- Pool and dataset name selection
- Encryption recommendations
- Compression and quota configuration
- Share purpose and access control
- Security warnings and confirmation flow
- Best practices for each use case
Both tools support dry-run mode and require explicit user confirmation before write operations, with comprehensive previews showing exactly what will be created.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enables natural language queries for virtual machines with intelligent filtering by name/state/autostart, sorting by name/memory/status, and simplified device summaries. Automatically excludes sensitive data like display passwords for security. Returns clean VM information with CPU/memory config, bootloader, devices (disks, NICs, displays), and current state.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enables natural language queries for ZFS snapshots with intelligent filtering by dataset/pool/holds, sorting by name/dataset/created date, and automatic parsing of common snapshot naming patterns (auto-YYYY-MM-DD format). Returns simplified response with essential fields and metadata, following the same pattern as query_datasets to keep responses manageable.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add intelligent filtering: pool name, encryption status
- Add sorting: by space usage (default), available space, or name
- Add configurable limit (default 50) to prevent overwhelming responses
- Simplify dataset output: ~15 relevant fields instead of 40+ nested properties
- Show human-readable sizes alongside bytes for calculations
- Fix API call to pass required options parameter (was causing API errors)
- Update README with enhanced dataset query examples and capabilities
This reduces typical query responses from 75KB (138 datasets × 200 lines) to
manageable sizes while preserving all critical information for capacity
planning and space analysis queries.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The TrueNAS system.reboot API requires a reason parameter.
Updated the call to pass "System reboot requested via MCP" as the reason.
This fixes the issue where reboot commands were not executing.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements system reboot functionality via MCP:
New Tool:
- system_reboot: Reboot the TrueNAS system
Features:
- Simple parameter-less reboot trigger
- Clear warnings about connection loss
- Designed for use after system updates (EREBOOTREQUIRED state)
- Enables LLM to prompt user for reboot after update completion
Usage:
After applying system updates, the LLM can detect EREBOOTREQUIRED
status and offer to reboot the system to complete the update process.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements comprehensive system update management for TrueNAS via MCP:
New Tools:
- check_updates: Query available TrueNAS system updates
- download_update: Download updates with graceful "already downloaded" detection
- apply_update: Apply updates with job-based task tracking
- update_status: Get current update status and progress
Features:
- Automatic detection of pre-staged updates (TrueNAS auto-downloads)
- Job-based task tracking for long-running update operations
- Dry-run support for both download and apply operations
- LLM orchestration support for multi-step update workflows
- Proper status codes (EREBOOTREQUIRED after update applied)
Testing:
- Full update workflow tested on TrueNAS 26.04.0-MASTER
- Successfully downloaded and applied updates with task tracking
- Gracefully handles already-downloaded updates
- Task polling tracked all update stages (verify, extract, migrate, etc.)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements MCP Tasks specification for tracking long-running operations
like app upgrades, and adds a reusable dry-run pattern for previewing
write operations before execution.
New features:
- MCP Tasks system with background polling and automatic status updates
- tasks_list and tasks_get tools for querying task status
- upgrade_app now returns task IDs instead of raw job IDs
- Dry-run support for upgrade_app to preview changes
- Increased WebSocket read limit to handle large TrueNAS responses
- Fixed upgrade_summary parsing to handle both array and object responses
- Fixed MCP capabilities to properly advertise tool support
Architecture:
- New tasks/ package with Manager, Store, and Poller
- Reusable DryRunnable interface for write operations
- Task TTL and automatic cleanup
- Supports both job-based and status-based operations
Testing:
- Successfully upgraded 4 apps on production TrueNAS
- Task tracking verified working end-to-end
- All linters passing
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add analyze_capacity tool for comprehensive capacity analysis
- CPU, memory, network, and disk I/O utilization trends
- Current, average, and peak utilization percentages
- Trend detection using linear regression
- Conservative thresholds: 70% warning, 85% critical
- Growth projections for increasing trends
- Overall recommendations and status
- Add get_pool_capacity_details tool
- Current pool and dataset capacity snapshots
- Utilization percentages with status warnings
- Per-dataset capacity breakdown
- Documents API limitation: no historical pool capacity data
- Enhance system_health tool with capacity warnings
- Automatic checks for CPU, memory, and pool capacity
- Integrates capacity status into overall health
- Add helper functions for capacity analysis
- Data extraction, statistical calculations
- Linear regression for trend analysis
- Projection calculations for growth forecasting
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes:
- Architecture diagram now shows only wss:// (not ws://)
- Update port references to only mention 443 (not 80)
- Clarify that ws:// is not allowed (not just "not recommended")
- Update security section to emphasize wss:// is enforced
- Remove any suggestions that ws:// is supported
This aligns documentation with the actual implementation which
rejects ws:// connections to protect API keys from revocation.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
After removing SSE server/client code, clean up:
- github.com/r3labs/sse/v2 (no longer used)
- Related test dependencies
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Delete PROXY.md documentation
- Remove cmd/truenas-mcp-proxy/ directory
- Remove SSE server and client code (mcp/sse_*.go)
- Remove old proxy.go bridge code
- Update .gitignore to remove proxy binary patterns
All functionality now consolidated into single truenas-mcp binary.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The app.upgrade API method returns a job ID (integer) since upgrading an app
is a long-running operation, but the code was trying to parse it as an object.
Changes:
- Parse result as integer job ID instead of map
- Return job ID to user so they can track upgrade progress
- Add helpful message to use query_jobs to monitor the upgrade
- Remove incorrect upgrade_result field that was causing unmarshal error
Users can now use query_jobs with the returned job ID to track the upgrade
status and see when it completes.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Transparently handles connection drops without exposing errors to the caller.
When a connection error occurs (broken pipe, EOF, etc.), the client now:
1. Detects it's a connection error
2. Automatically reconnects and re-authenticates
3. Retries the request
4. Only returns error if retry also fails
This eliminates the "broken pipe" errors that users were seeing after idle
connections, providing a seamless experience where reconnection happens
transparently in the background.
Connection errors handled:
- Broken pipe
- Connection reset
- EOF
- Closed network connection
- Connection refused
- I/O timeout
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements query_jobs tool and enhances system_health with active jobs tracking.
This allows the AI agent to see if replication, snapshots, scrubs, or other
long-running tasks are in progress.
New features:
- query_jobs tool: Query system jobs with state filtering (RUNNING, WAITING, SUCCESS, FAILED)
- Enhanced system_health: Now includes active jobs summary and job count
- Support for all job states and configurable result limits
- Job details include: id, method, state, progress, timestamps, errors
Uses core.get_jobs API with proper query filters and options.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major architectural change from two-binary (server + proxy) to single native
binary that runs entirely on desktop and connects directly to TrueNAS.
Key changes:
- Single binary eliminates need for TrueNAS server deployment
- Direct WebSocket connection to TrueNAS middleware over wss://
- Security: Only allow wss:// connections (TrueNAS revokes API keys over ws://)
- Self-signed certificate support enabled by default
- MCP notification support (handles notifications/initialized)
- Simplified configuration: just hostname and API key
- Cross-platform builds: macOS (ARM64/AMD64), Linux, Windows
Architecture benefits:
- No deployment to TrueNAS required
- Runs entirely on user's desktop
- Simpler setup and configuration
- Better security with mandatory encryption
- Smaller codebase (~2000 lines of SSE code removed)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
New read-only tool:
- query_apps: List installed applications with status, versions, and available updates
- Shows app state, current version, upgrade availability
- Includes web portals and active container counts
- Optional config details retrieval
New write operation:
- upgrade_app: Upgrade applications to newer versions
- Defaults to creating snapshots for rollback safety
- Shows upgrade summary before proceeding
- Supports specific version or "latest"
Also includes:
- Fix for app.query API validation (use empty array instead of null for filters)
- Updated README with new tools and categorized example usage
- Added performance metrics tools to feature list
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix empty string vs null handling for network/disk identifiers
- Reduce response size by sampling data points (first/last 10) instead of full arrays
- Auto-discover network interfaces and disks when none specified
- Fix disk metrics by querying reporting.graphs for proper identifiers
- Use full identifier strings from reporting.graphs (e.g., "sda | Type: SSD...")
This resolves API errors when querying performance metrics and prevents
connection failures from oversized responses (122KB+ payloads).
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>