MCP Servers Nix

v1.0.0Developer Toolsstable

A Nix-based configuration framework for Model Control Protocol (MCP) servers with ready-to-use packages.

mcpnix
Share:
253
Stars
0
Downloads
0
Weekly
0/5

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

Configure and manage MCP servers using Nix packages.
Use reproducible, declarative MCP server setup.
Deploy ready-to-use MCP packages via Nix.
natsukium

Maintainer

LicenseApache-2.0
Languagenix
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-servers-nix

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 flakes
2

Run 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-fetch
3

Add 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";
}
4

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;
}
5

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.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-servers-nix": { "command": "npx", "args": ["-y", "mcp-servers-nix"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides