================== /// MCP /// /// MCP /// ================== [server:online] [protocol:ready]
mcp-nixos
by utensils
Model Context Protocol (MCP) server that gives A-I assistants real-time data about NixOS packages, options, Home-Manager, nix-darwin and NixHub version history.
205
12
SpecializedInstallation
Prerequisites
1. Nix or NixOS (2.16 or later) with flakes enabled.
2. Git + a modern shell (bash/zsh/fish).
Quick-start (development)
1. Clone the repository
git clone https://github.com/utensils/mcp-nixos.git
cd mcp-nixos
2. Enter the development shell (all tooling, Python and Nix packages are provided by the flake)
nix develop
3. Run the automated tests (optional)
nix flake check # or just test if you use the bundled justfile
4. Launch the MCP server locally on port 8080
just run # convenience target → python -m mcp_nixos.server --port 8080
# or
nix run .#server
5. Open http://localhost:8080/v1/healthz to verify that the service is up.
Production deployment (NixOS module)
1. Add the flake as an input in your system flake:
inputs.mcp-nixos.url = "github:utensils/mcp-nixos";
2. Enable the module in your host configuration:
{
services.mcp-nixos.enable = true;
services.mcp-nixos.settings = {
listenAddress = "0.0.0.0";
port = 8080;
allowedOrigins = [ "*" ];
openAIKeyPath = "/run/keys/openai"; # if you proxy OpenAI
};
}
3. Rebuild your system
sudo nixos-rebuild switch --flake .#your-hostname
4. The service will start as a systemd unit mcp-nixos.service .
• OPENAI_API_KEY ‑ for back-end model providers that need it.
• MCP_AUTH_TOKEN ‑ optional bearer token to protect the API.
Environment variables
All paths and ports can be overridden through the standard services.mcp-nixos.settings attribute set or matching environment variables.
Documentation
License: MIT License
Updated 7/30/2025