Just for the record, what the Rambam wrote is a lot longer than what you may have read on the internet under articles of faith. Most of the versions that people know are summaries made by others of what the Rambam wrote in his commentary on the Mishnah - Mesechet Sanhedrin.
The Rambam details what the Tanakh states about the future Davidic king in the Mishnah Torah. See the below "English translation" from the Chabad web-site.
Mishnah Torah - Hilchoth Melachim and Milchamoth chapter 11
In the future, the Messianic king will arise and renew the Davidic dynasty, restoring it to its initial sovereignty. He will build the Temple and gather the dispersed of Israel.
Then, in his days, the observance of all the statutes will return to their previous state. We will offer sacrifices, observe the Sabbatical and Jubilee years according to all their particulars as described by the Torah.
Anyone who does not believe in him or does not await his coming, denies not only the statements of the other prophets, but those of the Torah and Moses, our teacher. The Torah testified to his coming, as Deuteronomy 30:3-5 states:
Hashem will bring back your captivity and have mercy upon you. He will again gather you from among the nations... Even if your Diaspora is at the ends of the heavens, Hashem will gather you up from there... and bring you to the land....
These explicit words of the Torah include all the statements made by all the prophets.
Reference to mashiahh is also made in the portion of Bilaam who prophesies about two anointed kings: the first anointed king, David, who saved Israel from her oppressors; and the final anointed king who will arise from his descendants and save Israel in the end of days. That passage Numbers 24:17-18 relates:
'I see it, but not now' - This refers to David;
'I perceive it, but not in the near future;" - This refers to the Messianic king;
'A star shall go forth from Jacob' - This refers to David;
'and a staff shall arise in Israel' - This refers to the Messianic king;
'crushing all of Moab's princes' - This refers to David as II Samuel 8:2 relates: 'He smote Moab and measured them with a line;'
'decimating all of Seth's descendants' - This refers to the Messianic king about whom Zechariah 9:10 prophesies: 'He will rule from sea to sea.'
'Edom will be demolished' - This refers to David as II Samuel 8:6 states 'Edom became the servants of David;'
'Seir will be destroyed' - this refers to the Messianic king as Ovadiah 1:21 prophesies: 'Saviors will ascend Mount Zion to judge the mountain of Esau....'
Similarly, with regard to the cities of refuge, Deuteronomy 19:8-9 states: 'When Hashem will expand your borders... you must add three more cities.' This command was never fulfilled. Surely, Hashem did not give this command in vain. There is no need to cite proofs from the works of the prophets for all their books are filled with mention of this matter.
One should not presume that the Messianic king must work miracles and wonders, bring about new phenomena in the world, resurrect the dead, or perform other similar deeds. This is definitely not true. Proof can be brought from the fact that Rabbi Akiva, one of the greater Sages of the Mishnah, was one of the supporters of King Bar Kozibah and would describe him as the Messianic king. He and all the Sages of his generation considered him to be the Messianic king until he was killed because of sins. Once he was killed, they realized that he was not the Mashiach. The Sages did not ask him for any signs or wonders. The main thrust of the matter is: This Torah, its statutes and its laws, are everlasting. We may not add to them or detract from them.
If a king will arise from the House of David who diligently contemplates the Torah and observes its mitzvot as prescribed by the Written Law and the Oral Law as David, his ancestor, will compel all of Israel to walk in (the way of the Torah) and rectify the breaches in its observance, and fight the wars of Hashem, we may, with assurance, consider him Mashiach. If he succeeds in the above, builds the Temple in its place, and gathers the dispersed of Israel, he is definitely the Mashiach.
He will then improve the entire world, motivating all the nations to serve Hashem together, as Tzephaniah 3:9 states: 'I will transform the peoples to a purer language that they all will call upon the name of Hashem and serve Him with one purpose.'
If he did not succeed to this degree or was killed, he surely is not the redeemer promised by the Torah. Rather, he should be considered as all the other proper and complete kings of the Davidic dynasty who died. Hashem caused him to arise only to test the many, as Daniel 11:35 states: 'And some of the wise men will stumble, to try them, to refine, and to clarify until the appointed time, because the set time is in the future.'
Jesus of Nazareth who aspired to be the Mashiach and was executed by the court was also alluded to in Daniel's prophecies, as ibid. 11:14 states: 'The vulgar among your people shall exalt themselves in an attempt to fulfill the vision, but they shall stumble.'
Can there be a greater stumbling block than Christianity? All the prophets spoke of Mashiach as the redeemer of Israel and their savior who would gather their dispersed and strengthen their observance of the mitzvot. In contrast, Christianity caused the Jews to be slain by the sword, their remnants to be scattered and humbled, the Torah to be altered, and the majority of the world to err and serve a power/god/person other than Hashem.
Nevertheless, the intent of the Creator of the world is not within the power of man to comprehend, for His ways are not our ways, nor are His thoughts, our thoughts. Ultimately, all the deeds of Jesus of Nazareth and that Ishmaelite who arose after him will only serve to prepare the way for Mashiach's coming and the improvement of the entire world, motivating the nations to serve Hashem together as Tzephaniah 3:9 states: 'I will transform the peoples to a purer language that they all will call upon the name of Hashem and serve Him with one purpose.'
How will this come about? The entire world has already become filled with the mention of Mashiach, Torah, and mitzvot. These matters have been spread to the furthermost islands to many stubborn-hearted nations. They discuss these matters and the mitzvot of the Torah, saying: 'These mitzvot were true, but were already negated in the present age and are not applicable for all time.'
Others say: 'Implied in the mitzvot are hidden concepts that can not be understood simply. The Mashiach has already come and revealed those hidden truths.'
When the true Messianic king will arise and prove successful, his position becoming exalted and uplifted, they will all return and realize that their ancestors endowed them with a false heritage and their prophets and ancestors caused them to err.