You have magma, but do you have sand?
If so, just line the tunnel with dozens of weapon traps using ten green glass serrated disks for each trap. Start at the far end and work your way forward so that the traps closest to the river will be filled with excellent or better weapons and the highest quality mechanisms you have. Build a bunch of butcher shops and then breach the wall. You might want to have something else to do for a while though as your FPS is going to go to hell with this many creatures pathing towards your dwarves through such a small space followed by them exploding when they hit the traps.
One advantage of doing this is that such a weapon trap will not only kill whatever steps into it (green glass weapons suck compared to most metal weapons, but ten of them will still puree anything that triggers them even if they're no-quality weapons), but it'll also result in said victim being turned into a whole bunch of random limbs as well as a corpse. At the butcher shop, the corpse will give you the normal amount of meat and bones for that size animal, but the limbs will also give you an extra bone and piece of meat.
That or build a bunch of green glass terrariums for cage traps, add [trAINABLE] to their raw files, train them, and then put them all in a single lever operated cage next to the entrance to await your next seige.