Skip to main content

MCP server for Nixpkgs, NixOS and Home Manager

Project description

A tasteful MCP server for the Nix ecosystem

Tests

Ecosystem coverage

  • Nixpkgs
  • NixOS
  • Home Manager
  • Nixvim
  • nix-darwin
  • impermanence
  • MicroVM.nix
  • NixHub
  • Noogle

Without additional configuration, only Nixpkgs and NixOS categories are included.

Installation

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

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

Using Nix

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

Tools

  • Categories included by default:
Category ID Tools
Nixpkgs nixpkgs search_nixpkgs, show_nixpkgs_package, read_derivation[^a]
NixOS nixos search_nixos_options, show_nixos_option, list_nixos_channels, read_nixos_module[^a]
  • Categories excluded by default
Category ID Tools
Home Manager homemanager search_homemanager_options, show_homemanager_option, list_homemanager_releases, read_home_module[^a]
Nixvim nixvim search_nixvim_options, show_nixvim_option, read_nixvim_declaration[^a]
nix-darwin nix-darwin search_nix_darwin_options, show_nix_darwin_option, read_nix_darwin_declaration[^a]
impermanence impermanence search_impermanence_options, show_impermanence_option, read_impermanence_declaration[^a]
MicroVM.nix microvm search_microvm_options, show_microvm_option, read_microvm_declaration[^a]
NixHub nixhub list_package_versions, find_nixpkgs_commit_with_package_version
Noogle noogle search_nix_stdlib, help_for_stdlib_function

[^a]: Requires explicit --include even when the category is enabled.

Including tools

  • By category
    • Pass the category's ID as an argument: --homemanager --nixvim
  • By name
    • Use --include: --include=list_package_versions,...

Excluding tools

  • By category
    • Prefix the category's ID by "no-": --no-nixos
  • By name
    • Use --exclude: --exclude=find_nixpkgs_commit_with_package_version,...

List of tools

Tool Usage
nixpkgs
search_nixpkgs Search for Nixpkgs packages by name or description
show_nixpkgs_package Get details for a Nixpkgs package by exact name
read_derivation[^a] Read the Nix source code for a package derivation
nixos
search_nixos_options Search NixOS configuration options
show_nixos_option Get details for a NixOS option, or list children if given a prefix
list_nixos_channels List available NixOS release channels
read_nixos_module[^a] Read the Nix source code for a NixOS option declaration
homemanager
search_homemanager_options Search Home Manager options for user environment configuration
show_homemanager_option Get details for a Home Manager option, or list children if given a prefix
list_homemanager_releases List available Home Manager releases
read_home_module[^a] Read the Nix source code for a Home Manager option declaration
nixvim
search_nixvim_options Search NixVim configuration options
show_nixvim_option Get details for a NixVim option, or list children if given a prefix
read_nixvim_declaration[^a] Get the declaration reference for a NixVim option
nix-darwin
search_nix_darwin_options Search nix-darwin configuration options for macOS
show_nix_darwin_option Get details for a nix-darwin option, or list children if given a prefix
read_nix_darwin_declaration[^a] Get the declaration reference for a nix-darwin option
impermanence
search_impermanence_options Search impermanence configuration options
show_impermanence_option Get details for an impermanence option, or list children if given a prefix
read_impermanence_declaration[^a] Read the Nix source code for an impermanence option declaration
microvm
search_microvm_options Search MicroVM.nix configuration options
show_microvm_option Get details for a MicroVM.nix option, or list children if given a prefix
read_microvm_declaration[^a] Read the Nix source code for a MicroVM.nix option declaration
nixhub
list_package_versions List all available versions for a Nixpkgs package
find_nixpkgs_commit_with_package_version Get the nixpkgs commit hash for a specific package version
noogle
search_nix_stdlib Search Nix standard library functions by name or type signature
help_for_stdlib_function Get detailed help for a Nix standard library function
[^a]: Requires explicit --include even when the category is enabled.

Contributing

Read CONTRIBUTING.md

Credits

Thanks to the NixOS Search Team, ExtraNix, NüschtOS, 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_nix-0.3.0.tar.gz (113.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_nix-0.3.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_nix-0.3.0.tar.gz.

File metadata

  • Download URL: mcp_nix-0.3.0.tar.gz
  • Upload date:
  • Size: 113.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_nix-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c9b27947fc54f7b920ae2798595a91829ba0b4e4ffa42d6b6c2a9d72d0ef73fa
MD5 3375262f5c30db432ebad811f7310e99
BLAKE2b-256 5dc29f3caab6b240f801d8639962f554c7442a6917f6c2a7cd4d09356807694d

See more details on using hashes here.

File details

Details for the file mcp_nix-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_nix-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_nix-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6e0e59abb85b174fff6a1de19d8674e53b19dd1b0d7bfdd4319befc1b06baaa
MD5 129e7c0d5ebe0ed4358e095f97d63e2c
BLAKE2b-256 cc03050e6cae4a0c0ca3c48f1a9b5128936a97ed0c36ffb835fa5f089e1d0de7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page