8000 GitHub - truenas/mcp: Official TrueNAS MCP · GitHub
[go: up one dir, main page]

Skip to content
truenasPublic

About

Official TrueNAS MCP

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

TrueNAS MCP

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.

Installation

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.

  1. 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/
  2. 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.json with chmod 600, and offers to check the connection. The server README describes the file and each setting, if you would rather write it yourself.

  3. Point your MCP host at the built server with node. For Claude Desktop, add it to claude_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 install and yarn build again.

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.

Development

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 runs

Run a script in one package with yarn workspace <name> run <script>, for example yarn workspace @truenas/mcp run inspect.

Releasing

Both packages are released together at one version. See RELEASING.md.

License

Both packages are licensed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only). See LICENSE.

About

Official TrueNAS MCP

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0