Accurate mortar fire from some miles away would discourage the miniguns ... the Embassy has long been zeroed in by ragheads.
I believe the poster is speaking of aircraft mounted miniguns.
C-RAM, which has been installed in the Green Zone, can blast mortar projectiles right out of the sky. Less of an issue than you’d think.
Here’s C-RAM blowing mortar shots away in Iraq: https://www.military.com/video/defense-systems/air-defense/c-ram-shooting-incoming-mortars/2036347233001
Accurate gunship fire tends to discourage mortar fire.
Except that the exact location of mortar is immediately known if the embassy has the typical tracking radar unit. And once the launcher's coordinates are known it is just a command decision as to what to respond with.
When Obama was president the response would be a box of candy or a pallet of cash. In the case of President Trump the response might be a precision guided 500lb bomb.