MAHDI is explicitly mentioned in Koran Ayat 19:29 of Surah Maryam

Fa ashaarat ilaih; qaaloo kaifa nukallimu man kaana fil mahdi sabiyyaa

فَأَشَارَتۡ إِلَيۡهِۖ قَالُواْ كَيۡفَ نُكَلِّمُ مَن كَانَ فِي ٱلۡمَهۡدِ صَبِيّٗا

Then she pointed to him. They said: “How can we talk to one who is a child in the cradle?”

Surah Maryam of Koran Ayat 19:29 talks about AL MAHDI who is the Son of Maryam/Mary and is also mentioned as Jesus in Bible. Upon reading the Surah Mary/Maryam it is found that she was said about this even before her marriage and after her marriage a baby boy was born to her, a child in cradle, son of Zechariah and Maryam/Mary

References

edit

https://myislam.org/surah-maryam/ayat-29/#:~:text=(19%3A29)%20Thereupon%20Mary,but%20a%20child%20of%20yesterday%3F