TrueNAS management over the Model Context Protocol, as two npm packages built from this repository:
| Package | Directory | What it is |
|---|---|---|
@truenas/mcp |
packages/server |
The standalone server. Run it from any MCP host, such as Claude Desktop, against your own TrueNAS systems and API keys. No cloud account. |
@truenas/mcp-base |
packages/base |
The shared core: tool catalog, system registry, plan and confirm safety model, multi-system fan-out. A plain TypeScript library with no environment assumptions, for embedding the tool layer in another host, such as a browser. |
The server is one consumer of the base; the TrueNAS Connect UI is another.
Early alpha. Neither package is published to npm yet, so you install the server from a checkout of this repository.
You need Node.js 22 or later, with Corepack enabled so it provides Yarn 4.
-
Clone the repository, then build it:
git clone https://github.com/truenas/mcp.git truenas-mcp cd truenas-mcp corepack enable # once, to enable Yarn 4 yarn install yarn build # the base first, then the server, to dist/
-
Create the config file, which names your TrueNAS systems and holds their API keys:
yarn workspace @truenas/mcp run init
It asks for each system, writes
~/.config/truenas-mcp/config.jsonwithchmod 600, and offers to check the connection. The server README describes the file and each setting, if you would rather write it yourself. -
Point your MCP host at the built server with
node. For Claude Desktop, add it toclaude_desktop_config.json, using the full path to your checkout:{ "mcpServers": { "truenas": { "command": "node", "args": ["/path/to/truenas-mcp/packages/server/dist/cli.js"] } } }Restart the host after editing its config. After pulling changes, run
yarn installandyarn buildagain.
Once the first release is on npm, npx -y @truenas/mcp will replace the
checkout: npx -y @truenas/mcp init for the config, and "command": "npx",
"args": ["-y", "@truenas/mcp"] in the host. These do not work yet.
corepack enable # once, to enable Yarn 4
yarn install
yarn build # the base first: the server compiles against its dist/
yarn typecheck
yarn lint
yarn test
yarn verify # everything CI runsRun a script in one package with yarn workspace <name> run <script>, for
example yarn workspace @truenas/mcp run inspect.
Both packages are released together at one version. See RELEASING.md.
Both packages are licensed under the GNU Affero General Public License,
version 3 only (AGPL-3.0-only). See LICENSE.