Model Context Protocol (MCP) server that exposes live NixOS/Home-Manager/nix-darwin package & option data to LLM based assistants.
https://github.com/utensils/mcp-nixosYour AI coding assistant is probably hallucinating about NixOS packages right now. It's confidently suggesting nixpkgs.nonexistent-package or recommending configuration options that don't exist. MCP-NixOS fixes this by connecting your AI directly to real, live Nix ecosystem data.
When you ask Claude or ChatGPT about NixOS packages or configuration options, they're working from stale training data. They'll suggest packages that were renamed, options that moved between releases, or versions that never existed. For a ecosystem as precise as Nix, this creates more problems than it solves.
MCP-NixOS is a Model Context Protocol server that gives your AI assistant accurate, real-time access to:
Your assistant can now search for packages, check option syntax, find specific versions, and explore configurations with the same accuracy you'd get from nix search or the NixOS manual.
Here's the best part: you don't need NixOS or even Nix installed. MCP-NixOS queries web APIs, so it runs on Windows, macOS, or any Linux distribution. Your AI gets Nix expertise regardless of your host OS.
{
"mcpServers": {
"nixos": {
"command": "uvx",
"args": ["mcp-nixos"]
}
}
}
One configuration block, and you're connected to the entire Nix ecosystem.
Package Discovery: Instead of guessing package names, your AI can search through the actual nixpkgs repository and find exactly what you need, including alternative packages and version constraints.
Configuration Assistance: When building NixOS configurations, your AI can validate option names, check types, and suggest related settings from the real option database.
Version Archaeology: Need that specific Ruby 2.6 version from 18 months ago? Your AI can now search through complete version history with commit hashes, so you can pin exactly what you need.
Cross-Platform Setup: Whether you're setting up nix-darwin on macOS or Home Manager for dotfiles, your AI has access to platform-specific options and can guide you through proper configuration.
The maintainers completely rewrote this tool, removing thousands of lines of caching complexity and "enterprise patterns" that nobody asked for. The result? 100% of the functionality with zero cache corruption issues, stateless operation, and direct API access that just works.
This matters because developer tools should solve problems, not create new ones. The simplified architecture means faster responses, fewer edge cases, and one less thing to debug when your development environment inevitably breaks.
MCP-NixOS integrates with any MCP-compatible AI client. If you're using Claude Desktop, Cursor, or another MCP-enabled tool, you add one server configuration and immediately get Nix expertise.
The server provides 15+ specialized tools covering everything from package searches to option exploration. Your AI can nixos_search() for packages, home_manager_info() for user configuration details, or nixhub_find_version() for specific package versions.
Quick start with uvx (recommended for most):
uvx mcp-nixos
Nix users (naturally):
nix run github:utensils/mcp-nixos
Traditional Python (if you must):
pip install mcp-nixos
Each method gets you the same comprehensive toolset - choose based on your existing workflow rather than learning new package managers.
MCP-NixOS transforms your AI assistant from a Nix guesser into a Nix expert. It's the difference between "try this package, it might work" and "here's the exact package version with the commit hash where it was added."
Your configurations deserve better than hallucinated package names.