**Fatwa of Allama Abu Jafar tusi:
ويرفع من الأرض مقدار أربع أصابع ولا يطرح فيه من غير ترابه ........ تجصيص القبور والبناء عليه في المواضع المباحة مكروه إجماع..............ويكره تجديد القبور بعد اندراسها**
المبسوط الشيخ الطوسي ج1
"Graves should be four fingers above the ground,no mud other other than the mud of grave should be placed on it,stregehting the grave(cemented etc) and building structures over it,is "makroo" by ijma(consensus).When graves are vanished,then to renew them is makhroo too." (Al-mabsoot by Shiekh tusi,pg187) [Better translation accepted]
this is alright about the actual grave and this is what I have been told since I was a child. In terms of building a mosque around it or nearby I dont see a challenge?