The Rambam lists waiting for Moshiach as one of the 13 principles of faith. We have a tradition that there will be two Moshiachs, Ben Yosef and Ben David, which one was the Rambam referring to?
Based on the notion of R. Saadia Gaon, found in Emunos V'Deos 8:5. that the MBY is not a sure thing, I'll go with MBD.
"Quite significantly, R. Saadiah Gaon (one of the few to elaborate on the role of Mashiach ben Yossef) notes that this sequence is not definite but contingent! Mashiach ben Yossef will not have to appear before Mashiach ben David, nor will the activities attributed to him or his death have to occur. All depends on the spiritual condition of the Jewish people at the time the redemption is to take place:"
The 13 principles of faith found at the end of the morning service are a revised version of Rambam's more detailed formulation of the of Foundations of the Faith, which he published in his commentary to the Mishna, as an introduction to Perek Chelek in Sanhedrin. This being the case, it is always worthwhile to check the original regarding any questions about the meaning of any particular principle.
In this case, if we say the Rambam was referring only to Mashiach the person, it would seem that he refers to Mashiach ben David, since he ends off saying that included in this principle is the assertion שאין מלך לישראל אלא מבית דוד ומזרע שְׁלֹמֹה בלבד; that there is no king to Israel but from the house of David and the seed of Solomon alone.
However, I must add that from the gist of his words it would seem that the belief required of us is not simply about a man, but about an era. The belief that a person will help usher in that era is certainly part of it, but the main idea is a belief about the overall picture. As he starts off the principle: היסוד השנים עשר, ימות המשיח; the twelfth foundation, the days of the Mashiach.