Quantum impurity models are prevalent throughout many body physics, providing some prime examples of strongly correlated systems. Aside from being of great interest in themselves they can provide deep insight into the effects of strong correlations in general. The classic example is the Kondo model wherein a magnetic impurity is screened at low energies by a non interacting metallic bath. Here we consider a magnetic impurity coupled to a quantum wire with pairing interaction which dynamically generates a mass gap. Using Bethe Ansatz we solve the system exactly finding that it exhibits both screened and unscreened phases for an antiferromagnetic impurity. We determine the ground state density of states and magnetization in both phases as well as the excitations. In contrast to the well studied case of magnetic impurities in superconductors we find that there are no intragap bound states in the spectrum. The phase transition is not associated to a level crossing but with quantum fluctuations.