Enables searching for NixOS configuration options to retrieve details such as option names, types, default values, and descriptions from the official NixOS search API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NixOS MCP Serverfind the configuration options for nginx services"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NixOS MCP Server
A Model Context Protocol (MCP) server that enables searching NixOS configuration options directly from Claude Code.
Features
Search NixOS configuration options by keyword or phrase
Returns option names, types, default values, and descriptions
Pagination support for large result sets
Built with TypeScript and compatible with Node 24+
Requirements
Node.js 24 or later (for native TypeScript support)
npm or yarn
Installation
Clone the repository:
Configuration for Claude Code
To use this MCP server with Claude Code, you need to configure it in Claude Code's configuration file.
Linux/macOS
Edit ~/.config/claude/claude_code_config.json:
Windows
Edit %APPDATA%\claude\claude_code_config.json:
Restart Claude Code
After adding the configuration, restart Claude Code for the MCP server to be loaded.
Usage
Once configured, you can search NixOS options directly from Claude Code. Here are some example queries:
"Search for nginx options in NixOS"
"Find networking firewall configuration options"
"What NixOS options are available for SSH?"
"Search for services.postgresql options"
Available Tool
search_nixos_options
Searches NixOS configuration options.
Parameters:
query(string, required): Search query for NixOS optionsExamples: "nginx", "networking firewall", "services.postgresql"
from(number, optional): Starting index for paginationDefault: 0
Use this to fetch subsequent pages of results
size(number, optional): Number of results per pageDefault: 20
Range: 1-50
Example:
Response Format:
Development
Run the Server Locally
To test the server without configuring Claude Code:
Code Quality
Format code:
Type check:
Features
Efficient Search: Uses the official NixOS search API endpoint
NixOS 25.11: Searches against the latest NixOS channel (25.11)
Type-Safe: Full TypeScript type definitions
Validated Input: Zod schema validation for all inputs
Error Handling: Graceful error messages for invalid queries or API issues
Pagination Support: Handle large result sets efficiently
Architecture
Troubleshooting
Server won't start
Ensure you have Node 24 or later:
node --versionCheck that the path to
src/index.tsis correct in the configurationLook for error messages in Claude Code's MCP server logs
No results found
Try more specific search terms
Use common NixOS option names or prefixes (e.g., "services.nginx", "networking")
Check the NixOS search portal for reference
Connection issues
Make sure the config file syntax is valid JSON
Verify the absolute path is correct
Restart Claude Code after updating the configuration
API Details
This server uses the official NixOS search API:
Endpoint:
https://search.nixos.org/backend/latest-44-nixos-25.11/_searchChannel: NixOS 25.11
Type: Only searches configuration options (not packages)
License
ISC