It is cited from the works of Al-Manaqib and Kitab al-Haraij wa al-jaraih by Ibn Shahr Ashoobal:
Hassan ibn Zarif narrated:
"There were two matters that nudged my chest, and I wanted to write about them to Abu Muhammad. Thus, I wrote a letter to him and asked how al-Qaim Mahdi (pbuh) will judge and where his courthouse will be.
He responded:
"You asked about Al-Qaim Mahdi (pbuh), when he [Mahdi (pbuh)] appears, he will judge by his own knowledge among people similar to David (pbuh) and will not need any evidence."
There are similar hadiths with the note of Ibn Quluya, Qulayni Ali Ibn Muhammad, Ali b. Muhammad and Hassan b. Zarif in the works of Ilamu'l-Vera and al-Irshad.
(Al-Majlisi, Bihar al-Anwar, Beirut 1404, volume 50, page 264-265)