A bunch of track going around your base, forming a minecart force field. Add some detectors somewhere hooked up to some dispensers with fire charges in them, and you have a self-emptying force field that'll automatically pick up mobs, kill them, and let players through.
Alternatively you could...