This article show a step by step guide on how to replace MAF sensor for Benz W204.
MAF Sensor Replacement Procedures:
The MAF is located under the engine covers at the rear of the engine (red arrow).You will need to remove the cover first so please see the article: How to Remove Benz C Class W204 Engine Cover for additional assistance.
With the air filter covers off you can see the MAF sensor housing at the rear of the engine (red arrow).There is a vacuum line that runs over the MAF that is quick and easy to remove (yellow arrow)
Disconnect the end on the left side of the engine compartment by squeezing in the plastic where it is ridged and then wiggling the connector off (red arrow).Sometimes it helps to gently push the hose on a little further before squeezing the connector.
The other end is connected to the throttle body.Push down on the two tabs (red arrows) and gently wiggle the connection off.
The MAF sensor comes with a plastic mounting piece that has two plastic clips that mount to the rear of the intake manifold.Using your hands gently pry these clips off the mount in the direction off the red arrows and slide the MAF and mount upward.
Use a flathead screwdriver and unclip the metal clip on the rear of the housing (red arrow)
You can now lift the MAF housing up.Below photo illustrates the actual sensor part of the MAF behind the protective screen (red arrow).The connection to the MAF is small and can be easily damaged so turn the MAF housing on its side to give you better to access to the connection(yellow arrow).
Use a small flathead screwdriver and gently release the clip (red arrow) and separate the connection.
With the MAF out of the car you can try spraying the film sensor section of the MAF(red arrow) with cleaner but I have never had any success with this method.I always end up replaceing the sensor.
Clean the connection gasket area around the elbow pipe and check for any crack in the pipe before installing the new MAF (red arrow).Installation is the reverse of removal.