Cast Machine God's Effigy by paying 4. Choose to have it enter the battlefield as a copy of Mirror-Mad Phantasm, except it is an artifact and not a creature.
Activate Machine God's Effigy by tapping it, adding .
Activate Machine God's Effigy by paying 1, shuffling it into your library and then milling your entire library due to there not being a card named Mirror-Mad Phantasm in it.
By casting Machine God's Effigy and having it enter as a copy of Mirror-Mad Phantasm, you bypass the original creature's legendary status and create a noncreature artifact clone. Because this copy is named Machine God's Effigy rather than Mirror-Mad Phantasm, activating its ability to shuffle itself into your library will never find a matching name in your deck. As a result, the entire library is revealed and put straight into your graveyard, neatly setting up your entire deck for graveyard-based synergies.