mcp-nix
Provides tools for searching and managing nix-darwin configuration options for macOS systems, including searching options, retrieving option details, and reading declaration references.
Provides tools for searching and exploring the Nix ecosystem, including package search in Nixpkgs, NixOS configuration options, Home Manager options, Nixvim and nix-darwin configurations, and package version tracking through NixHub. Enables reading Nix source code for derivations and module declarations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
A complete MCP server for Nix*
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
Related MCP server: NixOS MCP Server
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 packages |
| Read package source code |
| Search options for many projects |
| List available versions for a project |
| Get option details or list children |
| Read option source code |
| Get nixpkgs commit for a version, shows available versions if not found (NixHub) |
| Search Nix stdlib functions (Noogle) |
| Get 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 -->
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Your agents' cloud for individuals and teams. Search, execute, packages, jobs, and credentials.
Read the web (page text, DNS, WHOIS, TLS, uptime) + research (Wikipedia, arXiv, GitHub, packages).
Read the web (page text, DNS, WHOIS, TLS, uptime) + research (Wikipedia, arXiv, GitHub, packages).
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables creation of ephemeral, polyglot development environments using Nix for on-demand execution of code with specific dependencies across Python, Node.js, Ruby, R, and Lua without cluttering the system.2MIT
- AlicenseBqualityFmaintenanceEnables searching and retrieving NixOS configuration options using the official NixOS search API. It provides detailed metadata including option types, default values, and descriptions with full support for paginated results.21ISC
- AlicenseNot gradedqualityBmaintenanceExecute commands in ephemeral containers with any combination of Nix packages.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with NixOS development tools, manage builds, and optimize workflows through natural language.Apache 2.0