There are multiple stories related to the origin of Goddess Mahakali:
The Rudra Samhita 2.53 of the Shiva Mahapuran mentions that when Nandi informed Shiva about Sati's death, he became very furious. He angrily pulled out a locks of hair and dashed it against the mountain, which got divided into two parts. From one part manifested the valiant Veerbharda and from the other part Mahakali.
In the Uma Samhita 5.16 of the same Puran Bhagawati manifested herself in the form of Kali from the mouth and eyes of lord Vishnu at the time Madhu and Kaitabh are born from Vishnu’s ear-wax and attack Brahma.
According to Matsya Puran Kali emerged when Parvati meditated to become fair and a goddess named Koushiki emerged out of her cells.
And then of course are the accounts in Devi Mahatmya and Devi Bhagwat Puran regarding her emerging from the forehead of Goddess Ambika.
So do these different stories refer to different Kalis or to the different times Kali emerged? Also which of these appearances could be the oldest one?