Nixos

Developer toolsAgent frameworks and SDKs

MCP-NixOS - Model Context Protocol Server for NixOS resources.

Your AI app calls the Nixos MCP server, which does the developer tools and agent frameworks and SDKs work and sends the result back to the chat.

About Nixos

Nixos is a community MCP server from utensils, filed in our directory under developer tools and agent frameworks and sdks. MCP-NixOS - Model Context Protocol Server for NixOS resources.

Nixos runs on your own machine: your AI app starts it with the command uvx mcp-nixos and talks to it over standard input and output.

At a glance

Publisher
utensils (community)
Runs
Locally on your machine
Install from
Python package on PyPI: mcp-nixos
Written in
Python
License
MIT
GitHub stars
894

How to set up Nixos

  1. Install uv on the machine that runs your AI app, because Nixos starts with uvx and fetches its Python package on first run.
  2. Check the Nixos README for keys or settings; the registry lists none that Nixos requires.
  3. Add Nixos to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Nixos tools to confirm the connection.
  5. Run one read-only task with Nixos first, and keep your app asking before each tool call until the results look right.

Nixos compared with similar servers

  • Godot MCP Native by yurineko73 has fewer GitHub stars than Nixos (888 against 894); both are community servers, and both run locally.
  • Fauxnix by 20000419 has more GitHub stars than Nixos (901 against 894); both are community servers, and both run locally.
  • Projectmem by riponcm has fewer GitHub stars than Nixos (886 against 894); both are community servers, and both run locally.

Before you connect Nixos

  • Give Nixos its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Nixos tool call until you trust what it does with them.
  • Treat text that Nixos fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Nixos on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Nixos

How marketing and sales teams put Nixos to work, by company size. Pick the size closest to yours and start Nixos on one use case.

Small business

  • A small business with a developer can use Nixos to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Nixos to explain and fix a marketing site issue without context switching between tools.
  • A small business with a developer can use Nixos to build one focused agent, such as lead follow-up, without a big platform.
  • Nixos runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Nixos to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Nixos to keep scripts and automations documented and versioned as they change.
  • Growth engineering teams can use Nixos to build agents that combine CRM, analytics and content tools behind one workflow.
  • Start Nixos on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Nixos with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Nixos so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can build on Nixos with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Nixos is a community server, so have security review the code and pin a version before Nixos touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Nixos README

From utensils/mcp-nixos on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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

Quick Start

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

Option 1: uvx (Recommended)
{
  "mcpServers": {
    "nixos": {
      "command": "uvx",
      "args": ["mcp-nixos"]
    }
  }
}
Option 2: Nix
{
  "mcpServers": {
    "nixos": {
      "command": "nix",
      "args": ["run", "github:utensils/mcp-nixos", "--"]
    }
  }
}
Option 3: Docker
{
  "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).

# Run an HTTP MCP server at http://127.0.0.1:8000/mcp
MCP_NIXOS_TRANSPORT=http MCP_NIXOS_HOST=127.0.0.1 MCP_NIXOS_PORT=8000 mcp-nixos

STDIO (default):

MCP_NIXOS_TRANSPORT=stdio mcp-nixos

Custom path:

MCP_NIXOS_TRANSPORT=http MCP_NIXOS_PATH=/api/mcp mcp-nixos

Stateless HTTP (disables per-client session state):

MCP_NIXOS_TRANSPORT=http MCP_NIXOS_STATELESS_HTTP=1 mcp-nixos
Option 5: Pi Coding Agent

Pi does not speak MCP natively. Two supported paths:

A. pi-mcp-adapter (recommended, speaks MCP, single source of truth):

pi install npm:pi-mcp-adapter

Then add to ~/.pi/agent/mcp.json:

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

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.

What Is This?

An MCP server providing accurate, real-time information about:

  • NixOS packages - 130K+ packages that actually exist
  • NixOS options - 23K+ ways to configure your system
  • Home Manager - 5K+ options for dotfile enthusiasts
  • nix-darwin - 1K+ macOS settings Apple doesn't document
  • Nixvim - 5K+ options for Neovim configuration via NuschtOS search
  • NVF - 2.4K+ Neovim options from its published unstable documentation
  • FlakeHub - 600+ flakes from FlakeHub.com registry
  • Noogle - 2K+ Nix functions with type signatures via noogle.dev
  • NixOS Wiki - Community documentation and guides from wiki.nixos.org
  • nix.dev - Official Nix tutorials and guides from nix.dev
  • Package versions - Historical versions with commit hashes via NixHub.io
  • Binary cache status - Check if packages are cached on cache.nixos.org with download sizes
  • Local flake inputs - Explore your pinned flake dependencies directly from the Nix store (requires Nix)

The Tools

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.

nix - Unified Query Tool

One tool to rule them all:

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

version and system are only used by action="cache".

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
browse Browse Home Manager, Darwin, Nixvim, NVF, or Noogle by prefix (legacy alias: options)
channels List available NixOS channels
flake-inputs Explore local flake inputs from Nix store
cache Check binary cache status for packages
store Read files or list directories at an explicit /nix/store path (requires Nix)
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
nvf NVF Neovim configuration options (latest unstable docs)
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)

