utensils/mcp-nixos
A Python MCP server for looking up Nix packages, options, and pinned inputs
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
mcp-nixos is a Python 3.11+ query service built on FastMCP 4. Its primary tool, nix, routes requests by action and source: package or option lookup, prefix browsing, cache checks, and local inspection share one interface. A separate version-history tool keeps historical package lookup apart from catalogue searches. The runtime declares requests>=2.32.4 and beautifulsoup4>=4.13.4, fitting a service that consumes public APIs and parses HTML catalogues.
The default transport is stdio, so a desktop or coding client can own the server process. HTTP lets the same tools run as a separately hosted service, with an optional stateless mode. Public catalogue queries do not invoke a local Nix installation; flake-input inspection and explicit store reads depend on the Nix environment available to the server, not the client.
Key Capabilities & Differentiators
The catalogue spans more than 130,000 NixOS packages and 23,000 NixOS options, plus separate option sources for Home Manager, nix-darwin, Nixvim, and NVF. The same tool can look up Noogle function signatures, flakes from FlakeHub, and documentation from the NixOS Wiki and nix.dev. NVF uses its published unstable options and normalizes supported module-wrapper paths to canonical vim.* names.
Version history can return nixpkgs commit hashes, attribute paths, and platform availability, helping an assistant identify a candidate revision to pin. A separate lookup checks cache.nixos.org for binary availability and download size and accepts optional version and system filters. Where Nix is present, the server can also browse pinned flake inputs or list and read explicit paths in /nix/store.
Trade-offs & Limitations
Compared with using NixOS Search, Noogle, or option sites directly, this server is most useful when an assistant repeatedly needs to connect records from several sources. Two tools keep client registration compact, but callers still need to choose the right action, source, and channel. Catalogue coverage, freshness, and availability depend on the upstream APIs and published pages; self-hosting the MCP endpoint does not make those sources available offline.
For an already-pinned configuration, use native Nix evaluation to verify that an attribute or option actually resolves at the locked revision. A historical commit or a cache hit is useful evidence, not proof that the full configuration evaluates or builds. Prefer stdio for single-user sessions. Before offering shared HTTP access, verify authentication and restrict which local store content the service process can see.
Hardware & Deployment Guide
For a local MCP client, start with uvx mcp-nixos; pip install mcp-nixos, nix run github:utensils/mcp-nixos, and docker run --rm -i ghcr.io/utensils/mcp-nixos are also available. Python installs require 3.11 or later and do not need Nix for public lookups. For remote clients, set MCP_NIXOS_TRANSPORT=http and configure the bind host and port; /mcp is the default path. Budget for upstream network access and measure sizing under representative catalogue loads and concurrency; the service itself does not need a GPU.
Nix users can install pkgs.mcp-nixos declaratively or use the project's flake overlay. The v3.1.0 release moved to FastMCP 4 and introduced a scoped Nix package set; the default overlay leaves the wider Python package set unchanged. v3.1.1 fixed parsing of NVF's chunked options document and stopped the Nix FastMCP 4 extension from probing mcp-types.
/nix/store paths when Nix is available.mcp-nixos; a separate opt-in overlay upgrades FastMCP across the Python package set.Coding assistants that routinely verify Nix package names and module options, investigate revisions to pin, or check binary availability before a build.
You need offline public catalogue access, deterministic validation of a locked configuration, or only occasional manual lookups.
Quick Start & Installation
# Run directly (no install) uvx mcp-nixos # Or install pip install mcp-nixos
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| mcp-nixos ★ | 895 | +3 | Python | MIT | A Python MCP server for looking up Nix packages, options, and pinned inputs |
| mcp-for-blender | 37.1k | +1.1k | Python | GPL-3.0 | A local MCP bridge for inspecting and editing live Blender scenes with AI |
| agents | 43.2k | +212 | Python | MIT | One Markdown plugin catalog adapted to seven AI coding tools |
| graphify | 156.8k | +2.4k | Python | Apache-2.0 | Local AST graphs for dependency tracing, with CLI and MCP access. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/utensils/mcp-nixos.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about mcp-nixos
How do I connect an MCP client or the Pi coding agent?
uvx as the command and mcp-nixos as its argument. If the client supports remote MCP, it can instead connect to an HTTP instance at /mcp by default. For Pi, use pi-mcp-adapter or the project-local extension at .pi/extensions/mcp-nixos.ts.Does the server need a GPU, and what should I size for?
Can we self-host it for commercial use?
When should I prefer direct search or native Nix tooling?
mcp-nixos when the assistant repeatedly needs to cross-reference package records, module options, and documentation. For a one-off question, direct searches avoid running another service. When correctness depends on the exact locked revision, use the local flake and Nix evaluation as the source of truth; public catalogues and version history are useful for discovering candidates.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy