We investigated the thermally induced covalent coupling of cobalt porphyrin (CoP) molecules on an Au(111) surface using scanning tunnelling microscopy and first-principle calculations. While CoP molecules deposited at room temperature remain isolated due to electrostatic repulsion, annealing the substrate leads to their aggregation into chain-like structures with covalent bonding. Three distinct bonding motifs are identified, with calculations revealing weak magnetic coupling between theS=1/2Co ions. This work evidences a straightforward method for synthesising multinuclear complexes with magnetically coupled spins on surfaces, offering potential applications in molecular spintronics.