It passed a law saying the army could use rubber bullets, pyrotechnical devices, tear gas grenades or net guns, according to the text posted on parliament's website.
Hungary, a landlocked nation of 10 million, lies in the path of the largest migration wave Europe has seen since World War Two and has registered more than 220,000 asylum-seekers this year.
Prime Minister Viktor Orban told parliament police were unable to secure all Hungary's frontiers - which include outer borders of the EU's passport-free Schengen zone - without help from the army.
"We can defend the Serbian stretch of the border," he said, adding that fortifications on that 175 km (110 mile)-long section were working better than expected.
Hungary has built a fence on the Serbian border and deployed regular patrols, leading to a drastic drop of migrants crossing it. Instead, thousands have entered Croatia and Zagreb has waved them on to Hungary again.
Croatia is not a member of Schengen, and the two countries have exchanged bitter words over the handling of the migrants, with Budapest threatening to veto Croatia's Schengen accession and beginning work to fortify its border with Croatia too.