truenas-mcp
Provides read-only access to TrueNAS SCALE storage (pools, disks, datasets, snapshots), shares (SMB, NFS), services, system info, jobs, and alerts via the JSON-RPC 2.0 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-mcpwhat's the status of 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-mcp
Read-only MCP server for TrueNAS SCALE 25.10+ — connects via the JSON-RPC 2.0 WebSocket API.
Why this exists: The official
truenas/truenas-mcpbinary uses the legacy DDP protocol, which was removed in TrueNAS 25.10. This server targets the newwss://host/api/currentJSON-RPC 2.0 endpoint exclusively.
READ-ONLY: This server performs zero write or mutating operations.
Requirements
TrueNAS SCALE 25.10 or later
A TrueNAS API key (generate in System → API Keys)
Node.js 18+
Related MCP server: truenas-aiops
Install
npm install -g @profanter-dev/truenas-mcpOr run without installing:
npx @profanter-dev/truenas-mcpConfiguration
TrueNAS (required)
Variable | Required | Description |
| ✓ |
|
| ✓ | TrueNAS API key |
|
|
Docker proxy (optional)
Enables container_list, container_details, and container_logs. See Docker proxy setup below.
Variable | Required | Description |
| ✓ | Base URL of the docker-socket-proxy, e.g. |
| ✓ | Basic auth username |
| ✓ | Basic auth password |
Copy .env.example to .env and fill in your values, or pass as environment variables.
Claude Code setup
claude mcp add truenas \
-e TRUENAS_HOST=192.168.1.29:444 \
-e TRUENAS_API_KEY=your-key \
-e TRUENAS_INSECURE=true \
-- npx @profanter-dev/truenas-mcpTools
All entities follow a consistent list / details pattern.
Storage
Tool | Description |
| All ZFS pools — health, status, usable capacity (used + available) |
| Single pool: health, capacity, last scrub |
| All disks — model, type, pool assignment, temperature, SMART result, ZFS error counts |
| Single disk: serial, size, temperature, full SMART history, vdev assignment, ZFS errors |
| All ZFS datasets with used/available space; optionally filter by pool |
| Full properties for a single dataset: compression, dedup, quota, and more |
| ZFS snapshots ordered newest-first; filter by dataset, configurable limit, boot-pool excluded by default |
| Single snapshot: size, referenced, compression ratio, clones |
Shares
Tool | Description |
| All SMB and NFS shares — path, enabled state, comment |
| Full config for a single SMB or NFS share |
Services
Tool | Description |
| All TrueNAS services with running state and boot-enable flag |
| Single service state plus service-specific config (e.g. SSH port and auth settings, SMB workgroup, NFS settings). Private/public key material is stripped. |
System
Tool | Description |
| Hostname, version, CPU, memory, uptime, load average (1/5/15 min), timezone |
Apps
Tool | Description |
| All installed TrueNAS catalog apps with state, version, and update availability |
| Single app: state, version, portals, active workloads, notes |
| Recent log output for a TrueNAS catalog app |
Note: These tools cover apps installed via the TrueNAS Apps UI (catalog apps). Docker Compose stacks managed by external tools such as Dockge are not accessible through the TrueNAS WebSocket API — use the Docker proxy tools below instead.
Docker containers (optional — requires Docker proxy)
Tool | Description |
| All Docker containers (running and stopped) — name, image, state, health |
| Single container: image, state, ports, mounts, networks, labels. Secret env vars are redacted. |
| Recent log output for a container; configurable line count (default 100) |
These tools are only registered when DOCKER_PROXY_URL is set.
Jobs & Alerts
Tool | Description |
| Unique job types with last-run status and timestamp (cron jobs shown with human-readable description) |
| Full run history for a specific job; requires |
| Active alerts sorted by severity: CRITICAL → ERROR → WARNING → NOTICE → INFO |
Docker proxy setup
The Docker container tools connect to a tecnativa/docker-socket-proxy instance secured behind Traefik with basic auth. Deploy this as a Dockge stack on your TrueNAS:
# docker-socket-proxy/compose.yml
services:
docker-proxy:
image: tecnativa/docker-socket-proxy:latest
environment:
CONTAINERS: "1"
INFO: "1"
IMAGES: "1"
NETWORKS: "1"
POST: "0" # read-only — block all write operations
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik_network
labels:
- "traefik.enable=true"
- "traefik.http.routers.docker-proxy.rule=Host(`docker.example.com`)"
- "traefik.http.routers.docker-proxy.entrypoints=websecure"
- "traefik.http.routers.docker-proxy.tls.certresolver=letsencrypt"
- "traefik.http.routers.docker-proxy.middlewares=docker-proxy-auth"
- "traefik.http.middlewares.docker-proxy-auth.basicauth.users=admin:$$apr1$$..."
- "traefik.http.services.docker-proxy.loadbalancer.server.port=2375"
restart: unless-stopped
networks:
traefik_network:
external: trueGenerate the htpasswd entry (double $ signs are required in compose labels):
# Install apache2-utils if needed, then:
htpasswd -nb admin yourpassword | sed 's/\$/\$\$/g'Then set the env vars when registering the MCP server:
claude mcp add truenas \
-e TRUENAS_HOST=192.168.1.29:444 \
-e TRUENAS_API_KEY=your-key \
-e TRUENAS_INSECURE=true \
-e DOCKER_PROXY_URL=https://docker.example.com \
-e DOCKER_PROXY_USER=admin \
-e DOCKER_PROXY_PASS=yourpassword \
-- npx @profanter-dev/truenas-mcpProtocol details
WebSocket URL:
wss://<host>/api/currentAuth:
auth.login_with_api_key— called once on connect; never reconnects per-callRate limit: TrueNAS enforces 20 auth attempts per 60 s; exceeding triggers a 10-minute lockout
The server maintains a single persistent connection with exponential-backoff reconnection on unexpected disconnects
This server cannot be deployed
Maintenance
Related MCP Connectors
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
Read-only MCP server for AIStatusDashboard status, incidents, metrics, and fallback recommendations.
Public, read-only MCP server for FarmNeural company facts, packages, and capabilities.
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Related MCP Servers
- 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
- AlicenseAqualityAmaintenanceAI-powered MCP server for TrueNAS SCALE storage operations with governance and safety features, enabling management of pools, datasets, snapshots, disks, alerts, and services.25MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server for TrueNAS SCALE that enables read-first management of storage, system, sharing, and virtualization resources with per-user API key authentication, and optional write operations.1MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets Claude monitor and manage a TrueNAS box in plain English. It is deliberately read-only, providing tools to check alerts, storage pools, snapshots, services, and more.181MIT