  We investigate thickness series of films of the Heusler alloy Co$_2$FeAl in
order to study the effect of annealing on the interface with a MgO layer and on
the bulk magnetic properties. Our results reveal that while the perpendicular
interface anisotropy constant $K^{\perp}_{\rm S}$ is zero for the as-deposited
samples, its value increases with annealing up to a value of $1.14\, \pm
\,0.07$~mJ/m$^2$ for the series annealed at 320$^{\rm o}$C and of $2.07\, \pm
\,0.7$~mJ/m$^2$ for the 450$^{\rm o}$C annealed series owing to a strong
modification of the interface during the thermal treatment. This large value
ensures a stabilization of a perpendicular magnetization orientation for a
thickness below 1.7~nm. The data additionally shows that the in-plane biaxial
anisotropy constant has a different evolution with thickness in as-deposited
and annealed systems. The Gilbert damping parameter $\alpha$ shows minima for
all series for a thickness of 40~nm and an absolute minimum value of
$2.8\pm0.1\cdot10^{-3}$. The thickness dependence is explained in terms of an
inhomogenous magnetization state generated by the interplay between the
different anisotropies of the system and by crystalline disorder.
