All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Al-Mahdi is a man from the progeny of the Prophet Mohammad and he is not ‘Eesaa (Jesus) or any Prophet. This meaning is confirmed in the Sunnah.
Jaabir narrated that the Prophet said: "A group of my nation (the Muslims) will remain fighting for the truth and backing it till the Day of Resurrection, when 'Eesaa, the son of Maryam (Mary) descends and their leader would say: "Come and lead us in our prayer." He replies: "No, Allaah has honoured this nation by making your leaders from amongst yourselves." [Muslim] In another narration by Al-Haarith Ibn Abu Usaamah it reads: "…And their leader Al-Mahdi would say: "Come and lead us in our prayer…". Imaam Ibn Al-Qayyim commented on this narration saying that its chain of narrators is good. However, a group of scholars refuted the idea of the coming of Al-Mahdi giving the evidence of the narration: "And there is no Mahdi except 'Eesaa, the son of Maryam ." [Ibn Maajah and Al-Haakim] Nevertheless, a group of scholars authoritatively asserted that this narration is weak, among whom is Shaykh Al-Islam Ibn Taymiyyah and others.
Allaah knows best.