### Home Assistant Enable Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of enabling the Home Assistant module. ```nix true ``` -------------------------------- ### Home Assistant Headers Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of configuring HTTP headers for Home Assistant authentication, including variable expansion for sensitive tokens. ```nix { Authorization = "Bearer "."${API_TOKEN}" ; } ``` -------------------------------- ### ClickUp Password Command Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of how to configure the passwordCommand for the ClickUp module using an attribute set. This is useful for integrating with password managers. ```nix { GITHUB_PERSONAL_ACCESS_TOKEN = [ "gh" "auth" "token" ]; } ``` -------------------------------- ### Nix Package Definition Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md Example of how to define a new Nix package for an MCP server. This includes fetching from a Git repository and specifying build details. ```nix { lib, fetchFromGitHub, buildNpmPackage, }: buildNpmPackage rec { pname = "new-mcp-server"; version = "0.1.0"; src = fetchFromGitHub { owner = "new-mcp-server"; repo = "new-mcp-server"; tag = "v${version}"; hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; }; npmDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; meta = { description = "New MCP server"; homepage = "https://github.com/new-mcp-server/new-mcp-server"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ username ]; mainProgram = "new-mcp-server"; }; } ``` -------------------------------- ### Git Server HTTP Headers Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of setting HTTP headers for authentication, such as an Authorization Bearer token. It is recommended to use environment variables instead of hardcoding credentials. ```nix { Authorization = "Bearer API_TOKEN}"; } ``` -------------------------------- ### ESA Server Password Command Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Define a command to retrieve secrets for environment variables. This example shows how to use a command list to set the GITHUB_PERSONAL_ACCESS_TOKEN. ```nix { GITHUB_PERSONAL_ACCESS_TOKEN = [ "gh" "auth" "token" ]; } ``` -------------------------------- ### Install MCP Server Package with Flakes Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/packages.md Install an MCP server package using Nix flakes and `nix profile install`. This is the recommended way to manage packages with flakes. ```bash # Using flakes nix profile install github:natsukium/mcp-servers-nix#mcp-server-fetch ``` -------------------------------- ### Codex Headers Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of setting HTTP headers for authentication in the Codex module. It demonstrates using variable expansion for sensitive tokens. ```nix { Authorization = "Bearer "."${API_TOKEN}" ; } ``` -------------------------------- ### Example HTTP headers for authentication Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of setting HTTP headers for authentication, including a Bearer token. It demonstrates using variable expansion for sensitive values like API tokens. ```nix { Authorization = "Bearer "."${API_TOKEN}"; } ``` -------------------------------- ### Configure Context7 HTTP Headers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Demonstrates how to set HTTP headers for authentication with the context7 server. It shows an example of using a bearer token, emphasizing the use of environment variables for security. ```nix { Authorization = "Bearer ${API_TOKEN}"; } ``` -------------------------------- ### Example HTTP Headers with Bearer Token Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of setting an Authorization header with a Bearer token using variable expansion. Ensure the API_TOKEN environment variable is set. ```nix { Authorization = "Bearer "; } ``` -------------------------------- ### Grafana Password Command Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Example of configuring a password command for Grafana using an attribute set. This is useful for integrating with password managers. ```nix { GITHUB_PERSONAL_ACCESS_TOKEN = [ "gh" "auth" "token" ]; } ``` -------------------------------- ### Register New Package in pkgs/default.nix Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md Example of how to register a newly defined package in the main Nix package set. This makes the package available for use within the project. ```nix { ... # existing packages ... # new server new-mcp-server = pkgs.callPackage ./official/new-mcp-server { }; } ``` -------------------------------- ### Serena Extra Packages Example Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies extra packages to be available in the Serena wrapper's PATH, useful for including language servers and other tools. ```nix [ pkgs.nixd pkgs.rust-analyzer ] ``` -------------------------------- ### Generated Configuration Output Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Example of the output configuration file generated by `mkConfig` in the Nix store. ```json // result { "mcpServers": { "fetch": { "args": [], "command": "/nix/store/...-mcp-server-fetch-.../bin/mcp-server-fetch", "env": {} }, "filesystem": { "args": [ "/path/to/allowed/directory" ], "command": "/nix/store/...-mcp-server-filesystem-.../bin/mcp-server-filesystem", "env": {} } } } ``` -------------------------------- ### Example Filesystem MCP Server Output Source: https://github.com/natsukium/mcp-servers-nix/blob/main/README.md This JSON output represents the configuration for the 'filesystem' MCP server, including its command path and arguments. The structure may vary based on the selected 'flavor'. ```json { "mcpServers": { "filesystem": { "command": "/nix/store/7b4ancp3cns9lkkybd090qzr0hah5qq0-mcp-server-filesystem-2025.12.18/bin/mcp-server-filesystem", "args": [ "/path/to/allowed/directory" ] } } } ``` -------------------------------- ### Generate MCP Server Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/README.md Create a Nix configuration file for MCP servers using the `mkConfig` function. This example shows how to enable and configure the 'filesystem' module. ```nix # config.nix let pkgs = import { }; mcp-servers-nix = import (fetchTarball "https://github.com/natsukium/mcp-servers-nix/archive/main.tar.gz") { inherit pkgs; }; in mcp-servers-nix.lib.mkConfig pkgs { programs.filesystem = { enable = true; args = [ "/path/to/allowed/directory" ]; }; } ``` -------------------------------- ### Install MCP Server Package without Flakes Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/packages.md Install an MCP server package using `nix-env`. This method adds the package to your user environment. ```bash # Without flakes nix-env -f https://github.com/natsukium/mcp-servers-nix/archive/main.tar.gz -iA mcp-server-fetch ``` -------------------------------- ### Default Nix Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Shows the default configuration for several Nix options. These examples represent the default state when no specific value is provided. ```nix null ``` ```nix false ``` ```nix pkgs.context7-mcp ``` ```nix [ ] ``` ```nix { } ``` -------------------------------- ### Classic Nix Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Defines a Nix configuration using `mkConfig` to enable filesystem and fetch modules. This approach is suitable for classic Nix setups without flakes. ```nix let pkgs = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz") { }; mcp-servers = import (builtins.fetchTarball "https://github.com/natsukium/mcp-servers-nix/archive/refs/heads/main.tar.gz") { inherit pkgs; }; in mcp-servers.lib.mkConfig pkgs { programs = { filesystem = { enable = true; args = [ "/path/to/allowed/directory" ]; }; fetch.enable = true; }; } ``` -------------------------------- ### Add Custom MCP Servers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Extend MCP server configurations by defining custom servers using `mcp-servers.lib.mkConfig`. This example shows how to add a custom 'mcp-obsidian' server. ```nix mcp-servers.lib.mkConfig pkgs { format = "yaml"; fileName = "config.yaml"; programs = { filesystem = { enable = true; args = [ "/path/to/allowed/directory" ]; }; }; # Add custom MCP servers settings.servers = { mcp-obsidian = { command = "${pkgs.lib.getExe' pkgs.nodejs "npx"}"; args = [ "-y" "mcp-obsidian" "/path/to/obsidian/vault" ]; }; }; } ``` -------------------------------- ### Load Environment Variables from File Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md Use envFile to load environment variables from a file at runtime. The .env file should contain KEY=VALUE pairs, one per line. Lines starting with # are treated as comments. ```nix programs.github = { enable = true; envFile = /path/to/secrets/.env; }; ``` -------------------------------- ### Run MCP Server Package with nix-shell Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/packages.md Use this command to run an MCP server package directly using nix-shell without installing it globally. Ensure you have Nix installed. ```bash # Using nix-shell nix-shell -p "(import (builtins.fetchTarball \"https://github.com/natsukium/mcp-servers-nix/archive/main.tar.gz\") {}).mcp-server-fetch" --run mcp-server-fetch ``` -------------------------------- ### MCP Server Module with Custom Options Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md Nix module definition for a server that requires custom configuration options. This example defines an `executable` option that is platform-dependent. ```nix # modules/servers/playwright.nix { config, pkgs, lib, mkServerModule, ... }: let cfg = config.programs.playwright; in { imports = [ (mkServerModule { name = "playwright"; packageName = "playwright-mcp"; }) ]; options.programs.playwright = { executable = lib.mkOption { type = lib.types.path; default = if pkgs.stdenv.hostPlatform.isDarwin then lib.getExe pkgs.google-chrome else lib.getExe pkgs.chromium; }; }; config.settings.servers = lib.mkIf cfg.enable { playwright = { args = [ "--executable-path" cfg.executable ]; }; }; } ``` -------------------------------- ### Run Nix Flake Checks Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md Execute the full check suite for the Nix flake. This includes module evaluation tests, example build verification, package builds, and documentation freshness checks. ```bash nix flake check ``` -------------------------------- ### Run MCP Server Package with Flakes Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/packages.md Execute an MCP server package directly using Nix flakes. This is a convenient way to run packages without a formal installation. ```bash # Using flakes nix run github:natsukium/mcp-servers-nix#mcp-server-fetch ``` -------------------------------- ### Setup Claude Code Project Development Shell Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Configure a Nix development shell for a Claude Code project. This snippet symlinks the MCP configuration into the project's root directory, enabling seamless integration. ```nix # flake.nix { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; mcp-servers-nix.url = "github:natsukium/mcp-servers-nix"; }; outputs = { nixpkgs, mcp-servers-nix, ... }: let forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; in { devShells = forAllSystems (system: let pkgs = import nixpkgs { inherit system; }; in { default = pkgs.mkShell { shellHook = let config = mcp-servers-nix.lib.mkConfig pkgs { programs.playwright.enable = true; }; in '' if [ -L ".mcp.json" ]; then unlink .mcp.json fi ln -sf ${config} .mcp.json ''; }; }); }; } ``` -------------------------------- ### Build and Output Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/README.md Build the generated Nix configuration and display the resulting output. The output format depends on the 'flavor' option. ```bash nix-build config.nix && cat result ``` -------------------------------- ### Build Classic Nix Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Builds the Nix configuration defined in `config.nix` using `nix-build`. ```bash nix-build config.nix ``` -------------------------------- ### ClickUp Server Environment File Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies a path to an .env file for loading additional environment variables. Defaults to null. ```nix null ``` -------------------------------- ### Use Generated DevShell Directly Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md The generated devShell from flake-parts can be used directly for development environments. It includes MCP server packages and configuration setup. ```nix # Use the generated devShell directly devShells.default = config.mcp-servers.devShell; ``` -------------------------------- ### Generate Multiple Client Configurations Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Use the `perSystem` function with flake-parts to define a base configuration and then specify flavor-specific overrides for different clients. This approach is useful for managing multiple server instances with shared and unique settings. ```nix perSystem = { config, pkgs, ... }: { mcp-servers = { # Base configuration for all flavors programs = { playwright.enable = true; filesystem = { enable = true; args = [ ".." ]; }; }; settings.servers = { obsidian = { command = "${pkgs.nodejs}/bin/npx"; args = [ "-y" "mcp-obsidian" "." ]; }; }; # Flavor-specific overrides flavors = { claude-code = { enable = true; programs.filesystem.args = [ "../.." ]; }; vscode-workspace = { enable = true; programs.playwright.env.CUSTOM_SETTING = "vscode-value"; }; }; }; devShells.default = config.mcp-servers.devShell; }; ``` -------------------------------- ### Configure Headers with Client-Side Variable Expansion Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md For http and sse transport types, use variable expansion syntax supported by the client instead of hardcoding credentials in headers. Set the environment variable before launching the client. ```nix programs.some-server = { enable = true; type = "sse"; url = "https://api.example.com/mcp"; headers = { Authorization = "Bearer \${API_TOKEN}"; }; }; ``` -------------------------------- ### Build Configuration with Flakes Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Builds the default package defined in the `flake.nix` using the `nix build` command. ```bash nix build ``` -------------------------------- ### Add MCP Server Packages Overlay Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/packages.md Configure your Nix system or home environment to include all MCP server packages by adding the provided overlay. This makes packages available through `pkgs`. ```nix # In your configuration.nix or home.nix { nixpkgs.overlays = [ # classic (import (builtins.fetchTarball "https://github.com/natsukium/mcp-servers-nix/archive/main.tar.gz")).overlays.default # or with flakes # mcp-servers-nix.overlays.default ]; # Then install packages through pkgs environment.systemPackages = with pkgs; [ mcp-server-fetch ]; } ``` -------------------------------- ### Flake-Parts Configuration for MCP Servers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Configures MCP servers using flake-parts, enabling multi-flavor support (Claude Code and VS Code) and automatic development shell setup. It imports the `mcp-servers-nix` flake module. ```nix # flake.nix { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; mcp-servers-nix.url = "github:natsukium/mcp-servers-nix"; }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { imports = [ inputs.mcp-servers-nix.flakeModule ]; perSystem = { config, ... }: { mcp-servers = { programs.playwright.enable = true; flavors.claude-code.enable = true; }; devShells.default = config.mcp-servers.devShell; }; }; } ``` -------------------------------- ### ClickUp Server Arguments Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md An empty list by default, this option accepts an array of arguments to be passed to the ClickUp server command. ```nix [ ] ``` -------------------------------- ### Initialize and Add Dependencies with npins Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Initializes npins and adds the `mcp-servers-nix` repository as a dependency. This is used for reproducible dependency pinning without flakes. ```bash npins init npins add github natsukium mcp-servers-nix -b main ``` -------------------------------- ### ClickUp MCP Server Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the Nix package to use for the ClickUp MCP server. Defaults to pkgs.clickup-mcp-server. ```nix pkgs.clickup-mcp-server ``` -------------------------------- ### Configure Textlint Settings Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Define Textlint configuration as Nix attributes, which will be converted to JSON. This is ignored if 'configFile' is set. ```nix { rules = { alex = true; terminology = { defaultTerms = true; }; }; } ``` -------------------------------- ### Integrate MCP Servers with Home Manager Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Set up MCP servers for use with home-manager by importing the default home-manager module and configuring programs.mcp.servers. This allows individual programs to enable MCP integration. ```nix { inputs, ... }: { imports = [ inputs.mcp-servers-nix.homeManagerModules.default ]; programs.mcp.enable = true; mcp-servers.programs = { filesystem = { enable = true; args = [ "/home/user/documents" ]; }; playwright.enable = true; context7.enable = true; }; programs.claude-code = { enable = true; enableMcpIntegration = true; }; } ``` -------------------------------- ### Home Assistant Default Args Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default empty list of arguments for the Home Assistant command. ```nix [ ] ``` -------------------------------- ### Textlint Configuration File Path Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specify the path to the .textlintrc configuration file. This takes precedence over the settings option. ```nix ./.textlintrc.json ``` -------------------------------- ### Serena HTTP/SSE Authentication Headers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Configure HTTP headers for authentication with Serena's 'http' and 'sse' transport types. Use variable expansion for credentials and set environment variables before launching the client. ```nix { Authorization = "Bearer $\{API_TOKEN}"; } ``` -------------------------------- ### Run Nix Test Suite Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md Command to execute the project's test suite using Nix. This is used to verify changes before or after contributing. ```bash # Without flakes nix-build tests ``` -------------------------------- ### Add Custom MCP Servers via Flake-Parts Settings Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md Use mcp-servers.settings.servers to add custom MCP servers. This allows for additional freeform configuration applied to all enabled flavors. ```nix mcp-servers.settings.servers = { obsidian = { command = "${pkgs.nodejs}/bin/npx"; args = [ "-y" "mcp-obsidian" "/path/to/vault" ]; }; }; ``` -------------------------------- ### Textlint Extensions Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md List textlint extension packages such as rules, plugins, presets, and filter-rules. These packages will be available via NODE_PATH. ```nix [ pkgs.textlint-rule-alex pkgs.textlint-plugin-org pkgs.textlint-rule-preset-ja-technical-writing ] ``` -------------------------------- ### Default Configuration File Format Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Determines the default format for the configuration file. Supported formats are 'json', 'yaml', 'toml', and 'toml-inline'. ```nix "json" ``` -------------------------------- ### Default Configuration File Name Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the default name for the configuration file. This option is a string. ```nix "claude_desktop_config.json" ``` -------------------------------- ### Home Assistant Default Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default package used for the Home Assistant module. ```nix pkgs.ha-mcp ``` -------------------------------- ### Enable MCP Servers in Deven Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Configure MCP servers like filesystem, playwright, and context7 within a devenv.nix file. This enables declarative management of these services. ```nix { inputs, pkgs, ... }: { imports = [ inputs.mcp-servers-nix.devenvModules.default ]; claude.code.enable = true; mcp-servers.programs = { filesystem = { enable = true; args = [ "." ]; }; playwright.enable = true; context7.enable = true; }; } ``` -------------------------------- ### Default Fetch Enable Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default value for enabling the fetch module is false. Set to true to enable fetch functionality. ```nix false ``` -------------------------------- ### ClickUp Server Environment Variables Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md An empty attribute set by default, this option allows defining environment variables for the ClickUp server. Avoid hardcoding credentials; use envFile instead. ```nix { } ``` -------------------------------- ### Enable ClickUp Integration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md A boolean option to enable or disable ClickUp integration. Defaults to false. ```nix true ``` -------------------------------- ### Default freee package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default package used for the freee server is pkgs.freee-mcp. ```nix pkgs.freee-mcp ``` -------------------------------- ### Run an MCP Server Directly Source: https://github.com/natsukium/mcp-servers-nix/blob/main/README.md Execute an MCP server package directly using Nix. This is a quick way to test or run a specific server. ```bash nix run github:natsukium/mcp-servers-nix#mcp-server-fetch ``` -------------------------------- ### Configure Per-Flavor MCP Servers with Flake-Parts Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md Configure individual flavors like 'claude-code' and 'vscode-workspace' using per-flavor settings. This allows enabling configuration generation and overriding base programs or settings for specific flavors. ```nix mcp-servers.flavors = { claude-code = { enable = true; programs.filesystem.args = [ "../.." ]; }; vscode-workspace = { enable = true; programs.playwright.env.CUSTOM_SETTING = "vscode-value"; }; }; ``` -------------------------------- ### Basic MCP Server Module Source: https://github.com/natsukium/mcp-servers-nix/blob/main/CONTRIBUTING.md A minimal Nix module definition for a new MCP server. This uses the `mkServerModule` helper with just a name, suitable for servers needing no special configuration. ```nix # modules/servers/new-mcp-server.nix { mkServerModule, ... }: { imports = [ (mkServerModule { name = "new-mcp-server"; }) ]; } ``` -------------------------------- ### Notion HTTP Authentication Headers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Configure HTTP headers for authentication with Notion servers. Use variable expansion for sensitive credentials like API tokens. ```nix { Authorization = "Bearer ${API_TOKEN}"; } ``` -------------------------------- ### Default NixOS Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the default NixOS package to be used. This is the standard package provided by pkgs. ```nix pkgs.mcp-nixos ``` -------------------------------- ### Default GitHub Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the default Nix package for the github-mcp-server. ```nix pkgs.github-mcp-server ``` -------------------------------- ### Default Netdata Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the default Netdata package to be used. This is the standard package provided by pkgs. ```nix pkgs.nd-mcp ``` -------------------------------- ### Flakes Configuration for MCP Servers Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Defines a Nix Flake that imports `nixpkgs` and `mcp-servers-nix` to build a default package. This enables the filesystem and fetch modules. ```nix # flake.nix { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; mcp-servers-nix.url = "github:natsukium/mcp-servers-nix"; }; outputs = { self, nixpkgs, mcp-servers-nix }: { packages.x86_64-linux.default = let pkgs = import nixpkgs { system = "x86_64-linux"; }; in mcp-servers-nix.lib.mkConfig pkgs { programs = { filesystem = { enable = true; args = [ "/path/to/allowed/directory" ]; }; fetch.enable = true; }; }; }; } ``` -------------------------------- ### Default Git Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the default Nix package for the mcp-server-git. ```nix pkgs.mcp-server-git ``` -------------------------------- ### Generate VS Code Workspace MCP Configuration Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Create a VS Code workspace MCP configuration that includes filesystem and GitHub integration. It uses input prompts for secrets like GitHub Personal Access Tokens and generates a `.vscode/mcp.json` file. ```nix devShells = forAllSystems (system: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; in { default = pkgs.mkShell { packages = [ pkgs.vscode ]; shellHook = let config = mcp-servers-nix.lib.mkConfig pkgs { fileName = "mcp.json"; flavor = "vscode-workspace"; programs = { filesystem = { enable = true; args = [ "${toString (builtins.getEnv "PWD")}" ]; }; github = { enable = true; env.GITHUB_PERSONAL_ACCESS_TOKEN = "\${input:github_token}"; }; }; settings.inputs = [ { type = "promptString"; id = "github_token"; description = "GitHub Personal Access Token"; password = true; } ]; }; in '' mkdir -p .vscode ln -sf ${config} .vscode/mcp.json ''; }; }); ``` -------------------------------- ### Nix Configuration with npins Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-usage.md Creates a Nix configuration using a pinned version of `mcp-servers-nix` managed by npins. This ensures reproducible builds. ```nix let sources = import ./npins; pkgs = import sources.nixpkgs {}; mcp-servers = import sources.mcp-servers-nix {}; in mcp-servers.lib.mkConfig pkgs { programs = { filesystem = { enable = true; args = [ "/path/to/allowed/directory" ]; }; fetch.enable = true; }; } ``` -------------------------------- ### Default Notion Package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Specifies the Notion MCP server package to use. Defaults to pkgs.notion-mcp-server. ```nix pkgs.notion-mcp-server ``` -------------------------------- ### Default package for programs.memory.package Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default package used for the memory module is 'pkgs.mcp-server-memory'. ```nix pkgs.mcp-server-memory ``` -------------------------------- ### Retrieve Secrets with passwordCommand (String Form) Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md Use passwordCommand to retrieve secrets from password managers or other tools at runtime. The command should output KEY=VALUE lines. ```nix programs.github = { enable = true; passwordCommand = "pass mcp/github"; }; ``` -------------------------------- ### Home Assistant Default Env Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md The default empty attribute set for environment variables in Home Assistant configuration. ```nix { } ``` -------------------------------- ### Configure Base MCP Server Programs with Flake-Parts Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md The flake-parts module provides options under perSystem.mcp-servers.programs to configure base MCP server settings applied to all enabled flavors. This has the same structure as the core module's programs. ```nix mcp-servers.programs = { playwright.enable = true; github.enable = true; }; ``` -------------------------------- ### Default Configuration File Flavor Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/module-options.md Sets the default type of the configuration file. Supported flavors include 'claude', 'claude-code', 'codex', 'opencode', 'vscode', 'vscode-workspace', and 'zed'. ```nix "claude" ``` -------------------------------- ### Compose Custom DevShell with MCP Server Packages Source: https://github.com/natsukium/mcp-servers-nix/blob/main/docs/configuration-reference.md Compose a custom development shell by including MCP server packages and the generated shellHook. This allows for custom shell environments that incorporate MCP server configurations. ```nix # Or compose with your own devShells.default = pkgs.mkShell { buildInputs = [ pkgs.nodejs ] ++ config.mcp-servers.packages; shellHook = config.mcp-servers.shellHook + "''\n echo \"MCP servers configured!\"\n ''"; }; ```