Base Options
services.mcpServers.enable
  Whether to enable MCP servers functionality.
Details
- Type: boolean
 - Default: false
 - Example: true
 
Welcome to the MCP Servers Configuration Manual.
The MCP Flake provides declarative configuration for Model Control Protocol servers and clients.
services.mcpServers.enableWhether to enable MCP servers functionality.
services.mcpServers.servers..command Command to run the MCP server.
services.mcpServers.servers..enable Enable or disable this MCP server configuration.
services.mcpServers.servers..env Environment variables to set when running the server.
services.mcpServers.servers..filesystem.args Default arguments for the filesystem MCP server.
services.mcpServers.servers..filesystem.extraArgs Directories to provide access to.
services.mcpServers.servers..type Type of MCP server.
services.mcpServers.clients..clientType Type of MCP client to configure.
services.mcpServers.clients..configPath Path to the client configuration file. If not specified, a default path will be used.
services.mcpServers.clients..enable Whether to enable this MCP client configuration.
services.mcpServers.clients..servers List of MCP server names to enable for this client.
{
  services.mcpServers = {
    enable = true;
    servers.filesystem = {
      enable = true;
      type = "filesystem";
      command = "npx";
      filesystem.extraArgs = [
        "/home/user/projects"
        "/home/user/documents"
      ];
    };
    servers.github = {
      enable = true;
      type = "github";
      command = "npx";
      env.GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_yourtokenhere";
    };
    clients.claude = {
      enable = true;
      clientType = "claudeDesktop";
      servers = [ "filesystem" "github" ];
    };
    clients.cursor = {
      enable = true;
      clientType = "cursor";
      servers = [ "filesystem" ];
    };
  };
}
    For more details, check out the source code on GitHub.