The first ab initio electronic structure calculations of the magnetocrystalline anisotropy of superlattices with imperfect interfaces are presented. Specifically the possibility of an interdiffusion between the layers at the interface in Co/Pd and Co/Pt superlattices is considered. The electronic structure calculations use the local spin-density formalism as implemented with the layer Korringa-Kohn-Rostoker method. Interdiffusion at the interface is modeled in two distinct ways. In the first approach a diffuse interface is represented by ordered arrangement of substitutions, while in the second approach interdiffusion is assumed to produce a substitutionally disordered random alloy on the layers at the interface, which is solved using the coherent potential approximation. The calculated interface anisotropies for superlattices with perfect and imperfect interfaces are, on average, modeled accurately by a simple Néel-type model. This model always predicts a reduction in magnetic anisotropy resulting from the presence of defects.