DON'T allow any fluid to contact paint at *ANY* time or splash, so covering any painted areas is essential
Prior to starting remove as much fluid from master cylinder reservoir. either with a vacuum type oil gun (Like a grease gun type) or a syphon.
Disconnect the plug under the end of the cylinder for the ESP brake sensors and the electrical connector for the fluid level on the reservoir.
Disconnect the fluid lines form their respective ports and tie back with a rag or poly bag around them.
Ease the reservoir off it's rubbers which seal it to the actual cylinder.
Remove the two nuts securing the cylinder to the chamber and pull it away from it watching for the gasket behind.
Assembly is reverse of disassembly.
Top up with quality brake fluid and bleed brakes all round and clutch.
Done !