Magnetic impurities in small metallic clusters are investigated in the framework of the Anderson model by using exact diagonalization and geometry optimization methods.The singlet-triplet spin gap ΔE shows a remarkable dependence as a function of band-filling, cluster structure, and impurity position that can be interpreted in terms of the environment-specific conduction-electron spectrum. The low-energy spin excitations involve similar energies as isomerizations. Interesting correlations between cluster structure and magnetic behavior are revealed. Finite-temperature properties such as specific heat, effective impurity moment, and magnetic susceptibility are calculated exactly in the canonical ensemble. A finite-size equivalent of the Kondo effect is identified and its structural dependence is discussed.