NVF results use canonical vim.* option paths. Queries may also use the shorthand programs.nvf.vim.* or the NixOS/Home Manager module path programs.nvf.settings.vim.*; both are normalized automatically.

Examples:

# Search NixOS packages
nix(action="search", query="firefox", source="nixos", type="packages")

# Get package info
nix(action="info", query="firefox", source="nixos", type="package")

# Search Home Manager options
nix(action="search", query="git", source="home-manager")

# Browse darwin options
nix(action="browse", source="darwin", query="system.defaults")

# Search Nixvim options
nix(action="search", query="telescope", source="nixvim")

# Get Nixvim option info
nix(action="info", query="plugins.telescope.enable", source="nixvim")

# Search NVF options
nix(action="search", query="vim.languages.nix", source="nvf")

# Get NVF option info using a module wrapper path
nix(action="info", query="programs.nvf.settings.vim.languages.nix.enable", source="nvf")

# Browse NVF options below a prefix
nix(action="browse", query="programs.nvf.vim.languages.nix", source="nvf")

# Search FlakeHub
nix(action="search", query="nixpkgs", source="flakehub")

# Get FlakeHub flake info
nix(action="info", query="NixOS/nixpkgs", source="flakehub")

# Search Noogle for Nix functions
nix(action="search", query="mapAttrs", source="noogle")

# Get Noogle function info
nix(action="info", query="lib.attrsets.mapAttrs", source="noogle")

# Browse Noogle function categories
nix(action="browse", source="noogle", query="lib.strings")

# Search NixOS Wiki
nix(action="search", query="nvidia", source="wiki")

# Get Wiki page info
nix(action="info", query="Flakes", source="wiki")

# Search nix.dev documentation
nix(action="search", query="packaging tutorial", source="nix-dev")

# Search NixHub for package metadata
nix(action="search", query="nodejs", source="nixhub")

# Get detailed package info from NixHub (license, homepage, store paths)
nix(action="info", query="python", source="nixhub")

# Check binary cache status
nix(action="cache", query="hello")

# Check cache for specific version
nix(action="cache", query="python", version="3.12.0")

# Check cache for specific system
nix(action="cache", query="firefox", system="x86_64-linux")

# Get stats
nix(action="stats", source="nixos", channel="stable")

# List local flake inputs (requires Nix)
nix(action="flake-inputs", type="list")

# Browse files in a flake input
nix(action="flake-inputs", type="ls", query="nixpkgs:pkgs/by-name")

# Read a file from a flake input
nix(action="flake-inputs", type="read", query="nixpkgs:flake.nix")

# List or read a store path directly (requires Nix)
nix(action="store", type="ls", query="/nix/store/<hash>-<name>")
nix(action="store", type="read", query="/nix/store/<hash>-<name>/flake.nix")
nix_versions - Package Version History

