In this work we implement the Minimal Geometric Deformation decoupling method to obtain general static interior solutions for a BTZ vacuum from the most general isotropic solution in $$2+1$$ dimensions including the cosmological constant $$\varLambda $$ . We obtain that the general solution can be generated only by the energy density of the original isotropic sector, so that this quantity plays the role of a generating function. Although as a particular example we study the static star with constant density, the method here developed can be easily applied to more complex situations described by other energy density profiles.