This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.claude: fix MCP server configuration for Claude Code CLI

Use Claude CLI's native mcp add command instead of desktop config file.
This ensures MCP servers are properly registered and store paths stay current.

+16 -23
+1 -1
flake.nix
··· 190 190 key = ./keys/yubi.pgp; 191 191 id = "DBCD757846069B392EA9401D6657BE8A8D1EE807"; 192 192 }; 193 - ssh = builtins.readFile ./keys/yubi.ssh; 193 + ssh.yubi = builtins.readFile ./keys/yubi.ssh; 194 194 }; 195 195 }; 196 196 }
+6
lib/make-wrapper.nix
··· 114 114 passthru = (package.passthru or { }) // { 115 115 inherit env flags preHook; 116 116 }; 117 + # Pass through original attributes 118 + inherit (package) meta; 119 + } // lib.optionalAttrs (package ? version) { 120 + inherit (package) version; 121 + } // lib.optionalAttrs (package ? pname) { 122 + inherit (package) pname; 117 123 }; 118 124 }
+9 -22
tools/claude/flake-module.nix
··· 7 7 gitMcpPath = "${self.packages.${system}.git-mcp}/bin/git-mcp"; 8 8 tmuxMcpPath = "${self.packages.${system}.tmux-mcp}/bin/tmux-mcp"; 9 9 10 - # Claude configuration 11 - claudeConfig = pkgs.writeText "claude-config.json" (builtins.toJSON { 12 - mcpServers = { 13 - "git-mcp" = { 14 - command = gitMcpPath; 15 - args = []; 16 - }; 17 - "tmux-mcp" = { 18 - command = tmuxMcpPath; 19 - args = []; 20 - }; 21 - }; 22 - }); 23 - 24 10 # Path to CLAUDE.md 25 11 claudeMd = ./CLAUDE.md; 26 12 in 27 13 { 28 - packages.claude = self.libWithPkgs.${system}.makeWrapper pkgs.claude { 14 + packages.claude = self.libWithPkgs.${system}.makeWrapper (self.lib.halalify pkgs.claude-code) { 29 15 preHook = '' 30 - # Set up Claude config directory 31 - export CLAUDE_CONFIG_DIR="$HOME/Library/Application Support/Claude" 32 - mkdir -p "$CLAUDE_CONFIG_DIR" 33 - 34 - # Copy our config to Claude's config location 35 - cp ${claudeConfig} "$CLAUDE_CONFIG_DIR/claude_desktop_config.json" 16 + # Configure MCP servers using Claude CLI 17 + if claude mcp add git-mcp "${gitMcpPath}" 2>/dev/null && \ 18 + claude mcp add tmux-mcp "${tmuxMcpPath}" 2>/dev/null; then 19 + echo "MCP servers configured successfully" >&2 20 + else 21 + echo "Warning: Could not configure MCP servers" >&2 22 + fi 36 23 37 24 # Set up CLAUDE.md if it doesn't exist 38 25 CLAUDE_MD_DIR="''${CLAUDE_MD_DIR:-$HOME/.claude}" ··· 43 30 ''; 44 31 }; 45 32 }; 46 - } 33 + }