From 8268528dd2377423929f4e1c62eebe866c7c286c Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Sat, 2 Aug 2025 21:51:47 -0700 Subject: [PATCH] Fix broken context7 mcp --- modules/home/programs/opencode/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/home/programs/opencode/default.nix b/modules/home/programs/opencode/default.nix index 6921b7c..e043ac2 100644 --- a/modules/home/programs/opencode/default.nix +++ b/modules/home/programs/opencode/default.nix @@ -2,10 +2,19 @@ config, lib, namespace, + pkgs, ... }: let cfg = config.${namespace}.programs.opencode; + + context7 = pkgs.writeShellApplication { + name = "context7-mcp"; + runtimeInputs = [ pkgs.nodejs_24 ]; + text = '' + npx -y @upstash/context7-mcp + ''; + }; in { options.${namespace}.programs.opencode = { @@ -19,8 +28,10 @@ in theme = "catppuccin"; mcp = { context7 = { - type = "remote"; - url = "https://mcp.context7.com/mcp"; + type = "local"; + command = [ + "${context7}/bin/context7-mcp" + ]; enabled = true; }; };