Kappa distributions received impetus as they provide efficient modelling of the observed particle distributions in space and astrophysical plasmas throughout the heliosphere. This paper presents (i) the connection of kappa distributions with statistical mechanics, by maximizing the associated q-entropy under the constraints of the canonical ensemble within the framework of continuous description; (ii) the derivation of q-entropy from first principles that characterize space plasmas, the additivity of energy, and entropy; and (iii) the derivation of the characteristic first order differential equation, whose solution is the kappa distribution function.