The Shia’s link and connection with the holy Prophet (s.a.w.a.) through the Ahl al-bayt (a.s.), the matter of Mahdaviyat and Hazrat Mahdi (a.t.f.s.) is very clear and his characteristics have precisely come down in numerous traditions.
Since long, scholars have gained spectacular success in narrating various traditions related to Mahdaviyat, Qaemiyat, and the personality of Hujjat-ibn-Hasan (a.t.f.s.).
In the Shia books and writings, this matter has been clearly analysed in its various dimensions, since Mahdaviyat is one of the main pillars of faith, and Hazrat Mahdi (a.t.f.s.) is the twelfth Imam and the successor to the holy Prophet’s (s.a.w.a.). Following are few Shia traditions that clearly throw light on Mahdi’s identity: (here, we shall summarise only from one of the reliable Shia sources namely Kamaluddin written by Shaikh Saduq)
The holy prophet (s.a.w.a.) said: “Mahdi is from my progeny. His name and agnomen are similar to my name and agnomen. In creation and morals, he resembles me the most…
Hazrat Amir-ul-Muminin (a.s.) said: “The eleventh from my descendent would be the Mahdi, who would fill the earth with justice, just as it would have been filled with injustice…”
In a Sahifah (scroll) with Hazrat Fatemah Zahra (a.s.), it has come down:“…Abul-Qasim Muhammad-ibn-Hasan is Allah’s Hujjah upon His creatures and the Upholder. His mother is a slave girl named Narjis.” 
Imam Hasan (a.s.) said:“Aren’t you aware that except for our Qaem, all of us are compelled to swear allegiance to the illegitimate ruler of the time? Ruhullah Jesus-ibn-Maryam would pray with him. Verily, Allah shall keep secret his birth and shall conceal his existence until his rise so that he swears allegiance to nobody. He is the ninth from the descendant of my brother Husain. He is the son of a female slave. He possesses a long life and a youthful face..” .
Imam Husain (a.s.) said:“The ninth from my descendant shall possess the sign of Joseph, and the sign of Moses-ibn-Imran and he is our Qaem. Allah shall set right his affairs in one night.”