
Mahdi (مَہْدِیّ, with a fatha on م) and Muhdi (مُھْدِیْ, with a damma on م) are both among the names of the Prophet ﷺ. Mawlana Musa Khan Ruhani, may Allah have mercy on him, has mentioned both names in his book "Al-Barakat al-Makkiyyah fi al-Salawat al-Nabawiyyah" (p. 264, Idarah al-Tasnif wa al-Adab, Lahore).
Allah the Almighty knows best.
Darul ifta Al-Ikhlas, Karachi.