GitHub - utensils/mcp-nixos: MCP-NixOS - Model Context Protocol Server for NixOS resources (original) (raw)

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

CI codecov PyPI Python Versions smithery badge Verified on MseeP

πŸŽ‰ 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:

The Tools You Actually Care About

πŸ” NixOS Tools

πŸ“¦ Version History Tools (NEW!)

🏠 Home Manager Tools

🍎 Darwin Tools

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

πŸ“Š What You Get

🎯 Key Improvements

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

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:

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.