If you're one PC you can disable that pesky essential status.
If not...well...nothing you can do methinks.
Are you on PC or console? If you are on PC, then you can type in the console setessential 2740e 0.
On consoles, you're stuck with him unfortunately, on pc however, just add the following to your fallout 4 ini file Documents/My Games/Fallout 4
[GamePlay]
bEssentialTakeNoDamage=0
This untags every npc in the game so you can go on a bit of a killing spree if you so desire.
Damn. Send him to one of the Settlements you never use and lock him in a box to starve to death.
Note: He'll never starve though.
You can kill MacCready, if you piss him off enough to leave, he would then become non-essential and killable.
Getting caught while stealing and pickpocketing and killing civilians seems to be the best ways to do it.
Here are all the deaths.
https://www.youtube.com/watch?v=Aol6qM9ahLU
I love you, Mage. Now I'm gonna go make that little [censored] hate me.
Edit- Holy danse! He can fly! xD
That part made me sad...