Get the FREE Ultimate OpenClaw Setup Guide →

nu

Model Context Protocol (MCP) server built with Rust that exposes Nushell for command execution and provides an extensible system for creating modular MCP tools as Nushell scripts.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ck3mp3r-nu-mcp nu-mcp \
  --env MCP_NU_MCP_TIMEOUT="Default timeout in seconds for tool execution (default: 60)"

How to use

nu-mcp exposes Nushell as an MCP server using the official Rust SDK (rmcp). It runs a core command execution surface (run) and can be extended with a catalog of Nushell-based tools located under the tools/ directory. By default you can start nu-mcp to enable the core run capability, and you can enable an extension toolset by pointing to a custom tools directory with --tools-dir. The server supports a global timeout via MCP_NU_MCP_TIMEOUT and allows per-call timeout settings through the timeout_seconds parameter in tool invocations. This makes it suitable for integrating Nushell commands into automated pipelines or chat-based tooling, while maintaining security through a sandbox and path validation. The included tool catalog covers Kubernetes, ArgoCD, Tmux, and Context7, among others, and tools can be used to perform common admin and scripting tasks through MCP-compatible commands.

How to install

Prerequisites:

  • Nushell installed and available on the PATH
  • A compatible runtime environment (Nix, Homebrew, or manual binary release) per the platform you’re using
  • Optional: Rust toolchain if you’re building or tweaking the server from source

Install options (choose one):

  1. Via Nix (recommended for Nix users)
  • Install the MCP server (standalone): nix profile install github:ck3mp3r/nu-mcp

  • Or install the complete tool collection: nix profile install github:ck3mp3r/nu-mcp#mcp-tools

  • To use the server with tools, install the tool collection and start nu-mcp: nu-mcp --tools-dir=./tools

  • To install as an overlay in a flake, follow the example in the README: Add inputs.nu-mcp.url = "github:ck3mp3r/nu-mcp" and expose pkgs.nu-mcp in your outputs.

  1. Via Homebrew (macOS and Linux)
  1. Quick start (local run without tooling changes)
  • Start the server with the default core mode (run tool available): nu-mcp

Prerequisites notes:

  • Ensure Nushell is installed and accessible in your PATH.
  • The nu-mcp server can be configured to load tools from a local directory via --tools-dir; ensure the directory exists and contains tool modules with mod.nu entry files as described in the docs.

Additional notes

Tips and notes:

  • Timeout and sandbox: You can set a default timeout using the MCP_NU_MCP_TIMEOUT environment variable. Individual tools may also accept timeout_seconds for per-call control. The sandbox includes path validation and caching to prevent unauthorized file system access while allowing legitimate API/output strings (e.g., API endpoints) to pass through.
  • Tools: The tools/ directory houses modular Nushell scripts. Each tool directory should contain a mod.nu entry file. You can enable extension tools with --tools-dir=PATH and combine core execution with tools using --enable-run-nu.
  • Destructive operations: Several tools include destructive capabilities and require explicit user confirmation. See the README’s safety and destructive operations sections for details and warnings that are propagated to LLMs and automation.
  • Path access: Use --add-path to grant access to additional directories. The current working directory is always accessible by default.
  • Security: Commands run within a configurable sandbox with two-tier validation to balance security and flexibility. Refer to docs/security.md and docs/configuration.md for in-depth guidance.

Related MCP Servers

Sponsor this space

Reach thousands of developers