truenas-mcp
Provides tools for managing a TrueNAS system via its WebSocket JSON-RPC API, including pools, datasets, snapshots, VMs, applications, users and groups, filesystem ACLs, disks, system configuration, and SMB/NFS sharing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
truenas-mcp
MCP server (stdio) for the TrueNAS WebSocket JSON-RPC API. Provides tools for managing pools, VMs, applications, users, filesystems, disks, system configuration, sharing (SMB/NFS), and more.
Installation
pip install git+https://github.com/yourusername/truenas-mcp.gitOr with Docker:
docker run -i --rm \
-e TRUENAS_URL=wss://nas.example.com/api/current \
-e TRUENAS_API_KEY=your-api-key \
yourusername/truenas-mcpRelated MCP server: truenas-mcp
Configuration
Configure via environment variables:
Variable | Required | Default | Description |
| Yes* | - | WebSocket URL (e.g., |
| Yes* | - | API key string or path to key file |
| No | - | Username for API key auth (TrueNAS 26+) |
| No |
| Verify SSL certificates |
| No |
| Request timeout in seconds |
| No |
| Disable write tools |
| No |
| Connect to local Unix socket (no auth) |
*Either TRUENAS_URL + TRUENAS_API_KEY OR TRUENAS_LOCAL=true required.
Local Connection (Running on TrueNAS)
When running on the TrueNAS host itself, use the local Unix socket:
TRUENAS_LOCAL=true truenas-mcpNo API key or URL needed - connects to ws+unix:///var/run/middleware/middlewared.sock.
Remote Connection
TRUENAS_URL=wss://nas.example.com/api/current \
TRUENAS_API_KEY=1-abcdef123456... \
TRUENAS_USERNAME=admin \
TRUENAS_VERIFY_SSL=true \
truenas-mcpAvailable Tools
Pools & Storage
list_pools- List storage poolsget_pool- Get pool detailspool_status- Get pool health/statuscreate_pool- Create new pooldelete_pool- Destroy poolimport_pool- Import existing poolexport_pool- Export poolpool_scrub- Start scrublist_datasets- List datasetsget_dataset- Get dataset detailscreate_dataset- Create datasetdelete_dataset- Delete datasetupdate_dataset- Update dataset propertieslist_snapshots- List snapshotscreate_snapshot- Create snapshotdelete_snapshot- Delete snapshotrollback_snapshot- Rollback to snapshotlist_snapshot_tasks- List periodic snapshot taskscreate_snapshot_task- Create snapshot taskdelete_snapshot_task- Delete snapshot tasklist_scrubs- List scrub tasksget_scrub- Get scrub statuscreate_scrub- Create scheduled scrubrun_scrub- Manually run scrub
Virtual Machines
list_vms- List VMsget_vm- Get VM detailsvm_status- Get VM power statusstart_vm- Start VMstop_vm- Stop VMrestart_vm- Restart VMpoweroff_vm- Hard power offsuspend_vm- Suspend VMresume_vm- Resume VMcreate_vm- Create VMdelete_vm- Delete VMupdate_vm- Update VM configclone_vm- Clone VMget_vm_console- Get console infovm_get_display_web_uri- Get web console URIlist_vm_devices- List VM devicesvm_device_create- Add devicevm_device_delete- Remove devicevm_device_update- Update device
Applications/Containers
list_apps- List applicationsget_app- Get app detailsstart_app- Start appstop_app- Stop apprestart_app- Restart appredeploy_app- Redeploy appupdate_app- Update app configdelete_app- Delete appapp_available- List available appsapp_categories- List app categoriesapp_latest- Get latest app versionapp_image_list- List imagesapp_image_pull- Pull docker imageapp_image_delete- Delete imageapp_registry_list- List registriesapp_registry_create- Create registryapp_registry_delete- Delete registryapp_ix_volume_query- Query IX volumesapp_ix_volume_create- Create IX volume
Users & Groups
list_users- List usersget_user- Get user detailscreate_user- Create userupdate_user- Update userdelete_user- Delete userset_user_password- Set passwordrenew_user_2fa_secret- Renew 2FAunset_user_2fa_secret- Remove 2FAlist_groups- List groupsget_group- Get group detailscreate_group- Create groupupdate_group- Update groupdelete_group- Delete group
Filesystem Operations
list_directory- List directory contentsread_file- Read file contentswrite_file- Write filemkdir- Create directorychown- Change ownershipset_permissions- Set permissionsget_acl- Get ACLset_acl- Set ACLstat- Get file statuslist_acl_templates- List ACL templatesget_acl_template- Get ACL templatecreate_acl_template- Create ACL templateupdate_acl_template- Update ACL templatedelete_acl_template- Delete ACL template
System & Hardware
system_info- System informationsystem_general_config- General configsystem_security_info- Security infosystem_security_config- Security configsystem_ntp_servers- List NTP serverssystem_country_choices- Country choicessystem_fips_available- FIPS availabilitysystem_fips_enabled- FIPS statusreboot- Reboot systemshutdown- Shutdown systemupdate_system_general- Update general configupdate_system_security- Update security configcreate_ntp_server- Add NTP serverdelete_ntp_server- Remove NTP serverlist_disks- List physical disksdisk_temperature_alerts- Disk tempsdisk_get_info- Disk detailslist_interfaces- List network interfaceslist_certificates- List certificatescreate_certificate- Create certificatedelete_certificate- Delete certificateipmi_is_loaded- IPMI statuslist_boot_environments- List boot environmentsget_boot_environment- Get boot envactivate_boot_environment- Activate boot envcreate_boot_environment- Create boot env
Sharing (SMB/NFS)
list_smb_shares- List SMB sharesget_smb_share- Get SMB sharecreate_smb_share- Create SMB shareupdate_smb_share- Update SMB sharedelete_smb_share- Delete SMB shareset_smb_acl- Set SMB ACLsmb_config- SMB global configupdate_smb_config- Update SMB configlist_nfs_shares- List NFS sharesget_nfs_share- Get NFS sharecreate_nfs_share- Create NFS shareupdate_nfs_share- Update NFS sharedelete_nfs_share- Delete NFS sharenfs_config- NFS global configupdate_nfs_config- Update NFS config
Usage with MCP Client
Add to your MCP client configuration:
{
"mcpServers": {
"truenas": {
"command": "truenas-mcp",
"env": {
"TRUENAS_URL": "wss://nas.example.com/api/current",
"TRUENAS_API_KEY": "your-api-key",
"TRUENAS_USERNAME": "admin"
}
}
}
}API Key Generation
In TrueNAS web UI, go to Settings → API Keys
Click Add to create a new API key
Set appropriate permissions for the user
Copy the generated key (shown only once)
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
pyrightLicense
MIT# CI fix
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Accelo companies, contacts, jobs, tasks, tickets and time.
Read NodePing checks, uptime, results and events; mute checks, manage maintenance and schedules.
Manage servers through SSH.
Manage brainCloud apps, cloud code, hooks and servers; API lookups to help generate client code.
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.20130 PyPI35MIT
- AlicenseNot gradedqualityBmaintenanceProvides comprehensive management of TrueNAS SCALE instances through 278 actions across 18 categories using a token-efficient hierarchical tool design. Users can perform tasks like storage management, service configuration, and system monitoring while benefiting from built-in safety confirmations and read-only dashboard resources.32 npm8MIT
- AlicenseNot gradedqualityCmaintenanceEnables comprehensive management of Proxmox virtualization environments, including VM and container lifecycle, snapshots, backups, monitoring, and OpenAPI integration.12MIT
- AlicenseBqualityDmaintenanceMCP server for TrueNAS Scale that enables AI assistants to manage storage pools, datasets, apps, VMs, snapshots, and more via the native WebSocket API.59MIT