# 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.

- **Type:** MCP server
- **Install:** `agentstack add mcp-playday3008-nixsearch-net`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [playday3008](https://agentstack.voostack.com/s/playday3008)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [playday3008](https://github.com/playday3008)
- **Source:** https://github.com/playday3008/NixSearch.NET
- **Website:** https://nixsearch-mcp.playday3008.dev/info

## Install

```sh
agentstack add mcp-playday3008-nixsearch-net
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# NixSearch.NET

A comprehensive .NET solution for searching and exploring NixOS packages, options, and flakes using the search.nixos.org Elasticsearch backend.

[](https://opensource.org/licenses/MIT)
[](https://dotnet.microsoft.com/)

## Overview

NixSearch.NET provides multiple ways to interact with the NixOS package and option search ecosystem:

- **Library**: A robust .NET client library for programmatic access
- **CLI Tool**: A command-line interface for quick searches
- **MCP Server**: A Model Context Protocol server for AI assistant integration

## Projects

### [NixSearch.Core](src/NixSearch.Core/README.md)

The core library providing search functionality for NixOS packages, options, and flakes.

- **NuGet Package**: `NixSearch.Core`
- **Target Framework**: .NET 10
- **Features**: Full Elasticsearch query support, strongly-typed models, async/await patterns

### [NixSearch.CLI](src/NixSearch.CLI/README.md)

A command-line tool for searching NixOS packages and options from your terminal.

- **NuGet Package**: `NixSearch.CLI`
- **Tool Command**: `nixsearch`
- **Installation**: `dotnet tool install -g NixSearch.CLI`

### [NixSearch.MCP](src/NixSearch.MCP/README.md)

A Model Context Protocol (MCP) server enabling AI assistants to search NixOS packages and options.

- **NuGet Package**: `NixSearch.MCP`
- **Deployment**: AWS Lambda (ARM64)
- **Protocol**: [Model Context Protocol](https://modelcontextprotocol.io/)

## Quick Start

### Using the Library

```bash
dotnet add package NixSearch.Core
```

```csharp
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

using NixSearch.Core.Extensions;
using NixSearch.Core.Models;
using NixSearch.Core.Search;

IConfiguration configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build()
    .GetSection("NixSearch");

ServiceCollection services = new ServiceCollection();
services.AddNixSearch(configuration);
ServiceProvider provider = services.BuildServiceProvider();

INixSearchClient client = provider.GetRequiredService();
IReadOnlyList channels = await client.GetChannelsAsync();

Nest.ISearchResponse results = await client.Packages()
    .WithQuery("git")
    .ForChannel(NixChannel.Parse("unstable", channels))
    .Page(0, 10)
    .ExecuteAsync();

foreach (NixPackage package in results.Documents)
{
    Console.WriteLine($"{package.Name}: {package.Version}");
}
```

### Using the CLI

```bash
# Install globally
dotnet tool install -g NixSearch.CLI

# Search for packages
nixsearch packages git --size 10

# Search for options
nixsearch options services.nginx --size 5
```

### Using the MCP Server

The MCP server can be deployed to AWS Lambda or run locally. See the [MCP documentation](src/NixSearch.MCP/README.md) for details on integration with AI assistants like Claude.

## Building

```bash
# Build all projects
dotnet build

# Run tests
dotnet test

# Pack NuGet packages
dotnet pack
```

## Requirements

- .NET 10 SDK or later
- For AWS Lambda deployment: AWS CLI configured

## Repository Structure

```tree
NixSearch.NET/
├── src/
│   ├── NixSearch.Core/      # Core library
│   ├── NixSearch.CLI/       # CLI tool
│   └── NixSearch.MCP/       # MCP server
├── tests/
│   ├── NixSearch.Core.Tests/
│   ├── NixSearch.CLI.Tests/
│   └── NixSearch.MCP.Tests/
├── .github/
│   └── workflows/           # CI/CD workflows
└── NixSearch.sln            # Solution file
```

## Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Built on top of the [search.nixos.org](https://search.nixos.org) infrastructure
- Uses [NEST](https://github.com/elastic/elasticsearch-net) for Elasticsearch integration
- MCP protocol implementation from [ModelContextProtocol](https://github.com/modelcontextprotocol/dotnet-sdk)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [playday3008](https://github.com/playday3008)
- **Source:** [playday3008/NixSearch.NET](https://github.com/playday3008/NixSearch.NET)
- **License:** MIT
- **Homepage:** https://nixsearch-mcp.playday3008.dev/info

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-playday3008-nixsearch-net
- Seller: https://agentstack.voostack.com/s/playday3008
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
