A falling tree demolished a wall in the eastern suburb of Chembur during Sunday's early hours, burying nearby residents, the National Disaster Response Force (NDRF) said.
Seventeen bodies had been recovered from the rubble, it added. Rescuers were searching the scene for more survivors and bodies.
And in the suburb of Vikhroli in the city's northeast, six people were killed after a landslide hit five homes early Sunday, the NDRF added.
Building collapses are common during India's June-September monsoon season, with old and rickety structures buckling under days of non-stop rain.
Mumbai, home to 20 million people, has been hit by downpours since Saturday, with local transport services affected.
The Indian Meteorological Department said early Sunday that "moderate to heavy rain or thundershowers" were forecast for the next two days.
Prime Minister Narendra Modi tweeted his condolences and added that there would be financial compensation for victims' families.
Last month, 12 people were killed when a building collapsed in a Mumbai slum.
In September, 39 people died when a three-storey apartment block collapsed in Bhiwandi near Mumbai.
More about: India