Files
home-manager/tests/modules/programs/github-copilot-cli/mcp-integration.nix
2026-04-29 16:37:13 -05:00

52 lines
1.2 KiB
Nix

{
programs = {
github-copilot-cli = {
enable = true;
enableMcpIntegration = true;
# user-defined server takes precedence over the integrated one
mcpServers.filesystem = {
type = "local";
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-filesystem"
"/tmp"
];
tools = [ "*" ];
};
};
mcp = {
enable = true;
servers = {
filesystem = {
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-filesystem"
"/other-tmp"
];
};
database = {
command = "npx";
args = [
"-y"
"@bytebase/dbhub"
];
env = {
DATABASE_URL = "postgresql://user:pass@localhost:5432/db";
};
};
disabled-server = {
command = "disabled-cmd";
disabled = true;
};
};
};
};
nmt.script = ''
assertFileExists home-files/.copilot/mcp-config.json
assertFileContent home-files/.copilot/mcp-config.json ${./expected-mcp-integration-config.json}
'';
}