/ Каталог / Песочница / mcp-nixos
● Сообщество utensils ⚡ Сразу

mcp-nixos

автор utensils · utensils/mcp-nixos

Look up any NixOS package, module option, or Home Manager setting from chat — 130k packages + 23k options, no setup.

mcp-nixos queries NixOS packages, system options, Home Manager, nix-darwin, Nixvim, and related registries through two tools. No auth, no local Nix install required — it proxies to public search APIs. Ideal for answering 'is there a package for X?' and 'what's the option for Y?' without hunting through docs.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

nixos.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "nixos": {
      "command": "uvx",
      "args": [
        "mcp-nixos"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "nixos": {
      "command": "uvx",
      "args": [
        "mcp-nixos"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "nixos": {
      "command": "uvx",
      "args": [
        "mcp-nixos"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "nixos": {
      "command": "uvx",
      "args": [
        "mcp-nixos"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "nixos",
      "command": "uvx",
      "args": [
        "mcp-nixos"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "nixos": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-nixos"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add nixos -- uvx mcp-nixos

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: mcp-nixos

Find a NixOS package by fuzzy name or purpose

👤 NixOS users, flake authors ⏱ ~5 min beginner

Когда использовать: You remember roughly what the package does but not its nix attribute name.

Поток
  1. Search
    Find NixOS packages matching 'ocr command line tool'.✓ Скопировано
    → Ranked list of candidates with descriptions
  2. Get details on the best fit
    For tesseract, show me the attribute path, version in unstable vs 24.11, and which meta.platforms are supported.✓ Скопировано
    → Detail card with attr, versions, platforms

Итог: The exact attribute to drop into your configuration.nix or flake.

Подводные камни
  • Channel mismatch — package only exists in unstable, not your stable channel — Ask explicitly about the channel you're on
Сочетать с: filesystem

Look up a NixOS module option with its type and default

👤 People writing NixOS modules ⏱ ~5 min beginner

Когда использовать: You know there's an option 'somewhere' for enabling zswap and you don't want to grep nixpkgs.

Поток
  1. Query options
    Is there a NixOS option for enabling zswap? Show its type, default, and description.✓ Скопировано
    → Full option card
  2. Get an example
    Give me a minimal configuration.nix snippet that enables zswap with z3fold and 20% memory.✓ Скопировано
    → Copy-paste Nix snippet

Итог: A correct option usage ready to paste in.

Pin nixpkgs to an old version of a package

👤 Users needing a specific older version ⏱ ~10 min intermediate

Когда использовать: A newer version broke something and you want the last known-good commit.

Поток
  1. Find historical versions
    Show me past versions of nodejs_20 in nixpkgs with commit hashes.✓ Скопировано
    → Version→commit table
  2. Generate a flake input
    Generate the flake input pinning nodejs_20 20.15.0 from that commit.✓ Скопировано
    → Ready-to-paste flake.nix snippet

Итог: A reproducibly pinned input for rollback.

Сочетать с: filesystem

Discover Home Manager options for a program

👤 Anyone using Home Manager ⏱ ~10 min beginner

Когда использовать: You want to manage a program declaratively but aren't sure what options exist.

Поток
  1. List program options
    List every Home Manager option under programs.neovim.✓ Скопировано
    → Categorized option list
  2. Build a minimal block
    Give me a minimal programs.neovim block enabling Telescope and LSP for TS/Python.✓ Скопировано
    → Working HM snippet

Итог: A working Home Manager config without reading the full manual.

Комбинации

Сочетайте с другими MCP — эффект x10

nixos + filesystem

Find the option and write it into your config file

Find the NixOS option to enable flatpak, then add it to ~/nixos/configuration.nix with a comment.✓ Скопировано
nixos + github

Raise an issue when a package is missing

Is package foo-cli in nixpkgs? If not, open a github issue on our fork requesting it.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
nix action: search|info|stats|options|channels|flake-inputs|cache, args: ... Any query over packages, options, channels 1 upstream API call
nix_versions package: str Need an older version / nixpkgs pin 1 upstream call

Стоимость и лимиты

Во что обходится

Квота API
Public APIs; generous limits but not infinite — don't hammer
Токенов на вызов
Options with descriptions: 500-2000 tokens. Lists can be larger.
Деньги
Free
Совет
Prefer info on one package over search returning 50.

Безопасность

Права, секреты, радиус поражения

Хранение учётных данных: None
Исходящий трафик: Calls to search.nixos.org and related public APIs

Устранение неполадок

Частые ошибки и исправления

uvx not found

Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh, then re-add the MCP.

Проверить: uvx --version
No results for a package I know exists

Spelling varies in attribute names — try a looser query or search by description.

Проверить: Retry with partial keyword
Stale version info

The MCP caches briefly; re-query in 5 minutes or pass action=cache to refresh.

Альтернативы

mcp-nixos в сравнении

АльтернативаКогда использоватьКомпромисс
search.nixos.org directlyYou're fine with a browser tabNo AI in the loop
nix-search CLIYou want local fast search and have Nix installedNeeds local Nix + an up-to-date channel

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills