truenas-ws-mcp
Provides tools for managing TrueNAS Scale systems, including storage pools, datasets, applications, VMs, snapshots, sharing, networking, SMART testing, cloud sync, and system management via the WebSocket API.
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., "@truenas-ws-mcp list my storage pools"
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-ws-mcp
An MCP (Model Context Protocol) server for TrueNAS Scale that connects via the native WebSocket API. Gives AI assistants like Claude full visibility and control over your TrueNAS homelab — storage pools, datasets, apps, VMs, snapshots, SMART tests, and more.
Features
61 tools covering storage, apps, VMs, snapshots, sharing, networking, SMART, cloud sync, and system management
Native WebSocket DDP protocol (same as the TrueNAS UI uses)
Works with TrueNAS Scale 24.10+ (Dragonfish and newer)
Runs as a standard MCP server via
stdiotransport
Related MCP server: TrueNAS Scale MCP Server
Quick Start
Install
# With uv (recommended)
uvx truenas-ws-mcp
# With pip
pip install truenas-ws-mcpConfigure
Set these environment variables (or create a .env file):
Variable | Required | Default | Description |
| Yes | — | API key from TrueNAS (System > API Keys) |
| No |
| WebSocket URL of your TrueNAS instance |
| No |
| SSL certificate verification |
| No |
| API call timeout in seconds |
The URL is flexible — you can pass https://192.168.1.100, wss://truenas.local/websocket, or just a hostname. It will be normalized automatically.
Add to Claude Code
{
"mcpServers": {
"truenas": {
"command": "uvx",
"args": ["truenas-ws-mcp"],
"env": {
"TRUENAS_API_KEY": "your-api-key-here",
"TRUENAS_URL": "wss://your-truenas-ip/websocket"
}
}
}
}Add to Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"truenas": {
"command": "uvx",
"args": ["truenas-ws-mcp"],
"env": {
"TRUENAS_API_KEY": "your-api-key-here",
"TRUENAS_URL": "wss://your-truenas-ip/websocket"
}
}
}
}Available Tools
Storage (8 tools)
list_pools, get_pool_status, list_datasets, get_dataset, create_dataset, update_dataset, delete_dataset
Snapshots (6 tools)
list_snapshots, create_snapshot, delete_snapshot, rollback_snapshot, clone_snapshot, list_snapshot_tasks
Apps (10 tools)
list_apps, get_app_config, update_app_config, install_app, delete_app, start_app, stop_app, upgrade_app, redeploy_app, list_available_apps
VMs (4 tools)
list_vms, start_vm, stop_vm, update_vm
Sharing (6 tools)
list_smb_shares, create_smb_share, delete_smb_share, list_nfs_exports, create_nfs_export, delete_nfs_export
System (7 tools)
system_info, list_alerts, list_services, list_jobs, get_audit_log, list_cron_jobs, get_boot_pool
Disks & SMART (4 tools)
list_disks, get_disk_temps, list_smart_results, run_smart_test
Network (2 tools)
list_interfaces, get_network_config
Cloud & Replication (4 tools)
list_cloud_syncs, run_cloud_sync, list_replications, run_replication
Reporting (2 tools)
list_graphs, get_reporting_data
Users (5 tools)
list_users, get_user, create_user, update_user, delete_user
Updates & Certs (2 tools)
check_updates, list_certificates
Important Notes
App config updates are REPLACE, not MERGE. When using
update_app_config, send ALL storage/config keys — omitted keys revert to defaults.VM RAM/CPU changes require a full stop+start from TrueNAS. Rebooting from inside the VM does NOT re-allocate resources.
Destructive operations (delete dataset, snapshot, share, user, app) require
confirm=Trueas a safety guard.Self-signed certs are common in homelabs. SSL verification is off by default.
Development
git clone https://github.com/thoriphes/truenas-ws-mcp.git
cd truenas-ws-mcp
uv sync
cp env.example .env
# Edit .env with your TrueNAS credentials
uv run pytestLicense
MIT
Available Tools
59 toolscheck_updatesA
Check for available TrueNAS system updates.
Inputs: no named parameters. Returns: object
clone_snapshotC
Clone a snapshot to a new dataset.
Inputs: snapshot_name (required), target_dataset (required). Returns: object
create_datasetC
Create a new ZFS dataset.
Inputs: name (required), type, compression, quota, +2 more. Returns: object
create_nfs_exportB
Create a new NFS export. Path must start with /mnt/.
Inputs: path (required), comment, readonly, networks, +1 more. Returns: object
create_snapshotC
Create a manual ZFS snapshot.
Inputs: dataset (required), name (required), recursive. Returns: object
create_userC
Create a new system user.
Inputs: username (required), full_name (required), password (required), email, +2 more. Returns: object
delete_appB
Delete an installed app. Requires confirm=True.
Inputs: app_name (required), confirm. Returns: result
delete_datasetB
Delete a dataset. Requires confirm=True.
Inputs: name (required), confirm. Returns: result
delete_nfs_exportA
Delete an NFS export by ID. Requires confirm=True.
Inputs: id (required), confirm. Returns: result
delete_snapshotA
Delete a snapshot. Requires confirm=True. Snapshot format: dataset@name.
Inputs: snapshot_name (required), confirm. Returns: result
delete_userC
Delete a user. Requires confirm=True.
Inputs: user_id (required), confirm. Returns: result
get_app_configC
Get the full configuration of a specific app.
Inputs: app_name (required). Returns: object
get_audit_logC
Query audit log entries (auth events, config changes).
Inputs: services, limit. Returns: result
get_boot_poolB
Get boot pool health status.
Inputs: no named parameters. Returns: object
get_datasetB
Get detailed info for a specific dataset.
Inputs: name (required). Returns: object
get_disk_tempsA
Get current temperatures for all disks.
Inputs: no named parameters. Returns: result
get_network_configA
Get network configuration: DNS servers, gateway, hostname.
Inputs: no named parameters. Returns: object
get_pool_statusB
Get detailed pool status with VDEV topology and error counts.
Inputs: pool_name (required). Returns: object
get_reporting_dataB
Get historical reporting data for a graph.
Units: HOUR (1h), DAY (24h), WEEK, MONTH, YEAR. Some graphs need an identifier (e.g., disk name 'sda' for disk graphs, interface name 'enp5s0' for network graphs). Response format: [{name, identifier, data: [[unix_timestamp, value], ...]}]. Memory/ARC values in bytes, CPU in percentage.
Inputs: graph (required), unit, identifier. Returns: result
get_userC
Get details for a specific user.
Inputs: username (required). Returns: object
install_appC
Install an app from the catalog.
Inputs: app_name (required), values. Returns: object
list_alertsA
List all active TrueNAS alerts with severity levels.
Inputs: no named parameters. Returns: result
list_appsA
List all installed apps with their state.
Inputs: no named parameters. Returns: result
list_available_appsB
Browse the app catalog for available apps to install.
Inputs: no named parameters. Returns: result
list_certificatesA
List all SSL/TLS certificates.
Inputs: no named parameters. Returns: result
list_cloud_syncsA
List all cloud sync tasks with their status and schedule.
Inputs: no named parameters. Returns: result
list_cron_jobsA
List all configured cron jobs.
Inputs: no named parameters. Returns: result
list_datasetsA
List datasets with usage and quota info. Always specify a pool to avoid timeouts on large systems.
Inputs: pool. Returns: result
list_disksA
List all disks with model, serial number, size, and pool membership.
Inputs: no named parameters. Returns: result
list_graphsA
List available reporting graphs and their identifiers.
Available graphs include: cpu, cputemp, memory, disk, interface, load, uptime, arcsize, disktemp, and more. Some graphs require an identifier (disk name for 'disk'/'disktemp', interface name for 'interface').
Inputs: no named parameters. Returns: result
list_interfacesA
List network interfaces with IPs and link state.
Inputs: no named parameters. Returns: result
list_jobsA
List recent system jobs with status, progress, and errors.
Inputs: no named parameters. Returns: result
list_nfs_exportsB
List all NFS exports.
Inputs: no named parameters. Returns: result
list_poolsA
List all storage pools with health, capacity, and fragmentation.
Inputs: no named parameters. Returns: result
list_replicationsA
List all replication tasks with their status.
Inputs: no named parameters. Returns: result
list_servicesA
List all services and their running status (SMB, NFS, SSH, etc.).
Inputs: no named parameters. Returns: result
list_smart_resultsA
List SMART test results for all disks.
Inputs: no named parameters. Returns: result
list_snapshotsA
List ZFS snapshots. Always specify a dataset to avoid timeouts on large systems.
Inputs: dataset. Returns: result
list_snapshot_tasksA
List automated snapshot task schedules.
Inputs: no named parameters. Returns: result
list_usersA
List all system users.
Inputs: no named parameters. Returns: result
list_vmsA
List all virtual machines with their state, CPU, and RAM configuration.
Inputs: no named parameters. Returns: result
redeploy_appC
Redeploy an app with its current configuration.
Inputs: app_name (required). Returns: result
rollback_snapshotA
Rollback dataset to snapshot. Requires confirm=True. WARNING: destroys newer data.
Inputs: snapshot_name (required), confirm. Returns: result
run_cloud_syncC
Trigger a cloud sync task to run immediately.
Inputs: task_id (required). Returns: result
run_replicationC
Trigger a replication task to run immediately.
Inputs: task_id (required). Returns: result
run_smart_testA
Run a SMART test on specified disks. test_type: SHORT or LONG. Note: TrueNAS 25.10 removed SMART scheduling from the API — these are manual tests only.
Inputs: disks (required), test_type. Returns: result
start_appC
Start a stopped app.
Inputs: app_name (required). Returns: result
start_vmC
Start a virtual machine.
Inputs: vm_id (required). Returns: result
stop_appC
Stop a running app.
Inputs: app_name (required). Returns: result
stop_vmA
Stop a virtual machine. Attempts graceful shutdown first, forces after timeout.
RAM/CPU changes require full stop+start from TrueNAS — in-guest reboot does NOT re-allocate resources.
Inputs: vm_id (required), force. Returns: result
system_infoA
Get TrueNAS system information: version, uptime, CPU, RAM, boot time.
Inputs: no named parameters. Returns: object
update_app_configA
Update app configuration.
WARNING: This is a REPLACE operation, not a merge. Any config keys not included will revert to defaults. Always get current config first with get_app_config, modify the needed values, and send the complete config.
Inputs: app_name (required), values (required). Returns: object
update_datasetC
Update dataset properties (compression, quota, comments, etc.).
Inputs: name (required), properties (required). Returns: object
update_userC
Update user properties.
Inputs: user_id (required), properties (required). Returns: object
update_vmA
Update VM configuration (RAM, CPUs, etc.).
Note: RAM/CPU changes only take effect after a full stop+start from TrueNAS — rebooting from inside the VM does NOT re-allocate resources.
Inputs: vm_id (required), settings (required). Returns: object
upgrade_appC
Upgrade an app to the latest available version.
Inputs: app_name (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 59 tools
Each tool targets a distinct resource and action (e.g., create_dataset vs delete_dataset, list_apps vs list_available_apps). Descriptions clearly differentiate similar tools, and overlaps are minimal and well-explained.
The vast majority use a consistent verb_noun pattern in snake_case (e.g., create_dataset, delete_user). The only minor exception is 'system_info' (noun_noun), but overall the naming is predictable and easy to follow.
With 59 tools, the count is excessively high for an MCP server, far beyond the typical 3-15 range. While TrueNAS is a complex system, many tools could be consolidated (e.g., separate list/get tools could be combined with parameters).
The tool set heavily favors read operations (list/get), but lacks write/update/delete for many key resources such as services, certificates, cron jobs, replication tasks, cloud sync tasks, and network configuration. This leaves significant gaps for full system management.
Maintenance
Related MCP Connectors
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
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.20128 PyPI34MIT
- AlicenseNot gradedqualityDmaintenanceA 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.7MIT
- AlicenseAqualityBmaintenanceAI-powered MCP server for TrueNAS SCALE storage operations with governance and safety features, enabling management of pools, datasets, snapshots, disks, alerts, and services.251MIT
- AlicenseAqualityBmaintenanceAn MCP server for TrueNAS that lets users manage ZFS pools, datasets, shares, snapshots, VMs, alerts, and network configuration through natural language, using a single hierarchical tool exposing 278 actions.125 npm1MIT