When the Mahdi comes he will rule for 7 years in peace with the Jews and a treaty will be signed, and then half way through, the Mahdi will rise up because the Jews refused to live in peace. The Jews and Christians will rebel after 7 years of Mahdi rule, and a final war will happen in Damascus, and which point the Jews will be driven into the sea, and Jesus son of Mary will come down and bring final world peace.
The Mahdi is described in many hadiths or words of Prophet Mohammed, and in the Quran there are many indications of him, although not mentioned by name in the Quran.
The Mahdi is even foretold in the Torah, the Psalms and the Gospel. Although many Jews and Christians give their own interpretations.
Comments about the OP:
1- The Mahdi will never be in peace with Jews who occupy Palestine and capture the Aqsa mosque; in fact he will not give them any excuse.
2- What is said about the coming of Jesus once again to assist the Mahdi; it may not be correct: the Christ will come in his spirit not in his body, and act as intermediate between God and the Mahdi; i.e. like Gabriel with Prophet Mohammed.
The word 'Messieh' or Christ or the anointed is applicaple to many persons: those selected by God to be kings: one of them was Saul king of Jews, who was anointed by Prophet Samuel, another one was Jesus Christ who was anointed by John Baptist, and the other anointed one is the Mahdi: he also will be anointed as king of the Arab and Muslims.
In fact Jesus Christ said that the world will not see him anymore, and that he will come like the lightning; and he will come by his spirit to communicate God's commands to the Mahdi.
In addition, both Jesus Christ and Gabriel are of the same kind of angels: Rauoh, or spirit as described in the Quran.
There are much details described about the Mahdi and his way of appearing, his tactics, his plans and his wars, describing all that in details like a map .. the most of which can't be true, and it is unreasonable that every detail of his progress can be described.
Are these the teachings of Jesus Christ? who told people: it had been said to you: do not commit adultery, but I tell you if one looks with lust to a woman else than his wife: then he has committed adultery within his heart.