An MCP server for Nix

An MCP server for Nix

mcp-nix•byfelixdorn

An MCP server that lets clients search Nixpkgs packages, read derivations, explore configuration options across many Nix projects, and look up Nix standard library functions.

License: GPLv3•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Searches Nixpkgs for packages and reads package derivations, with source readers supporting paginated line ranges.
  • •Searches options across many Nix projects, including NixOS, Home Manager, Nix Darwin, Nixvim, Impermanence, and others.
  • •Searches the Nix standard library and retrieves help for standard library functions.
  • •Finds nixpkgs commits containing a given package version and lists available versions for a project.

BEST FOR

  • •Developers exploring Nixpkgs to find packages and inspect their derivations.
  • •Users configuring NixOS or Home Manager who need to look up option details and declarations.
  • •Nix users who need to determine which nixpkgs revision provides a specific package version.

ABOUT MCP-NIX

An MCP server for Nix is cataloged as an MCP server attributed to felixdorn. An MCP server that lets clients search Nixpkgs packages, read derivations, explore configuration options across many Nix projects, and look up Nix standard library functions. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: GPLv3. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for An MCP server for Nix are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can specific tools be disabled?

Yes, tools can be disabled with the --exclude option.

Do the tools return structured output?

Tools return readable text alongside typed structuredContent, and searches include records, total, returned, and the effective version.

Upstream README

View this exact version on GitHub

README.md · d9cfbbf0cb80 · Fetched 2026-11-13 10:26:18 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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)

Result contracts

Tools return readable text and typed structuredContent. Searches include records, total, returned, and the effective version. Tool failures set isError=true. All tools advertise read-only, non-destructive behavior while querying external services.

Use limit (1–100) to bound searches. show_option_details returns up to 50 children by default; pass its next_offset as offset to continue. Source readers accept one-based start_line and limit (200 lines by default, maximum 1,000); follow next_start_line to continue reading. list_versions returns canonical version IDs.

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 -->

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for An MCP server for Nix from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-nix)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools