  We construct a one-parameter family of exact time-dependent solutions to 2+1
gravity with a negative cosmological constant and a massless minimally coupled
scalar field as source. These solutions present a continuously self-similar
(CSS) behaviour near the central singularity, as observed in critical collapse,
and an asymptotically AdS behaviour at spatial infinity. We consider the linear
perturbation analysis in this background, and discuss the crucial question of
boundary conditions. These are tested in the special case where the scalar
field decouples and the linear perturbations describe exactly the small-mass
static BTZ black hole. In the case of genuine scalar perturbations, we find a
growing mode with a behavior characteristic of supercritical collapse, the
spacelike singularity and apparent horizon appearing simultaneously and
evolving towards the AdS boundary. Our boundary conditions lead to the value of
the critical exponent $\gamma = 0.4$.
