Rambam's halakhic and philosophical definition of Mashiach: a human king who restores Jewish sovereignty, rebuilds the Temple, and gathers the exiles — the world does not change its natural order. This rationalist, this-worldly conception of geulah is a crucial foil against which both Maharal and Ramchal define their own views.
הַמֶּלֶךְ הַמָּשִׁיחַ עָתִיד לַעֲמֹד וּלְהַחְזִיר מַלכוּת דָּוִד לְיָשְׁנָהּ לַמֶּמְשָׁלָה הָרִאשׁוֹנָה. וּבוֹנֶה הַמִּקְדָּשׁ וּמְקַבֵּץ נִדְחֵי יִשְׂרָאֵל. וְחוֹזְרִין כָּל הַמִּשְׁפָּטִים בְּיָמָיו כְּשֶׁהָיוּ מִקֹּדֶם. מַקְרִיבִין קָרְבָּנוֹת. וְעוֹשִׂין שְׁמִטִּין וְיוֹבְלוֹת כְּכָל מִצְוָתָן הָאֲמוּרָה בַּתּוֹרָה. וְכָל מִי שֶׁאֵינוֹ מַאֲמִין בּוֹ. אוֹ מִי שֶׁאֵינוֹ מְחַכֶּה לְבִיאָתוֹ. לֹא בִּשְׁאָר נְבִיאִים בִּלְבַד הוּא כּוֹפֵר. אֶלָּא בַּתּוֹרָה וּבְמשֶׁה רַבֵּנוּ. שֶׁהֲרֵי הַתּוֹרָה הֵעִידָה עָלָיו שֶׁנֶּאֱמַר (דברים ל, ג) "וְשָׁב ה' אֱלֹהֶיךָ אֶת שְׁבוּתְךָ וְרִחֲמֶךָ וְשָׁב וְקִבֶּצְךָ" וְגוֹ' (דברים ל, ד) "אִם יִהְיֶה נִדַּחֲךָ בִּקְצֵה הַשָּׁמָיִם" וְגוֹ' (דברים ל, ה) "וֶהֱבִיאֲךָ ה'". וְאֵלּוּ הַדְּבָרִים הַמְפֹרָשִׁים בַּתּוֹרָה הֵם כּוֹלְלִים כָּל הַדְּבָרִים שֶׁנֶּאֶמְרוּ עַל יְדֵי כָּל הַנְּבִיאִים. אַף בְּפָרָשַׁת בִּלְעָם נֶאֱמַר וְשָׁם נִבֵּא בִּשְׁנֵי הַמְּשִׁיחִים. בַּמָּשִׁיחַ הָרִאשׁוֹן שֶׁהוּא דָּוִד שֶׁהוֹשִׁיעַ אֶת יִשְׂרָאֵל מִיַּד צָרֵיהֶם. וּבַמָּשִׁיחַ הָאַחֲרוֹן שֶׁעוֹמֵד מִבָּנָיו שֶׁמּוֹשִׁיעַ אֶת יִשְׂרָאֵל [בָּאַחֲרוֹנָה]. וְשָׁם הוּא אוֹמֵר (במדבר כד, יז) "אֶרְאֶנּוּ וְלֹא עַתָּה" זֶה דָּוִד. (במדבר כד, יז) "אֲשׁוּרֶנּוּ וְלֹא קָרוֹב" זֶה מֶלֶךְ הַמָּשִׁיחַ. (במדבר כד, יז) "דָּרַךְ כּוֹכָב מִיַּעֲקֹב" זֶה דָּוִד. (במדבר כד, יז) "וְקָם שֵׁבֶט מִיִּשְׂרָאֵל" זֶה מֶלֶךְ הַמָּשִׁיחַ. (במדבר כד, יז) "וּמָחַץ פַּאֲתֵי מוֹאָב" זֶה דָּוִד. וְכֵן הוּא אוֹמֵר (שמואל ב ח, ב) "וַיַּךְ אֶת מוֹאָב וַיְמַדְּדֵם בַּחֶבֶל" (במדבר כד, יז) "וְקַרְקַר כָּל בְּנֵי שֵׁת" זֶה הַמֶּלֶךְ הַמָּשִׁיחַ שֶׁנֶּאֱמַר בּוֹ (זכריה ט, י) "וּמָשְׁלוֹ מִיָּם עַד יָם". (במדבר כד, יח) "וְהָיָה אֱדוֹם יְרֵשָׁה" זֶה דָּוִד. שֶׁנֶּאֱמַר (שמואל ב ח, יד) "וַתְּהִי אֱדוֹם לְדָוִד לַעֲבָדִים" וְגוֹ'. (במדבר כד, יח) "וְהָיָה יְרֵשָׁה" וְגוֹ' זֶה הַמֶּלֶךְ הַמָּשִׁיחַ שֶׁנֶּאֱמַר (עובדיה א, כא) "וְעָלוּ מוֹשִׁעִים בְּהַר צִיּוֹן" וְגוֹ': וְאַל יַעֲלֶה עַל דַּעְתְּךָ שֶׁהַמֶּלֶךְ הַמָּשִׁיחַ צָרִיךְ לַעֲשׂוֹת אוֹתוֹת וּמוֹפְתִים וּמְחַדֵּשׁ דְּבָרִים בָּעוֹלָם אוֹ מְחַיֶּה מֵתִים וְכַיּוֹצֵא בִּדְבָרִים אֵלּוּ [ב.] אֵין הַדָּבָר כָּךְ. שֶׁהֲרֵי רַבִּי עֲקִיבָא חָכָם גָּדוֹל מֵחַכְמֵי מִשְׁנָה הָיָה. וְהוּא הָיָה נוֹשֵׂא כֵּלָיו שֶׁל בֶּן כּוֹזִיבָא הַמֶּלֶךְ. וְהוּא הָיָה אוֹמֵר עָלָיו שֶׁהוּא הַמֶּלֶךְ הַמָּשִׁיחַ. וְדִמָּה הוּא וְכָל חַכְמֵי דּוֹרוֹ שֶׁהוּא הַמֶּלֶךְ הַמָּשִׁיחַ. עַד שֶׁנֶּהֱרַג בַּעֲוֹנוֹת. כֵּיוָן שֶׁנֶּהֱרַג נוֹדַע לָהֶם שֶׁאֵינוֹ. וְלֹא שָׁאֲלוּ מִמֶּנּוּ חֲכָמִים לֹא אוֹת וְלֹא מוֹפֵת. וְעִקַּר הַדְּבָרִים כָּכָה הֵן. שֶׁהַתּוֹרָה הַזֹּאת חֻקֶּיהָ וּמִשְׁפָּטֶיהָ לְעוֹלָם וּלְעוֹלְמֵי עוֹלָמִים. וְאֵין מוֹסִיפִין עֲלֵיהֶן וְלֹא גּוֹרְעִין מֵהֶן: וְאִם יַעֲמֹד מֶלֶךְ מִבֵּית דָּוִד הוֹגֶה בַּתּוֹרָה וְעוֹסֵק בְּמִצְוֹת כְּדָוִד אָבִיו. כְּפִי תּוֹרָה שֶׁבִּכְתָב וְשֶׁבְּעַל פֶּה. וְיָכֹף כָּל יִשְׂרָאֵל לֵילֵךְ בָּהּ וּלְחַזֵּק בִּדְקָהּ. וְיִלָּחֵם מִלְחֲמוֹת ה'. הֲרֵי זֶה בְּחֶזְקַת שֶׁהוּא מָשִׁיחַ. (אִם עָשָׂה וְהִצְלִיחַ וּבָנָה מִקְדָּשׁ בִּמְקוֹמוֹ וְקִבֵּץ נִדְחֵי יִשְׂרָאֵל הֲרֵי זֶה מָשִׁיחַ בְּוַדַּאי. וִיתַקֵּן אֶת הָעוֹלָם כֻּלּוֹ לַעֲבֹד אֶת ה' בְּיַחַד שֶׁנֶּאֱמַר כִּי אָז אֶהְפֹּךְ אֶל עַמִּים שָׂפָה בְרוּרָה לִקְרֹא כֻלָּם בְּשֵׁם ה' וּלְעָבְדוֹ שְׁכֶם אֶחָד):
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: God 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, God 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 Mashiach 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....' 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 God, 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 God together, as Tzephaniah 3:9 states: 'I will transform the peoples to a purer language that they all will call upon the name of God and serve Him with one purpose.'