MCP server for Nixpkgs, NixOS and Home Manager
Project description
A complete MCP server for Nix*
Features
- Search Nixpkgs and read package derivations
- Broad options coverage
- NixOS
- Home Manager
- Nix Darwin
- Other: 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"]
}
}
}
Using nix run:
{
"mcpServers": {
"nix": {
"command": "nix",
"args": ["run", "github:felixdorn/mcp-nix"]
}
}
}
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
| Tool | Description |
|---|---|
search_nixpkgs |
Search Nixpkgs packages |
read_derivation |
Read package source code |
search_options |
Search options for many projects |
list_versions |
List available versions for a project |
show_option_details |
Get option details or list children |
read_option_declaration |
Read option source code |
find_nixpkgs_commit_with_package_version |
Get nixpkgs commit for a version, shows available versions if not found (NixHub) |
search_nix_stdlib |
Search Nix stdlib functions (Noogle) |
help_for_stdlib_function |
Get 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 -->
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_nix-0.4.0.tar.gz.
File metadata
- Download URL: mcp_nix-0.4.0.tar.gz
- Upload date:
- Size: 131.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41777cb4ab1931fc461f0e9067cb759b4bfaf8580a626b123516f9dbe3f134f
|
|
| MD5 |
53924b873b47b564c59b059b8e471d54
|
|
| BLAKE2b-256 |
3e58e725e31fec1ac29084f25163282e0c9cacf0520e5e3a978c944591c3c6c4
|
File details
Details for the file mcp_nix-0.4.0-py3-none-any.whl.
File metadata
- Download URL: mcp_nix-0.4.0-py3-none-any.whl
- Upload date:
- Size: 43.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87613d1a148872cddf73c829b16fbe483d6ef3006d3187691d0b570cab003b0c
|
|
| MD5 |
0da0b18f4f48054fa95e09e67b51b2a6
|
|
| BLAKE2b-256 |
e7132483c065a1a88c0d52cb68c0f03809aec87968b11c065b9d9c8fedf2893f
|