The MCP-NixOS server provides accurate, real-time access to NixOS, Home Manager, and nix-darwin resources for AI assistants.
- Search capabilities: Search for NixOS packages, options, or programs, including version-specific data across different channels (unstable, stable, and older)
- Detailed information: Retrieve comprehensive details about specific NixOS packages and options
- Home Manager support: Search configuration options, get detailed information, list top-level categories, and search by prefix
- nix-darwin access: Interact with macOS configurations, including searching options and retrieving information about system and services
- Statistics: Obtain usage data about available NixOS packages/options, Home Manager options, and nix-darwin configurations
- Structured searches: Perform customizable searches with limits and channel preferences
This server helps AI assistants provide accurate NixOS-related information, reducing hallucinations and incorrect package suggestions.
Integrates with Codecov for tracking code coverage statistics from the project's test suite, with links to coverage reports.
Connects to the NixOS Elasticsearch API to query package information and system options with field-specific search boosts, multiple channel support, and error handling.
Offers specific integration for Firefox configuration in Home Manager, enabling access to Firefox profiles and settings information through dedicated search and info tools.
Provides access to Git configuration options in Home Manager, allowing AI assistants to retrieve information about Git username and other configuration settings.
Provides nix-darwin integration for macOS configuration options, allowing AI assistants to search and retrieve information about system defaults, services, and other macOS-specific settings that can be configured through nix-darwin.
Provides access to NGINX service configuration options in NixOS, allowing AI assistants to retrieve information about NGINX service settings.
Provides real-time access to NixOS packages and system options via the Elasticsearch API, allowing AI assistants to search and retrieve accurate information about available packages, their metadata, and system configuration options across multiple NixOS channels.
Enables access to PostgreSQL service configuration options in NixOS, allowing AI assistants to search and retrieve information about PostgreSQL service settings.
Provides integration with PyPI for package distribution, with version tracking and Python version compatibility information.
Offers integration with the yabai window manager configuration options in nix-darwin, providing access to service settings for macOS window management.
Provides access to Zsh shell configuration options in Home Manager, allowing AI assistants to search and retrieve information about Zsh settings.
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.
Option 1: Using uvx (Recommended for most users)
Option 2: Using Nix (For Nix users)
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 programsnixos_info(name, type, channel)
- Get detailed info about packages/optionsnixos_stats(channel)
- Package and option countsnixos_channels()
- List all available channelsnixos_flakes_search(query)
- Search community flakesnixos_flakes_stats()
- Flake ecosystem statistics
📦 Version History Tools (NEW!)
nixhub_package_versions(package, limit)
- Get version history with commit hashesnixhub_find_version(package, version)
- Smart search for specific versions
🏠 Home Manager Tools
home_manager_search(query)
- Search user config optionshome_manager_info(name)
- Get option details (with suggestions!)home_manager_stats()
- See what's availablehome_manager_list_options()
- Browse all 131 categorieshome_manager_options_by_prefix(prefix)
- Explore options by prefix
🍎 Darwin Tools
darwin_search(query)
- Search macOS optionsdarwin_info(name)
- Get option detailsdarwin_stats()
- macOS configuration statisticsdarwin_list_options()
- Browse all 21 categoriesdarwin_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)
For Nix Users (You Know Who You Are)
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)
Without Nix (The Path of Pain)
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:
Variable | Description | Default |
---|---|---|
ELASTICSEARCH_URL | NixOS API endpoint | https://search.nixos.org/backend |
Acknowledgments
This project queries data from several amazing services:
- NixHub.io - Provides package version history and commit tracking
- search.nixos.org - Official NixOS package and option search
- Jetify - Creators of Devbox and NixHub
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.
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.
Tools
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.
- Quick Start (Because You Want to Use It NOW)
- What Is This Thing?
- The Tools You Actually Care About
- Installation Options
- Features Worth Mentioning
- For Developers (The Brave Ones)
- Environment Variables
- Acknowledgments
- License
Related Resources
Related MCP Servers
- -securityAlicense-qualityMCP 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 -132TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.Last updated -17777TypeScriptApache 2.0
- AsecurityAlicenseAqualityThe APISIX Model Context Protocol (MCP) server bridges large language models (LLMs) with the APISIX Admin API.Last updated -311523TypeScriptApache 2.0
Nx MCP Serverofficial
-securityAlicense-qualityThe 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 archiLast updated -8,8021,362TypeScriptMIT License