Files
home-manager/tests/modules/programs/crush/mcp-integration.nix
Vidhan Bhatt 44a1a0ab16 crush: add module
Add a module for Crush, Charm's coding agent for the terminal.

The module installs the package, writes the JSON configuration to
$XDG_CONFIG_HOME/crush/crush.json, and manages Agent Skills either from
an attribute set or from a directory. With `enableMcpIntegration` it
also takes the MCP servers from the shared `programs.mcp` module.

Co-authored-by: Rane <rane+git@junkyard.systems>
2026-08-05 10:43:29 -05:00

53 lines
1.1 KiB
Nix

{
programs.mcp = {
enable = true;
servers = {
everything = {
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-everything"
];
env.NPM_TOKEN.file = "/run/secrets/npm-token";
};
context7 = {
url = "https://mcp.context7.com/mcp";
headers.CONTEXT7_API_KEY = "$CONTEXT7_API_KEY";
};
disabled-server = {
command = "echo";
args = [ "test" ];
enabled = false;
};
filesystem = {
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-filesystem"
"/other-tmp"
];
};
};
};
programs.crush = {
enable = true;
package = null;
enableMcpIntegration = true;
settings.mcp.filesystem = {
type = "stdio";
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-filesystem"
"/tmp"
];
};
};
nmt.script = ''
assertFileContent home-files/.config/crush/crush.json ${./mcp-integration.json}
'';
}