We see the line "Quem das finem, rex magne, laborum?" appear in the Aeneid, in book 1 line 241. We can translate this as "What end of labors do you give, great king?" In this example the words "rex magne" are both in the vocative case. The speaker is addressing someone and calls them rex magne. I think the speaker might be Venus, and the god she is addressing might be Jupiter (Jove).
So we see that Jupiter gets called "rex magne" in the Aeneid. The noun "rex" is masculine so the adjective "magnus" would be used with "rex". The word "magnus" is declined as magnus, magni, magno, magnum, magno, magne in the masculine.
The word "rex" is found in many poems, hymns, and chapters from the Bible, to describe or address a god. We see the phrase "rex caelestis" in the hymn "Gloria in excelsis deo", and we see the phrase "rex gloriae" appear in psalm 23 from the vulgate bible.
Domine deus, rex caelestis, deus pater omnipotens. Lord God, heavenly
king, heavenly father omnipotent. (Lyrics from "Gloria in excelsis deo")
Quis est iste rex gloriæ? Dominus virtutum ipse est rex gloriæ. Who is
this king of glory? The Lord of hosts is the king of glory. (Vulgata
Psalm 23:10)
So it is common to address a king by using "rex" in the vocative. There are many common addresses, like "rex magne", "rex caelestis", and "rex gloriae".