#!/usr/bin/env sh
set -eu

ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
BINARY="$ROOT/vendor/cashnerd-mcp"

if [ ! -x "$BINARY" ]; then
  echo "cashnerd-mcp binary is missing. Reinstall the npm package or set CASHNERD_MCP_BINARY_SOURCE during install." >&2
  exit 127
fi

exec "$BINARY" "$@"
