Place the cage, link it to a lever, and then build a "bunker" of fortifications (fire safe of course) around it (eg, a 3x3 of fortifications with the cage in the center). Ramp up and floor over the top. Remove the ramp. Open the cage at your leisure. I recommend trenching around the bunker so that nothing can shoot in.
Your little fire turret should roast anything that gets too close, without moving around. Use traffic restrictions to discourage your civvies from getting too close, as when it eventually loses it's training it is less likely to BBQ everyone around.
You could also creatively surround the contraption with draw bridges, such that you can open a facing up on demand instead of just leaving it "armed" constantly. I'd still recommend the trenches immediately surrounding the fortifications though, else a lucky projectile might end your little birdie.
Eg, you have the original 3x3 arrangement, surrounded by a trench forming a 5x5. Bridges surround this, becoming a 7x7.
Make it such that invaders have to path next to this (or even better, between two (or more) of them) and give them a juicy target... when the attack is delt with, raise the birdguards (bridges) to make the way safe for your own.
Floor the burn area with something fire-safe and you shouldn't get any wildfires or such. Reminder: ash is firesafe (at least in vanilla)