Skip to main content
Glama

mcp-nixos

by utensils

MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages

🎉 REFACTORED: Version 1.0.0 represents a complete rewrite that drastically simplified everything. We removed all the complex caching, abstractions, and "enterprise" patterns. Because sometimes less is more, and more is just showing off.

Quick Start (Because You Want to Use It NOW)

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

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

Option 2: Using Nix (For Nix users)

{ "mcpServers": { "nixos": { "command": "nix", "args": ["run", "github:utensils/mcp-nixos", "--"] } } }

That's it. Your AI assistant now has access to real NixOS data instead of making things up. You're welcome.

What Is This Thing?

MCP-NixOS is a Model Context Protocol server that gives your AI assistant accurate, real-time information about:

  • NixOS packages (130K+ packages that actually exist)
  • Configuration options (22K+ ways to break your system)
  • Home Manager settings (4K+ options for the power users)
  • nix-darwin configurations (1K+ macOS settings Apple doesn't want you to touch)
  • Package version history via NixHub.io (Find that ancient Ruby 2.6 with commit hashes)

The Tools You Actually Care About

🔍 NixOS Tools

  • nixos_search(query, type, channel) - Search packages, options, or programs
  • nixos_info(name, type, channel) - Get detailed info about packages/options
  • nixos_stats(channel) - Package and option counts
  • nixos_channels() - List all available channels
  • nixos_flakes_search(query) - Search community flakes
  • nixos_flakes_stats() - Flake ecosystem statistics

📦 Version History Tools (NEW!)

  • nixhub_package_versions(package, limit) - Get version history with commit hashes
  • nixhub_find_version(package, version) - Smart search for specific versions

🏠 Home Manager Tools

  • home_manager_search(query) - Search user config options
  • home_manager_info(name) - Get option details (with suggestions!)
  • home_manager_stats() - See what's available
  • home_manager_list_options() - Browse all 131 categories
  • home_manager_options_by_prefix(prefix) - Explore options by prefix

🍎 Darwin Tools

  • darwin_search(query) - Search macOS options
  • darwin_info(name) - Get option details
  • darwin_stats() - macOS configuration statistics
  • darwin_list_options() - Browse all 21 categories
  • darwin_options_by_prefix(prefix) - Explore macOS options

Installation Options

Remember: You DON'T need Nix/NixOS installed! This tool runs anywhere Python runs.

For Regular Humans (Windows/Mac/Linux)

# Run directly with uvx (no installation needed) uvx mcp-nixos # Or install globally pip install mcp-nixos uv pip install mcp-nixos

For Nix Users (You Know Who You Are)

# Run without installing nix run github:utensils/mcp-nixos # Install to profile nix profile install github:utensils/mcp-nixos

Features Worth Mentioning

🚀 Version 1.0.0: The Great Simplification

  • Drastically less code - Removed thousands of lines of complexity
  • 100% functionality - Everything still works
  • 0% cache corruption - Because we removed the cache entirely
  • Stateless operation - No files to clean up
  • Direct API access - No abstraction nonsense

📊 What You Get

  • Real-time data - Always current, never stale
  • Plain text output - Human and AI readable
  • Smart suggestions - Helps when you typo option names
  • Cross-platform - Works on Linux, macOS, and yes, even Windows
  • No configuration - It just works™

🎯 Key Improvements

  • Dynamic channel resolution - stable always points to current stable
  • Enhanced error messages - Actually helpful when things go wrong
  • Deduped flake results - No more duplicate spam
  • Version-aware searches - Find that old Ruby version you need
  • Category browsing - Explore options systematically

For Developers (The Brave Ones)

With Nix (The Blessed Path)

nix develop menu # Shows all available commands # Common tasks run # Start the server run-tests # Run all tests lint # Format and check code typecheck # Check types

Without Nix (The Path of Pain)

pip install -e ".[dev]" pytest tests/ black mcp_nixos/ flake8 mcp_nixos/

Testing Philosophy

  • 367 tests that actually test things
  • Real API calls because mocks are for cowards
  • Plain text validation ensuring no XML leaks through
  • Cross-platform tests because Windows users deserve pain too

Environment Variables

Just one. We're minimalists now:

VariableDescriptionDefault
ELASTICSEARCH_URLNixOS API endpointhttps://search.nixos.org/backend

Acknowledgments

This project queries data from several amazing services:

Note: These services have not endorsed this tool. We're just grateful API consumers.

License

MIT - Because sharing is caring, even if the code hurts.


Created by James Brink and maintained by masochists who enjoy Nix.

Special thanks to the NixOS project for creating an OS that's simultaneously the best and worst thing ever.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

MCP-NixOS is a Model Context Protocol server that provides real-time, accurate information about NixOS packages, options, Home Manager, and nix-darwin configurations, preventing AI assistants from hallucinating about NixOS resources and enabling them to deliver factual system configuration guidance.

  1. Quick Start (Because You Want to Use It NOW)
    1. Option 1: Using uvx (Recommended for most users)
    2. Option 2: Using Nix (For Nix users)
  2. What Is This Thing?
    1. The Tools You Actually Care About
      1. 🔍 NixOS Tools
      2. 📦 Version History Tools (NEW!)
      3. 🏠 Home Manager Tools
      4. 🍎 Darwin Tools
    2. Installation Options
      1. For Regular Humans (Windows/Mac/Linux)
      2. For Nix Users (You Know Who You Are)
    3. Features Worth Mentioning
      1. 🚀 Version 1.0.0: The Great Simplification
      2. 📊 What You Get
      3. 🎯 Key Improvements
    4. For Developers (The Brave Ones)
      1. With Nix (The Blessed Path)
      2. Without Nix (The Path of Pain)
      3. Testing Philosophy
    5. Environment Variables
      1. Acknowledgments
        1. License

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
            Last updated -
            13
            2
            TypeScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.
            Last updated -
            17
            77
            7
            TypeScript
            Apache 2.0
            • Apple
            • Linux
          • A
            security
            A
            license
            A
            quality
            The APISIX Model Context Protocol (MCP) server bridges large language models (LLMs) with the APISIX Admin API.
            Last updated -
            31
            15
            23
            TypeScript
            Apache 2.0
          • -
            security
            A
            license
            -
            quality
            The Nx MCP server provides LLMs with comprehensive insights into your monorepo: project dependencies, file relationships, executable tasks, ownership metadata, technology stacks, custom generators, and Nx documentation. This deep context enables LLMs to produce code perfectly aligned with your archi
            Last updated -
            8,802
            1,362
            TypeScript
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/utensils/mcp-nixos'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server