I think the key is to build helpful mentoring and sponsor relationships as early as possible. In addition I think you need to always be careful about framing things in the positive, otherwise you can be seen as a complainer.
Advocate for yourself. Ask for step up opportunities. You are awesome and you deserve the job you have - don't doubt yourself for one minute - you were chosen from a pile of amazing candidates. Our recruiting processes don't allow for mistakes - you earned this!
I worked at McKinsey for about 7 years. It was a great experience, but I didn't know how political it would get as you get more senior in the Department. McKinsey is a Partnership and this is an important fact to remember - it's not just about your own performance but also which Partner is in charge and who is in their support network - as the lead Partners move around so do political allegiances, especially in the support staff departments. You might well be doing a great job but if there is no-one to bat for your team, you won't last long. Maternity leave was for the most part uneventful - they will leave you alone while you're on maternity leave but most McKinsey women prefer to keep in touch with the office and it is easy to do so most of the time.