Find historical versions with nixpkgs commit hashes. Output includes:

  • Package metadata (license, homepage, programs) when available
  • Platform availability per version (Linux/macOS)
  • Nixpkgs commit hash for reproducible builds
  • Attribute path for Nix expressions
nix_versions(package, version, limit)

Examples:

# List recent versions with metadata
nix_versions(package="python", limit=5)

# Find specific version
nix_versions(package="nodejs", version="20.0.0")

Installation

You DON'T need Nix installed. This runs anywhere Python runs.

# Run directly (no install)
uvx mcp-nixos

# Or install
pip install mcp-nixos

For Nix users:

nix run github:utensils/mcp-nixos
nix profile install github:utensils/mcp-nixos
Declarative Installation (NixOS / Home Manager / nix-darwin)

mcp-nixos is available in nixpkgs:

# NixOS (configuration.nix)
environment.systemPackages = [ pkgs.mcp-nixos ];

# Home Manager (home.nix)
home.packages = [ pkgs.mcp-nixos ];

# nix-darwin (darwin-configuration.nix)
environment.systemPackages = [ pkgs.mcp-nixos ];

Or use the flake directly with the provided overlay:

# flake.nix
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    mcp-nixos.url = "github:utensils/mcp-nixos";
  };

  outputs = { self, nixpkgs, mcp-nixos, ... }: {
    # Example: NixOS configuration
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [{
        nixpkgs.overlays = [ mcp-nixos.overlays.default ];
        environment.systemPackages = [ pkgs.mcp-nixos ];
      }];
    };

    # Example: Home Manager standalone
    homeConfigurations.myuser = home-manager.lib.homeManagerConfiguration {
      pkgs = import nixpkgs {
        system = "x86_64-linux";
        overlays = [ mcp-nixos.overlays.default ];
      };
      modules = [{
        home.packages = [ pkgs.mcp-nixos ];
      }];
    };
  };
}

overlays.default only adds pkgs.mcp-nixos. The package carries its own FastMCP 4 / MCP SDK 2 stack (see nix/fastmcp4.nix), including a starlette at or above the 1.0.1 security floor FastMCP requires, so nothing else in your Python package set changes, even on nixpkgs channels that still ship FastMCP 3. If you also want pkgs.python3Packages.fastmcp itself upgraded set-wide, apply mcp-nixos.overlays.fastmcp4 in addition.

Development

nix develop          # Enter dev shell
nix build            # Build package
pytest tests/        # Run tests
ruff check .         # Lint
ruff format .        # Format
mypy mcp_nixos/      # Type check

Acknowledgments

  • NixHub.io - Package version history
  • search.nixos.org - Official NixOS search
  • FlakeHub - Flake registry by Determinate Systems
  • Jetify - Creators of Devbox and NixHub
  • Noogle - Nix function search engine
  • NuschtOS - Static option search infrastructure powering Nixvim support
  • Nixvim - Neovim configuration framework for Nix
  • NVF - Neovim configuration framework and published option catalogue

License

MIT - Because sharing is caring.

Created by James Brink. Maintained by mass̶o̶c̶h̶i̶s̶t̶s̶ enthusiasts who enjoy Nix.

Questions about Nixos

What is the Nixos MCP server?

MCP-NixOS - Model Context Protocol Server for NixOS resources. Nixos is maintained by utensils on GitHub at utensils/mcp-nixos, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Nixos MCP server?

Add Nixos to your AI app's MCP config with the command uvx mcp-nixos. In Claude Code, run claude mcp add --transport stdio nixos -- uvx mcp-nixos. To run Nixos this way you need uv installed.

Does Nixos need an API key?

The registry lists no required keys for Nixos. Check the Nixos README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Nixos an official MCP server?

No. Nixos is a community server maintained by utensils. Community servers can be excellent; read the code and the open issues before you give Nixos access to company data.

What license is Nixos under?

Nixos is released under the MIT license, according to its GitHub repository. The license covers the code of Nixos; the service it connects to has its own terms.