Partially based on this question, I would like to know what the source is that Moshiach will be a king.
Well, I guess we can start with Zecharia 9:9
גִּילִי מְאֹד בַּת צִיּוֹן הָרִיעִי בַּת יְרוּשָׁלִַם הִנֵּה מַלְכֵּךְ יָבוֹא לָךְ צַדִּיק וְנוֹשָׁע הוּא עָנִי וְרֹכֵב עַל חֲמוֹר וְעַל עַיִר בֶּן אֲתֹנוֹת
Be exceedingly happy, O daughter of Zion; Shout, O daughter of Jerusalem. Behold! Your king shall come to you. He is just and victorious; humble, and riding a donkey and a foal, the offspring of [one of] she-donkeys.
Rashi there says it references Moshiach, as does the Gemara in Sanhedrin 79a (specifically using this verse to reject an opinion that the Messianic era will come without a king).
The Rambam paskens this way as well. In fact, he includes it as part of his 13 principles of faith. A messianic era means a king leading the world to follow Hashem's Torah.
The Messiah will be a KING, who will reinstate the Kingdom of the house of David (Rambam, Yad, Hilchos Melachim 11:1).
הַמֶּלֶךְ הַמָּשִׁיחַ עָתִיד לַעֲמֹד וּלְהַחְזִיר מַלכוּת דָּוִד לְיָשְׁנָהּ לַמֶּמְשָׁלָה הָרִאשׁוֹנָה.