MCP server for Nixpkgs, NixOS and Home Manager
Project description
A tasteful MCP server for the Nix ecosystem
Ecosystem coverage
- Nixpkgs
- NixOS
- Home Manager
- Nixvim
- nix-darwin
- NixHub
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] |
| NixHub | nixhub |
list_package_versions, find_nixpkgs_commit_with_package_version |
[^a]: Requires explicit --include even when the category is enabled.
Including tools
- By category
- Pass the category's ID as an argument:
--homemanager --nixvim
- Pass the category's ID as an argument:
- By name
- Use --include:
--include=list_package_versions,...
- Use --include:
Excluding tools
- By category
- Prefix the category's ID by "no-":
--no-nixos
- Prefix the category's ID by "no-":
- By name
- Use --exclude:
--exclude=find_nixpkgs_commit_with_package_version,...
- Use --exclude:
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 |
| 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 |
[^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 for maintaining the backends and pipeline the tool 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
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.1.2.tar.gz.
File metadata
- Download URL: mcp_nix-0.1.2.tar.gz
- Upload date:
- Size: 104.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554726fde264862fcab68783f80faacfff154796564dd8bcf355c13648716905
|
|
| MD5 |
48d93b84e93064fa3379d611acae5846
|
|
| BLAKE2b-256 |
ef458251d9900e52ad7356c7bcff93cc67fc88d7f3b700338e40dd16d1e27a97
|
File details
Details for the file mcp_nix-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_nix-0.1.2-py3-none-any.whl
- Upload date:
- Size: 36.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb85b42e663b61925cadd8a1c41bb0236bd675908f336d25a845f30e8a84004
|
|
| MD5 |
b69df0e635a1f18573f944dfc9c0dcb5
|
|
| BLAKE2b-256 |
c6ff9b057f83b7723e3f5257f172357f8a50893a92c34091aebe1841a1a2e111
|