mcpField
M
Mcp Nix Ecosystem (nixos, Nix, Home Manager,... )

Mcp Nix Ecosystem (nixos, Nix, Home Manager,... )

Local
github.com/felixdornDeveloper Tools7Updated 42w ago

About Mcp Nix Ecosystem (nixos, Nix, Home Manager,... )

Mcp Nix Ecosystem is an MCP server for searching Nix packages, configuration options, and standard-library functions. It also provides package derivations, option declarations, and package-version availability across nixpkgs revisions.

Key features

  1. 01Search Nixpkgs packages and read derivations
  2. 02Search options across Nix ecosystem projects
  3. 03Inspect option details and declarations
  4. 04Find package versions and matching nixpkgs commits
  5. 05Search Nix standard-library functions

Use cases

  1. 01Find a Nixpkgs package and inspect its derivation
  2. 02Look up configuration options for NixOS or Home Manager
  3. 03Read option declarations or standard-library function help
  4. 04Locate a nixpkgs commit containing a package version

MCP support

It exposes package, option, version, and standard-library search tools to MCP clients. Specific tools can be disabled with the --exclude argument.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"nix": {
"command": "uvx",
"args": [
"mcp-nix"
]
}
}
}
Run commanduvx mcp-nix

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-nix

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

A complete MCP server for Nix*

Tests

Features

  • Search Nixpkgs and read package derivations
  • Broad options coverage
    • NixOS
    • Home Manager
    • Nix Darwin
    • Nixvim
    • Impermanence
    • MicroVM.nix
    • nix-nomad
    • simple-nixos-mailserver
    • sops-nix
    • nixos-hardware
    • disko
  • Search the nix standard library and read function definitions
  • Find versions of nixpkgs in which a package exists

Installation

Use the following configuration to add the MCP server to your client:

Using uvx:

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

Add to cursor

Using nix run:

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

Add to cursor

Declaratively:

Add the flake input:

{
  inputs.mcp-nix.url = "github:felixdorn/mcp-nix";
}

Then reference the package:

{
  command = "${inputs.mcp-nix.packages.${system}.default}/bin/mcp-nix";
}
Tools
ToolDescription
search_nixpkgsSearch Nixpkgs packages
read_derivationRead package source code
search_optionsSearch options for many projects
list_versionsList available versions for a project
show_option_detailsGet option details or list children
read_option_declarationRead option source code
find_nixpkgs_commit_with_package_versionGet nixpkgs commit for a version, shows available versions if not found (NixHub)
search_nix_stdlibSearch Nix stdlib functions (Noogle)
help_for_stdlib_functionGet help for a stdlib function (Noogle)
Excluding Tools

Use --exclude to disable specific tools:

{
  "mcpServers": {
    "nix": {
      "command": "uvx",
      "args": ["mcp-nix", "--exclude=read_derivation,read_option_declaration"]
    }
  }
}
Contributing

Read CONTRIBUTING.md

Acknowledgments

Thanks to the NixOS Search Team, ExtraNix, NüschtOS, nix-nomad, NixHub, Noogle for maintaining the backends and pipeline this server uses and for the Nix community for making any of this possible.

License

GPLv3: License

<!-- mcp-name: io.github.felixdorn/mcp-nix -->

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.