I supose shehecheyanu or hatov vehameitiv, but I'm not sure about this. Are there something more specific than that? What are the mekorot dealing with berachos to be made when Moshiach comes?
R Shlomo Aviner answers your question (here) citing R Shlomo Zalman Auerbach (Shut Minchat Shlomo, last responsum in vol. 1) who writes that
One is obligated to recite four blessings when the Messiah arrives:
- "Baruch…Chacham Ha-Razim – Blessed are You…Knowers of secrets" which is recited when seeing 600,000 Jews together and certainly at least this many Jews will go out to greet the Messiah.
- "Baruch…She-Chalak Mechomato Lirei'av - Blessed are You…who has appointed of His knowledge to those who fear him" which is recited when seeing an outstanding Torah scholar and the Messiah will certainly fit this criteria.
- "Baruch…She-Chalak Michvodo Lirei'av- Blessed are You…who has appointed of His glory to those who fear him" which is recited when seeing a Jewish king.
- "Shechechiyanu" – Blessing Hashem for having arrived at this moment.
Unlike the popular myth (endorsed by Avrum Fried in his songs) that the Moshiach will come (unclear where from) riding a donkey and everybody will mediately recognize him as such and all of sudden the days of Moshiach will begin, according to Rambam's Melachim, the coming of the Mochiach is a long process spanning probably tens of years.
He emerges slowly, proving himself as the national leader, overcoming the enemies, bringing the Jews together in the Promised Land and finally successfully building the Temple (Rambam Melachim 11,4).
"אם עשה והצליח ובנה מקדש במקומו וקבץ נדחי ישראל הרי זה משיח בודאי "
If he succeeds in the above, builds the Temple in its place, and gathers the dispersed of Israel, he is definitely the Mashiach.
I can't figure from that Rambam when exactly he gets crowned - when he's proven as King David's descendant and is commonly accepted as a king or after he fulfills all the prophecies and builds the Temple.
The Nafka Minah is what blessing we say and when. Although we do have a blessing for seeing a Jewish king and we do say some kind of praises after major salvation (Shirat Hayam after the Exodus or Meggilat Ester after Purim events) I don't recall a clear Halocho on when and what Brocho is said (like Hameitiv or SheYihyanu).