$git clone https://github.com/utensils/mcp-nixos🚨 No Nix/NixOS Required! Works on any system - Windows, macOS, Linux. You're just querying APIs.
| 1 | # MCP-NixOS - Because Your AI Shouldn't Hallucinate Package Names |
| 2 | Â |
| 3 | [](https://github.com/utensils/mcp-nixos/actions/workflows/ci.yml) |
| 4 | [](https://codecov.io/gh/utensils/mcp-nixos) |
| 5 | [](https://pypi.org/project/mcp-nixos/) |
| 6 | [](https://flakehub.com/flake/utensils/mcp-nixos) |
| 7 | [](https://www.python.org/downloads/) |
| 8 |  |
| 9 | [](https://claude.ai) |
| 10 | Â |
| 11 | ## Quick Start |
| 12 | Â |
| 13 | **🚨 No Nix/NixOS Required!** Works on any system - Windows, macOS, Linux. You're just querying APIs. |
| 14 | Â |
| 15 | ### Option 1: uvx (Recommended) |
| 16 | Â |
| 17 | [](https://cursor.com/install-mcp?name=nixos&config=eyJjb21tYW5kIjoidXZ4IG1jcC1uaXhvcyJ9) |
| 18 | Â |
| 19 | ```json |
| 20 | { |
| 21 | "mcpServers": { |
| 22 | "nixos": { |
| 23 | "command": "uvx", |
| 24 | "args": ["mcp-nixos"] |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | ``` |
| 29 | Â |
| 30 | ### Option 2: Nix |
| 31 | Â |
| 32 | [](https://cursor.com/install-mcp?name=nixos&config=eyJjb21tYW5kIjoibml4IHJ1biBnaXRodWI6dXRlbnNpbHMvbWNwLW5peG9zIC0tIn0%3D) |
| 33 | Â |
| 34 | ```json |
| 35 | { |
| 36 | "mcpServers": { |
| 37 | "nixos": { |
| 38 | "command": "nix", |
| 39 | "args": ["run", "github:utensils/mcp-nixos", "--"] |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | ``` |
| 44 | Â |
| 45 | ### Option 3: Docker |
| 46 | Â |
| 47 | [](https://cursor.com/install-mcp?name=nixos&config=eyJjb21tYW5kIjoiZG9ja2VyIiwiYXJncyI6WyJydW4iLCItLXJtIiwiLWkiLCJnaGNyLmlvL3V0ZW5zaWxzL21jcC1uaXhvcyJdfQ%3D%3D) |
| 48 | Â |
| 49 | ```json |
| 50 | { |
| 51 | "mcpServers": { |
| 52 | "nixos": { |
| 53 | "command": "docker", |
| 54 | "args": ["run", "--rm", "-i", "ghcr.io/utensils/mcp-nixos"] |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | ``` |
| 59 | Â |
| 60 | Your AI now has access to real NixOS data instead of making things up. You're welcome. |
| 61 | Â |
| 62 | ### Option 4: HTTP (Remote MCP) |
| 63 | Â |
| 64 | FastMCP supports running this server over HTTP at a URL (the MCP endpoint defaults to `/mcp`). |
| 65 | Â |
| 66 | ```bash |
| 67 | # Run an HTTP MCP server at http://127.0.0.1:8000/mcp |
| 68 | MCP_NIXOS_TRANSPORT=http MCP_NIXOS_HOST=127.0.0.1 MCP_NIXOS_PORT=8000 mcp-nixos |
| 69 | ``` |
| 70 | Â |
| 71 | STDIO (default): |
| 72 | Â |
| 73 | ```bash |
| 74 | MCP_NIXOS_TRANSPORT=stdio mcp-nixos |
| 75 | ``` |
| 76 | Â |
| 77 | Custom path: |
| 78 | Â |
| 79 | ```bash |
| 80 | MCP_NIXOS_TRANSPORT=http MCP_NIXOS_PATH=/api/mcp mcp-nixos |
| 81 | ``` |
| 82 | Â |
| 83 | Stateless HTTP (disables per-client session state): |
| 84 | Â |
| 85 | ```bash |
| 86 | MCP_NIXOS_TRANSPORT=http MCP_NIXOS_STATELESS_HTTP=1 mcp-nixos |
| 87 | ``` |
| 88 | Â |
| 89 | ### Option 5: Pi Coding Agent |
| 90 | Â |
| 91 | [Pi](https://www.npmjs.com/package/@mariozechner/pi-coding-agent) does not speak MCP natively. Two supported paths: |
| 92 | Â |
| 93 | **A. pi-mcp-adapter (recommended — speaks MCP, single source of truth):** |
| 94 | Â |
| 95 | ```bash |
| 96 | pi install npm:pi-mcp-adapter |
| 97 | ``` |
| 98 | Â |
| 99 | Then add to `~/.pi/agent/mcp.json`: |
| 100 | Â |
| 101 | ```json |
| 102 | { |
| 103 | "mcpServers": { |
| 104 | "nixos": { |
| 105 | "command": "uvx", |
| 106 | "args": ["mcp-nixos"], |
| 107 | "lifecycle": "lazy" |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | ``` |
| 112 | Â |
| 113 | **B. Project-local extension (clone + run):** this repo ships `.pi/extensions/mcp-nixos.ts`, auto-loaded when you run `pi` in the cloned repo. Optional: `cd .pi && npm install` for editor type resolution. Pi runs it either way. |
| 114 | Â |
| 115 | ## What Is This? |
| 116 | Â |
| 117 | An MCP server providing accurate, real-time information about: |
| 118 | Â |
| 119 | - **NixOS packages** - 130K+ packages that actually exist |
| 120 | - **NixOS options** - 23K+ ways to configure your system |
| 121 | - **Home Manager** - 5K+ options for dotfile enthusiasts |
| 122 | - **nix-darwin** - 1K+ macOS settings Apple doesn't document |
| 123 | - **Nixvim** - 5K+ options for Neovim configuration via [NuschtOS search](https://github.com/NuschtOS/search |