I think it would be ridiculous to believe that Mycroft didn’t run a check on Mary as soon as she became part of Sherlock’s life, he kidnapped John as soon as he met Sherlock! So of course Mycroft would of realised that her identity was fake, maybe even discovered her real identity and her ties with Magnussen. As we’ve heard from Sherlock, Mycroft was considered “under his [Magnussen’s] thumb” so Mycroft instantly feared for Sherlock’s safety. Perhaps this is a reason why Mycroft didn’t come to the wedding, plus “the noise, the people” and the “mingling” reasons. So his phone call with Sherlock was him hinting to Sherlock that there is a potential danger with the “happy couple” and not to “get involved”.