The TrueNAS Core MCP Server provides a natural language interface to manage and control TrueNAS Core systems through a production-ready Model Context Protocol (MCP) server.
User Management: Create, update, delete, and list users with detailed information retrieval and permission management.
Storage Management: Manage ZFS pools and datasets with comprehensive capabilities including listing, status checks, property modifications, creating new datasets with compression and quota configuration, and detailed property retrieval.
File Sharing: Configure and manage SMB shares, NFS exports with network access and root mapping, and iSCSI targets with defined names, datasets, sizes, and portal IDs for file storage and Kubernetes persistent volumes.
Snapshot Management: Create manual snapshots and establish automated snapshot policies with custom schedules, retention settings, and automation for repetitive tasks.
Permissions and ACLs: Modify dataset permissions, update Access Control Lists (ACLs), manage Unix permissions, and retrieve detailed permissions information.
System Monitoring & Debugging: Check system information, pool health, resource usage, debug connection settings, and reset the HTTP client for maintenance.
Integration: Works seamlessly with natural language clients like Claude for easy interaction with TrueNAS systems using both natural language and programmatic interfaces.
Allows interaction with TrueNAS Core systems through the TrueNAS API, enabling management of users, storage (pools and datasets), SMB shares, ZFS snapshots, and retrieving system information.
TrueNAS MCP Server
A production-ready Model Context Protocol (MCP) server for TrueNAS Core and SCALE systems. Control and manage your TrueNAS storage and virtualization through natural language with Claude or other MCP-compatible clients.
Automatic variant detection: The server automatically detects whether you're connected to TrueNAS Core or SCALE and enables the appropriate features.
๐ Features
Universal Features (Core & SCALE)
User Management - Create, update, delete users and manage permissions
Storage Management - Manage pools, datasets, volumes with full ZFS support
File Sharing - Configure SMB, NFS, and iSCSI shares
Snapshot Management - Create, delete, rollback snapshots with automation
System Monitoring - Check system health, pool status, and resource usage
TrueNAS SCALE Features (24.04+)
Automatically enabled when connected to SCALE
Apps - Manage Docker Compose-based TrueNAS applications
Incus Instances - Control Incus VMs and containers (SCALE 25.04+)
Legacy VMs - Manage bhyve virtual machines
Enterprise Features
Type-Safe Operations - Full Pydantic models for request/response validation
Comprehensive Error Handling - Detailed error messages and recovery guidance
Production Logging - Structured logging with configurable levels
Connection Pooling - Efficient HTTP connection management with retry logic
Rate Limiting - Built-in rate limiting to prevent API abuse
Environment-Based Config - Flexible configuration via environment variables
Related MCP server: MCP Tools
๐ฆ Installation
Quick Start with uvx (Recommended)
The easiest way to run TrueNAS MCP Server is with uvx:
Traditional Installation
From Source
๐ง Configuration
Environment Variables
Create a .env file or set environment variables:
Getting Your API Key
Log into TrueNAS Web UI
Go to Settings โ API Keys
Click Add and create a new API key
Copy the key immediately (it won't be shown again)
Claude Desktop Configuration
Add to your Claude Desktop config (claude_desktop_config.json):
Note: This uses uvx to automatically manage the Python environment. Make sure you have uv installed:
๐ Usage Examples
With Claude Desktop
Once configured, you can interact with TrueNAS using natural language:
As a Python Library
Programmatic Usage
๐ ๏ธ Available Tools
User Management
list_users- List all users with detailsget_user- Get specific user informationcreate_user- Create new user accountupdate_user- Modify user propertiesdelete_user- Remove user account
Storage Management
list_pools- Show all storage poolsget_pool_status- Detailed pool health and statisticslist_datasets- List all datasetscreate_dataset- Create new dataset with optionsupdate_dataset- Modify dataset propertiesdelete_dataset- Remove dataset
File Sharing
list_smb_shares- Show SMB/CIFS sharescreate_smb_share- Create Windows sharelist_nfs_exports- Show NFS exportscreate_nfs_export- Create NFS exportlist_iscsi_targets- Show iSCSI targetscreate_iscsi_target- Create iSCSI target
Snapshot Management
list_snapshots- Show snapshotscreate_snapshot- Create manual snapshotdelete_snapshot- Remove snapshotrollback_snapshot- Revert to snapshotclone_snapshot- Clone to new datasetcreate_snapshot_task- Setup automated snapshots
App Management (TrueNAS SCALE)
list_apps- Show all TrueNAS apps with statusget_app- Get detailed app informationget_app_config- Get full app configurationstart_app- Start an appstop_app- Stop an apprestart_app- Restart an appredeploy_app- Redeploy after config changesupdate_app_config- Update app configuration
Incus Instance Management (TrueNAS SCALE)
list_instances- Show VMs and containersget_instance- Get instance detailsstart_instance- Start an instancestop_instance- Stop an instancerestart_instance- Restart an instanceupdate_instance- Update CPU/memory/autostartlist_instance_devices- Show attached devices
Legacy VM Management
list_legacy_vms- Show bhyve VMsget_legacy_vm- Get VM detailsstart_legacy_vm- Start a VMstop_legacy_vm- Stop a VMrestart_legacy_vm- Restart a VMupdate_legacy_vm- Update VM configurationget_legacy_vm_status- Get VM status
Debug Tools (Development Mode)
debug_connection- Check connection settingstest_connection- Verify API connectivityget_server_stats- Server statistics
๐๏ธ Architecture
๐งช Development
Setup Development Environment
Running Tests
Code Quality
๐ Documentation
Installation Guide - Detailed installation instructions
Quick Start - Get up and running quickly
Quick Reference - Command reference
Features Overview - Detailed feature documentation
API Documentation - Coming soon
๐ค Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Security
Never commit API keys or credentials
Use environment variables for sensitive data
Enable SSL verification in production
Restrict destructive operations by default
Report security issues via GitHub Issues
๐ Support
Issues: GitHub Issues
Discussions: GitHub Discussions
๐ Acknowledgments
Anthropic for the MCP specification
TrueNAS for the excellent storage platform
MCP Python SDK contributors
Made with โค๏ธ for the TrueNAS community