Home / MCP / MCP-NixOS MCP Server

MCP-NixOS MCP Server

Provides real-time queries for NixOS packages, options, Home Manager and related Nix ecosystems.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "nixos_uvx": {
            "command": "uvx",
            "args": [
                "mcp-nixos"
            ]
        }
    }
}

You can query real, up-to-date NixOS information through this MCP server. It connects to multiple data sources like NixOS packages, options, Home Manager, nix-darwin, and related tooling to help you discover package details, configuration options, and historical versions quickly.

How to use

Choose one of the available MCP endpoints and run your client against it. You can run queries to search for packages and options, fetch detailed information, or browse historical data. The server is designed to be used with standard MCP clients and supports both local (stdio) and remote (http) configurations, depending on how you prefer to run it.

How to install

Prerequisites: you need Python installed, and you can run the MCP server without installing Nix. You may also use alternative runtimes like uvx, Nix, or Docker if you prefer.

Option A: Run directly with uvx (recommended)

uvx mcp-nixos

Option B: Install via Python package

pip install mcp-nixos

Option C: Nix users can run with Nix expressions

nix run github:utensils/mcp-nixos
nix profile install github:utensils/mcp-nixos

Option D: Run with Docker

docker run --rm -i ghcr.io/utensils/mcp-nixos

Notes on start methods

Each method above runs the same MCP server binary or image. Choose the one that best fits your environment. After starting, you can begin issuing queries to search packages, get detailed information, or view options and flakes.

Available tools

nix

Unified query tool to search, fetch info, view options, and browse channels across nixos, home-manager, darwin, flakes, and nixvim data sources.

nix_versions

Package version history with prior versions and commit hashes, enabling you to track changes over time.