From 126129fbac2caa88b3a83dddba0430d370651389 Mon Sep 17 00:00:00 2001 From: octo-patch Date: Thu, 9 Apr 2026 09:29:23 +0800 Subject: [PATCH] fix: use bun to run mcp-server.cjs instead of node shebang (fixes #1648) The mcp-server.cjs script requires bun:sqlite, a Bun-specific built-in that is unavailable in Node.js. When Claude Code spawns the script using the shebang (#!/usr/bin/env node), the import fails with: Error: Cannot find module 'bun:sqlite' Fix: explicitly invoke bun as the command and pass the script as an arg, so the correct runtime is used regardless of the shebang line. --- plugin/.mcp.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/.mcp.json b/plugin/.mcp.json index e79e1d5e..9a3142d8 100644 --- a/plugin/.mcp.json +++ b/plugin/.mcp.json @@ -2,7 +2,8 @@ "mcpServers": { "mcp-search": { "type": "stdio", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.cjs" + "command": "bun", + "args": ["${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.cjs"] } } }