bookworm-smart-assistant/scripts/browserbase-mcp.sh

18 lines
646 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Browserbase MCP 启动包装脚本
# 绕过 Claude Code 和 npm 对 NODE_OPTIONS 的过滤
# 直接用 node 启动,确保 proxy-bootstrap.js 被加载
MCP_DIR="/home/enovo/.npm/_npx/f9fc8660971328b0/node_modules/@browserbasehq/mcp-server-browserbase"
# 确保包已安装
if [ ! -f "$MCP_DIR/cli.js" ]; then
npx -y @browserbasehq/mcp-server-browserbase@latest --version >/dev/null 2>&1
fi
# 直接用 node 启动,注入 proxy-bootstrap--import 用于 ESM 模块)
exec node \
--require /mnt/c/Users/janson9527us/.claude/scripts/proxy-bootstrap.js \
--input-type=module \
-e "import '${MCP_DIR}/dist/program.js';"