MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages

by utensils

739 1.3k downloads Not rated yet MIT

About

A server for searching NixOS, Home Manager, and nix-darwin resources.

Details

License
MIT

Explore

- Two consolidated tools (~1030 tokens total).
- No Nix installation required (runs anywhere Python runs).
- Queries 130K+ packages and 23K+ NixOS options.
- Supports STDIO and HTTP transports.
- Includes binary cache status checking.
- Accesses FlakeHub, Noogle, NixOS Wiki, nix.dev, and NixHub.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

🚨 No Nix/NixOS Required! Works on any system - Windows, macOS, Linux. You're just querying APIs.

uvx mcp-nixos

pip install mcp-nixos


For Nix users:

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

mcp-nixos is available in nixpkgs:

nix

environment.systemPackages = [ pkgs.mcp-nixos ];

environment.systemPackages = [ pkgs.mcp-nixos ];


Or use the flake directly with the provided overlay:

nix

nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [{
nixpkgs.overlays = [ mcp-nixos.overlays.default ];
environment.systemPackages = [ pkgs.mcp-nixos ];
}];
};

Action

What it does

search

Search packages, options, programs, or flakes

info

Get detailed info about a package or option

stats

Get counts and categories

options

Browse Home Manager/Darwin options by prefix

channels

List available NixOS channels

flake-inputs

Explore local flake inputs from Nix store

cache

Check binary cache status for packages

Source

What it queries

nixos

Packages, options, programs

home-manager

Home Manager options

darwin

nix-darwin options

flakes

Community flakes (search.nixos.org)

flakehub

FlakeHub registry (flakehub.com)

nixvim

Nixvim Neovim configuration options

noogle

Nix function signatures and docs (noogle.dev)

wiki

NixOS Wiki articles (wiki.nixos.org)

nix-dev

Official Nix documentation (nix.dev)

nixhub

Package metadata and store paths (nixhub.io)

Just two. We consolidated 17 tools into 2 because your AI's context window isn't infinite.

~1,030 tokens total. That's it. While other MCP servers are hogging your context like it's Black Friday, we're sipping minimalist tea in the corner. Your AI gets NixOS superpowers without the bloat.

One tool to rule them all:

nix(action, query, source, type, channel, limit)

| Action | What it does |
|--------|-------------|
| search | Search packages, options, programs, or flakes |
| info | Get detailed info about a package or option |
| stats | Get counts and categories |
| options | Browse Home Manager/Darwin options by prefix |
| channels | List available NixOS channels |
| flake-inputs | Explore local flake inputs from Nix store |
| cache | Check binary cache status for packages |

| Source | What it queries |
|--------|----------------|
| nixos | Packages, options, programs |
| home-manager | Home Manager options |
| darwin | nix-darwin options |
| flakes | Community flakes (search.nixos.org) |
| flakehub | FlakeHub registry (flakehub.com) |
| nixvim | Nixvim Neovim configuration options |
| noogle | Nix function signatures and docs (noogle.dev) |
| wiki | NixOS Wiki articles (wiki.nixos.org) |
| nix-dev | Official Nix documentation (nix.dev) |
| nixhub | Package metadata and store paths (nixhub.io) |

Examples:

```python

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp-nixos - because your ai assistant shouldn't hallucinate about packages": {
            "nixos": {
                "command": "uvx",
                "args": [
                    "mcp-nixos"
                ]
            }
        }
    }
}

McpServers

{
    "nixos": {
        "command": "uvx",
        "args": [
            "mcp-nixos"
        ]
    }
}

MCP-NixOS - Because Your AI Shouldn't Hallucinate Package Names

CI
codecov
PyPI
FlakeHub
Python 3.11+
CodeRabbit Pull Request Reviews
Built with Claude

Quick Start

🚨 No Nix/NixOS Required! Works on any system - Windows, macOS, Linux. You're just querying APIs.

Option 1: uvx (Recommended)

Install MCP Server

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

Option 2: Nix

Install MCP Server

{
  "mcpServers": {
    "nixos": {
      "command": "nix",
      "args": ["run", "github:utensils/mcp-nixos", "--"]
    }
  }
}

Option 3: Docker

Install MCP Server

{
  "mcpServers": {
    "nixos": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ghcr.io/utensils/mcp-nixos"]
    }
  }
}

Your AI now has access to real NixOS data instead of making things up. You're welcome.

Option 4: HTTP (Remote MCP)

FastMCP supports running this server over HTTP at a URL (the MCP endpoint defaults to /mcp).

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.