NixSearch.NET
.NET library, CLI tool, and MCP server for searching NixOS packages, options, and flakes. Search from code, command line, or AI assistants like Claude.
claude mcp add --transport stdio playday3008-nixsearch.net docker run -i nixsearch-mcp:latest \ --env AWS_REGION="us-east-1" \ --env AWS_LAMBDA_RUNTIME="provided" \ --env NIXSEARCH_MCP_LOG_LEVEL="Info"
How to use
NixSearch.NET exposes an MCP server that enables AI assistants to search NixOS packages, options, and flakes against the same Elasticsearch-backed data index used by search.nixos.org. The MCP server is designed to be deployed in environments like AWS Lambda (ARM64) or run locally via a container image. Once running, you can query the server through the MCP protocol to retrieve package details, options, and related metadata, which can be fed into chat interfaces or AI assistants to answer questions about NixOS software and configurations. This enables contextual, on-demand help for users building or debugging NixOS configurations.
You can integrate the MCP server into your assistant pipeline by establishing an MCP-compatible prompt and using the server as the knowledge backend. Typical interactions include asking for packages by name or feature, exploring options for a given package, or navigating NixOS flake options. The server leverages the same Elasticsearch-based indexing as search.nixos.org, providing robust search capabilities and structured results that your assistant can parse and present to end users.
How to install
Prerequisites:
- Docker installed and running on your host
- AWS CLI configured if deploying to AWS Lambda
- Optional: .NET 10 SDK if you prefer a local build before containerization
Installation steps:
-
Pull the MCP server container image (or build your own): docker pull nixsearch-mcp:latest
-
(Optional) Build locally and containerize if you have a custom build process:
- Navigate to the NixSearch.MCP project directory
- dotnet publish -c Release -o ./publish
- docker build -t nixsearch-mcp:latest .
-
Run the MCP server container: docker run -i nixsearch-mcp:latest
-
If deploying to AWS Lambda (ARM64):
- Ensure AWS CLI is configured with your credentials
- Package the MCP server according to AWS Lambda deployment guides for container images
- Push the image to ECR and configure your Lambda function to use that image
-
Verify the server is reachable: connect to the MCP endpoint defined by your deployment (e.g., the Lambda invocation URL or the container's exposed port) and perform a basic MCP PING if supported by your setup.
Notes:
- The MCP server relies on the NixSearch.MCP implementation and the same underlying data/indexing used by the NixSearch suite.
- You may need to configure environment variables for indexing sources, Elasticsearch endpoints, and access controls depending on your deployment target.
Additional notes
Tips and notes:
- If you run locally, ensure Docker has sufficient memory for the Elasticsearch-backed index used by the MCP server.
- For AWS Lambda deployments, consider warm-start strategies to reduce cold start latency when invoking the MCP endpoint from AI assistants.
- Environment variables can adjust logging level, indexing sources, and region; for example, NIXSEARCH_MCP_LOG_LEVEL controls verbosity.
- Ensure the Lambda runtime or container image includes the necessary .NET runtime dependencies if you opt for non-Docker runtimes.
- When integrating with AI assistants, design prompts to pass concise queries to the MCP server and process the structured results (e.g., package name, version, description).
- If you encounter indexing or search issues, verify connectivity to the Elasticsearch backend used by search.nixos.org-compatible indices and confirm API access permissions.
Related MCP Servers
Mcp.Net
A fully featured C# implementation of Anthropic's Model Context Protocol (MCP)
RimSearcher
A Model Context Protocol (MCP) server for fast searching and retrieval of RimWorld source code.
mcpapp-colorpicker
A Model Context Protocol (MCP) App built with .NET that provides an interactive color picker with a rich UI
dnSpy
Headless CLI reflection debugger for .NET assemblies with MCP server support
RoslynMcpServer
Model Context Protocol server for Roslyn-powered C# refactoring operations
mcp-datadog
A Datadog MCP implemented in C# that exposes logs, metrics, traces, and monitors as structured context for AI agents, enabling automated observability analysis, test validation, incident investigation, and operational insights.