MCP Servers Nix
A Nix-based configuration framework for Model Control Protocol (MCP) servers with ready-to-use packages.
What is MCP Servers Nix?
MCP Servers Nix is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to nix-based configuration framework for model control protocol (mcp) servers with ready-to-use packages.
A Nix-based configuration framework for Model Control Protocol (MCP) servers with ready-to-use packages.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Nix-based configuration framework for Model Control Protoc
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-servers-nixConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Servers Nix
mcp-servers-nix is a Nix flake that provides a declarative, reproducible framework for configuring and packaging more than 27 MCP servers across multiple AI assistant platforms including Claude Desktop, Claude Code, VS Code, Codex CLI, and Zed. Rather than manually editing JSON config files, users define their MCP server setup in Nix expressions and let the framework generate correctly-formatted configuration for each target platform, handling credential injection via envFile or passwordCommand. It is ideal for NixOS users, teams using Home Manager, and anyone who wants pinned, reproducible MCP server deployments without manual dependency management.
Prerequisites
- Nix package manager with flakes enabled (nix.settings.experimental-features = [ "nix-command" "flakes" ])
- NixOS, nix-darwin, or a standalone Nix installation on Linux/macOS
- Optional: Home Manager or devenv for module-based configuration
- An MCP-compatible client such as Claude Desktop or Claude Code
Enable Nix flakes
Ensure flakes are enabled in your Nix configuration. Add the experimental-features setting if you have not done so already.
# In /etc/nix/nix.conf or nix.settings in NixOS configuration:
experimental-features = nix-command flakesRun an MCP server directly with nix run
Test that the flake is accessible by running an MCP server directly without any permanent installation.
nix run github:natsukium/mcp-servers-nix#mcp-server-fetchAdd mcp-servers-nix as a flake input
In your system flake.nix, add the mcp-servers-nix repository as an input so you can use its packages and mkConfig helper.
{
inputs.mcp-servers-nix.url = "github:natsukium/mcp-servers-nix";
}Generate a platform config with mkConfig
Use the mkConfig helper to declare which MCP servers to enable and generate the appropriate JSON configuration for your target platform.
mcp-servers-nix.lib.mkConfig pkgs {
programs.filesystem = {
enable = true;
args = [ "/home/user/projects" ];
};
programs.fetch.enable = true;
}Write the generated config to the correct path
Pipe the mkConfig output to the appropriate platform config file. For Claude Desktop on macOS this is ~/Library/Application Support/Claude/claude_desktop_config.json.
Use credentials securely via envFile or passwordCommand
For servers that require API keys, use the envFile option to point to a file containing credentials, or passwordCommand to retrieve secrets from a password manager at runtime.
programs.github = {
enable = true;
envFile = "/run/secrets/github-mcp-env";
};MCP Servers Nix Examples
Client configuration
Example Nix expression using mkConfig to enable the filesystem and sequential-thinking MCP servers for Claude Desktop.
mcp-servers-nix.lib.mkConfig pkgs {
flavor = "claude-desktop";
programs.filesystem = {
enable = true;
args = [ "/home/user" ];
};
programs.sequentialThinking.enable = true;
}Prompts to try
After configuring servers via mcp-servers-nix, example prompts you can use with Claude.
- "List all files in my projects directory and summarize their sizes."
- "Use sequential thinking to break down the problem of migrating this codebase to a monorepo."
- "Fetch the content of this URL and extract the main article text."
- "Show me which MCP servers are currently enabled in my Nix config."
- "Help me add a new MCP server to my mcp-servers-nix configuration with pinned version."Troubleshooting MCP Servers Nix
nix run fails with 'flakes is an experimental feature'.
Add `experimental-features = nix-command flakes` to /etc/nix/nix.conf and restart the nix daemon with `sudo systemctl restart nix-daemon`.
Generated config uses wrong key names for the target platform.
Set the `flavor` option in mkConfig to the correct platform: `claude-desktop` uses `mcpServers`, while `vscode` uses `mcp.servers` and `zed` uses `context_servers`.
API keys are exposed in the generated config file.
Use the `envFile` option pointing to a secrets file managed by agenix, sops-nix, or another secrets manager rather than embedding credentials in the Nix expression.
Frequently Asked Questions about MCP Servers Nix
What is MCP Servers Nix?
MCP Servers Nix is a Model Context Protocol (MCP) server that nix-based configuration framework for model control protocol (mcp) servers with ready-to-use packages. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Servers Nix?
Follow the installation instructions on the MCP Servers Nix GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Servers Nix?
MCP Servers Nix works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Servers Nix free to use?
Yes, MCP Servers Nix is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
MCP Servers Nix Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP Servers Nix? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Servers Nix in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Servers Nix?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.