nix-agent
This server provides two core tools for managing NixOS/Home Manager configurations:
inspect_state: Read any local file and return its contents — useful for inspecting NixOS config files, flake inputs, or any other file before making changes.apply_patch_set: Write a set of file replacements to disk, automatically format any.nixfiles modified, and optionally validate and switch the system configuration. Supports two modes:nixos(default): runsnixos-rebuild dry-activatefor validation, thennixos-rebuild switch(with sudo) to activatehome-manager: runshome-manager buildthenhome-manager switch(no sudo required)Returns a
rollback_generationvalue so any bad switch can be quickly undone
Provides tools for inspecting local NixOS configuration files and applying patch sets to modify and rebuild NixOS or Home Manager configurations via nixos-rebuild or home-manager commands.
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., "@nix-agentApply the patch set to switch my Home Manager configuration."
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.
A local MCP server that gives AI agents composable NixOS / Home Manager operations: eval, locate, inspect, lint, format, build, diff, switch, generations.
It pairs with mcp-nixos. nix-agent
operates on your actual configuration, mcp-nixos handles package and option
discovery. Every response that ran a command reports raw vs returned bytes,
so the token savings are visible per call, not just claimed.
Experimental and a work in progress. Feedback and contributions welcome.
Install
Paste this to a coding agent (Codex, Claude Code, opencode, ...) and it does the install:
Read https://raw.githubusercontent.com/JEFF7712/nix-agent/main/docs/agent-install.md and follow every step to install nix-agent on this NixOS system, install the companion skill, and register nix-agent in my MCP settings for this machine.Or do it by hand, see docs/usage.md.
Related MCP server: renovate-mcp
Docs
docs/usage.md: install, MCP host config, tool surface, workflow, design notes
docs/agent-install.md: one-shot agent install guide
docs/privileged-automation.md: non-interactive switch
skills/nix-agent/SKILL.md: companion workflow skill
skills/nix-agent-init/SKILL.md: repo onboarding skill
The banner uses the Nix snowflake from NixOS/nixos-artwork, licensed CC-BY 4.0.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JEFF7712/nix-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server