Skip to main content
Glama

TrueNAS MCP

An MCP server that turns your TrueNAS (SCALE) instance into tools. Manage pools, disks, datasets, apps, VMs and more from any MCP client. Built on FastMCP and the official truenas_api_client websocket library.

Authenticated with a TrueNAS API key over a persistent websocket connection. Targets TrueNAS 25.10 (pin: TS-25.10.3).

Run with Docker

You need a TrueNAS instance and an API key (Account Settings > API Keys).

docker build -t truenas-mcp .
docker run -e TRUENAS_URI=wss://truenas.example.com/api/current \
  -e TRUENAS_API_KEY=your-key \
  truenas-mcp

Related MCP server: truenas-ws-mcp

Settings

name

default

notes

TRUENAS_URI

-

required, ws:// or wss:// websocket URL, e.g. wss://host/api/current

TRUENAS_API_KEY

-

required, from TrueNAS API Keys

TRUENAS_VERIFY_SSL

true

set false only over plain ws:// (disable TLS verification for self-signed)

LOG_LEVEL

INFO

Values can come from a .env file in the working directory. API-key auth uses auth.login_with_api_key over the persistent connection (TrueNAS 25.10 SCRAM - no username needed).

Serve over HTTP

By default the server talks stdio (one process per client). To expose it as an HTTP MCP endpoint behind a gateway (e.g. LiteLLM), set the FastMCP transport env vars - no code change required:

env

default

FASTMCP_TRANSPORT

stdio

FASTMCP_HOST

127.0.0.1

FASTMCP_PORT

8000

FASTMCP_STREAMABLE_HTTP_PATH

/mcp

Example - serve streamable-http on all interfaces:

FASTMCP_TRANSPORT=streamable-http FASTMCP_HOST=0.0.0.0 FASTMCP_PORT=8000 \
  truenas-mcp

Tools

system_info, list_pools, list_disks, list_datasets, list_apps, list_vms, truenas_call (generic middleware escape hatch).

License

MIT

Available Tools

29 tools
create_datasetCreate DatasetC

Create a ZFS dataset.

Inputs: name (required), dry_run. Returns: result

create_shareCreate ShareC

Create an SMB or NFS share.

Inputs: kind (required), name (required), path (required), dry_run. Returns: result

create_snapshotCreate SnapshotC

Create a ZFS snapshot.

Inputs: dataset (required), name, dry_run. Returns: result

delete_appDelete AppC

Delete an installed app.

Inputs: app_name (required), dry_run, remove_images. Returns: result

delete_datasetDelete DatasetC

Delete a ZFS dataset.

Inputs: name (required), dry_run, recursive. Returns: result

delete_shareDelete ShareC

Delete an SMB or NFS share.

Inputs: kind (required), share_id (required), dry_run. Returns: result

delete_snapshotDelete SnapshotC

Delete a ZFS snapshot.

Inputs: name (required), dry_run. Returns: result

dismiss_alertDismiss AlertC

Dismiss a TrueNAS alert.

Inputs: alert_id (required). Returns: result

get_scrub_statusGet Scrub StatusB

Get ZFS pool scrub status/schedules.

Inputs: pool_name. Returns: result

install_appInstall AppC

Install an app from the TrueNAS catalog.

Inputs: values (required), app_name (required), catalog_app (required), train, +2 more. Returns: result

list_alertsList AlertsB

List TrueNAS system alerts.

Inputs: no named parameters. Returns: result

list_appsList AppsA

List installed applications (k3s apps) with state and version.

Inputs: no named parameters. Returns: result

list_boot_environmentsList Boot EnvironmentsA

List boot environments (active, activated, kernel/initramfs).

Inputs: no named parameters. Returns: result

list_datasetsList DatasetsB

List ZFS datasets (name, mountpoint, used/available, quotas).

Inputs: path. Returns: result

list_disksList DisksA

List disks and their health fields (model, serial, size, SMART status).

Inputs: serial. Returns: result

list_jobsList JobsB

List middleware jobs (long-running operations).

Inputs: state. Returns: result

list_poolsList PoolsB

List storage pools and their ZFS status (health, capacity, topology).

Inputs: name. Returns: result

list_sharesList SharesB

List SMB or NFS shares.

Inputs: kind. Returns: result

list_snapshotsList SnapshotsC

List ZFS snapshots.

Inputs: dataset. Returns: result

list_vmsList VmsB

List virtual machines with their current status.

Inputs: no named parameters. Returns: result

restore_alertRestore AlertB

Restore a dismissed TrueNAS alert.

Inputs: alert_id (required). Returns: result

run_scrubRun ScrubC

Run a ZFS scrub on a pool.

Inputs: pool_name (required), dry_run. Returns: result

search_app_catalogSearch App CatalogC

Search the TrueNAS app catalog for available apps.

Inputs: train, catalog_app. Returns: result

start_appStart AppB

Start an installed app. Long-running (may take seconds).

Inputs: app_name (required). Returns: result

stop_appStop AppA

Stop an installed app. Long-running (may take seconds).

Inputs: app_name (required). Returns: result

system_infoSystem InfoA

Get TrueNAS system information (version, hostname, uptime, CPU, memory).

Returns: JSON string with system.info fields.

Inputs: no named parameters. Returns: result

truenas_callTruenas CallC

Call any TrueNAS middleware endpoint directly.

Inputs: method (required), params. Returns: result

update_appUpdate AppC

Update an installed app's configuration.

Inputs: values (required), app_name (required), dry_run. Returns: result

upgrade_appUpgrade AppC

Upgrade an installed app to the latest version.

Inputs: app_name (required), dry_run. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 29 tools

    Disambiguation4/5

    Most tools target clearly distinct resources and actions, especially the list/create/delete families for datasets, snapshots, and shares. Minor ambiguity exists between update_app and upgrade_app, and truenas_call overlaps with every specific tool as a generic escape hatch.

    Naming Consistency4/5

    Almost all tools use consistent snake_case verb_noun naming, such as list_pools, create_dataset, and delete_share. The few deviations are system_info (noun-first) and truenas_call (noun_verb), but the overall pattern remains predictable.

    Tool Count3/5

    TrueNAS is a broad administration domain, so many tools are justified, but 29 tools is on the heavy side and includes both granular wrappers and a generic truenas_call fallback. The set is useful but close to feeling over-expanded.

    Completeness3/5

    Core areas like datasets, snapshots, shares, apps, alerts, and scrubs are well covered, but VM support is list-only and there are no update operations for datasets or shares. The generic truenas_call endpoint can fill gaps, though not as cleanly as dedicated tools.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers