2.home-manager/tests/modules/programs/codex/mcp-integration-with-override.nix
Austin Horstman 6c8def1df8 codex: add enableMcpIntegration option
Work with the shared mcp module for integration and transformation.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-09 07:14:50 -06:00

49 lines
1 KiB
Nix

{
programs.mcp = {
enable = true;
servers = {
everything = {
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-everything"
];
};
context7 = {
url = "https://mcp.context7.com/mcp";
headers = {
CONTEXT7_API_KEY = "{env:CONTEXT7_API_KEY}";
};
};
};
};
programs.codex = {
enable = true;
enableMcpIntegration = true;
settings = {
model = "gpt-5-codex";
mcp_servers = {
custom-server = {
url = "http://localhost:3000/mcp";
enabled = true;
enabled_tools = [
"open"
"screenshot"
];
};
everything = {
command = "final-command";
enabled = false;
tool_timeout_sec = 45;
};
};
};
};
nmt.script = ''
assertFileExists home-files/.codex/config.toml
assertFileContent home-files/.codex/config.toml \
${./mcp-integration-with-override.toml}
'';
}