Files
Netcatty/electron/cli/netcatty-external-mcp
T
bincxzandCursor 7d8f46d00d feat: productize External MCP for Codex, Claude, Cursor, and Grok
Expose the existing catalog MCP as a Settings-managed local bridge with
discovery lifecycle, one-click client setup, and reserved external scope
so third-party agents can use Netcatty without a sidebar chat session.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 12:46:34 +08:00

30 lines
897 B
Bash
Executable File

#!/bin/sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
SERVER_SCRIPT="$SCRIPT_DIR/../mcp/netcatty-external-mcp-server.cjs"
APP_BIN=""
if [ -n "${NETCATTY_CLI_ELECTRON_EXEC_PATH:-}" ] && [ -x "${NETCATTY_CLI_ELECTRON_EXEC_PATH}" ]; then
APP_BIN="${NETCATTY_CLI_ELECTRON_EXEC_PATH}"
elif [ -x "$SCRIPT_DIR/../../../../MacOS/Netcatty" ]; then
APP_BIN="$SCRIPT_DIR/../../../../MacOS/Netcatty"
elif [ -x "$SCRIPT_DIR/../../../../Netcatty" ]; then
APP_BIN="$SCRIPT_DIR/../../../../Netcatty"
elif [ -x "$SCRIPT_DIR/../../../../netcatty" ]; then
APP_BIN="$SCRIPT_DIR/../../../../netcatty"
fi
if [ -n "$APP_BIN" ]; then
export ELECTRON_RUN_AS_NODE=1
exec "$APP_BIN" "$SERVER_SCRIPT" "$@"
fi
if command -v node >/dev/null 2>&1; then
exec node "$SERVER_SCRIPT" "$@"
fi
printf '%s\n' "Failed to locate the bundled Netcatty runtime for netcatty-external-mcp." >&2
exit 1