Inspect and manage TrueNAS SCALE storage, shares, apps and system state with your own API key
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server for TrueNAS SCALE. Read-first, deployable as a TrueNAS app, and authenticated with each user's own API key.
Status: working, young. Every capability in the design is implemented and verified against a live TrueNAS 26 box. Expect rough edges rather than gaps.
iX ship an official truenas/truenas-mcp,
and if it fits your needs you should use it. This one exists for three things it
does not do:
Three ideas do most of the work.
The credential is the authorization. Callers supply their own TrueNAS API key; this server stores none. A session reaches exactly what that user's key permits, revocation happens in the TrueNAS UI, and there is no shared secret to leak. Authentication and authorization stop being two systems that can disagree. Served over stdio the key arrives from the environment instead, because there is no request to carry it โ but the client spawns one process per user, so it is still that user's own key. What the design rules out is one key standing in for many callers, not configuration as such.
Reads and writes get different tool shapes. Reads are grouped into
concern-level tools with an op enum, because they share most of their
arguments and 815 middleware methods cannot each become a tool. Writes are
individual tools โ MCP annotations are per-tool, so bundling a safe operation
with a destructive one behind one op parameter would put both behind a single
consent gate, and a user who tires of confirming list_pools will allowlist the
tool that can also export a pool.
Read-only by default. Mutating tools appear only when explicitly enabled. Separately, a denylist of unrecoverable operations is not reachable under any configuration, and it constrains argument values rather than just method names โ deleting an app is recoverable, deleting it along with its volumes is not, and those are the same method.
Each of these was measured against a live box rather than reasoned about in the abstract, and several were overturned by what that measurement found.
Copy deploy/truenas-custom-app.yaml, adjust
TRUENAS_MCP_TARGET, and paste it into Apps โ Discover โ Install via YAML.
It mounts no host socket and requests no privileged access. The server reaches the middleware over the network even when running on the same box, so that every connection carries a user identity rather than root-equivalent socket access.
Nothing requires the server to run on the machine it manages, and there is a good reason not to: installed as a TrueNAS app, it is unavailable exactly when the box is unhealthy โ which is when you most want to ask it what is wrong.
Each GitHub release
attaches binaries for Linux, macOS, and Windows on amd64 and arm64, alongside a
checksums.txt. Configuration is environment variables only โ there is no
config file, and the only flags are --stdio and --healthcheck.
By default the binary is an HTTP server. Running it does not make a client pick it up on its own; it listens on a port, and the client connects to it by URL. For clients that spawn the server themselves, see Serving over stdio below.
Point the client at http://localhost:8080/mcp, with the TrueNAS API key sent
as an Authorization: Bearer header, the same as in
Connecting a client.
TRUENAS_MCP_TARGET_INSECURE is typically needed for the reason given in
On the two TLS settings: TrueNAS ships a
self-signed certificate for CN=localhost that will not validate against any
other address. TRUENAS_MCP_ALLOW_PLAINTEXT is defensible here specifically
because TRUENAS_MCP_LISTEN binds the listener to loopback โ reachable only
from the same machine โ which is the condition that section argues plaintext
requires. The default bind address is :8080, which is every interface, so
dropping that setting while keeping plaintext would put API keys on the wire.
Some clients spawn a server as a subprocess and talk to it over its standard
input and output rather than connecting to a URL. --stdio serves the same
tools that way.
There is no request to carry a header here, so the key comes from
TRUENAS_MCP_API_KEY instead. That is not the shared secret the HTTP transport
avoids: the client spawns one process per user, so the key it passes is that
user's own, and the process reaches exactly what that key permits. The same
variable is refused in HTTP mode, where one process serves many callers and a
configured key would be shared by all of them.
Nothing about the listener applies. TRUENAS_MCP_LISTEN, the two TLS settings
and TRUENAS_MCP_ALLOW_PLAINTEXT are ignored with a warning rather than an
error, since none of them weakens anything when no listener exists.
--healthcheck is refused alongside --stdio, because it probes a listener
that was never started.
Settings that concern the target rather than the listener still apply, including
TRUENAS_MCP_TARGET_INSECURE and TRUENAS_MCP_ENABLE_WRITES.
All configuration is environment variables; no config file or persistent volume is needed. Invalid configuration refuses to start rather than running degraded.
| Variable | Default | Meaning |
|---|---|---|
TRUENAS_MCP_TARGET | required | TrueNAS host, optionally host:port |
TRUENAS_MCP_LISTEN | :8080 | Bind address |
TRUENAS_MCP_TLS_CERT / TRUENAS_MCP_TLS_KEY | โ | Serve MCP over TLS |
TRUENAS_MCP_ALLOW_PLAINTEXT | false | Serve without TLS (see below) |
TRUENAS_MCP_TARGET_INSECURE | false | Accept the target's certificate unverified |
TRUENAS_MCP_TARGET_ALLOW_PLAINTEXT | false | Connect to the target without TLS |
TRUENAS_MCP_ENABLE_WRITES | false | Expose mutating tools |
TRUENAS_MCP_API_KEY | โ | Credential for --stdio; refused otherwise |
No credential is configurable for the HTTP transport. Callers supply their
own with each request, and setting TRUENAS_MCP_API_KEY without --stdio is a
startup error rather than a silent fallback. Over stdio there is no request to
carry one and the process serves a single user, so the variable is how that
user's key arrives โ see Serving over stdio.
Transport scheme and certificate verification are deliberately separate.
TrueNAS ships a self-signed certificate issued for CN=localhost with only
DNS:localhost as a SAN, so no address you can reach it by will validate. The
fix is TRUENAS_MCP_TARGET_INSECURE=true, which keeps the connection encrypted
and merely unauthenticated. If certificate problems forced you onto plaintext
instead, TrueNAS would see your API key in the clear โ and revoke it.
TRUENAS_MCP_ALLOW_PLAINTEXT is about the boundary callers cross, which carries
their API keys. It is correct when a reverse proxy terminates TLS in front of
the server, and wrong when the plaintext listener is reachable directly.
The key may also be sent as X-TrueNAS-API-Key, for clients that cannot set an
Authorization header. Requests without either are refused with 401.
Clients that spawn the server rather than connect to one want Serving over stdio instead.
Working:
401 without oneNot implemented: job progress via resource subscription. Polling covers the same ground and is the path the design treats as reliable โ subscription was always an enhancement over it, and MCP client support for it is thin.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/truenas-scale)<a href="https://allmcps.com/mcp/truenas-scale"><img src="https://allmcps.com/api/badge/truenas-scale?style=directory" alt="TrueNAS SCALE on AllMCPs" /></a>