opencode: add mcp module integration

This commit is contained in:
Thierry Delafontaine 2025-10-27 12:15:04 +01:00 committed by Austin Horstman
parent 083b20c1a0
commit c740351870
6 changed files with 202 additions and 8 deletions

View file

@ -0,0 +1,36 @@
{
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}";
};
};
disabled-server = {
command = "echo";
args = [ "test" ];
disabled = true;
};
};
};
programs.opencode = {
enable = true;
enableMcpIntegration = true;
};
nmt.script = ''
assertFileExists home-files/.config/opencode/config.json
assertFileContent home-files/.config/opencode/config.json \
${./mcp-integration.json}
'';
}