A micro-electro-mechanical system (MEMS) power generator employing a plurality of magnetic masses disposed to oscillate on spring elements in a manner that produces an unusually steep flux gradient at one or more conductive coils, thereby harvesting a substantial portion of the available mechanical energy. The energy from ambient mechanical vibration is harvested to produce electrical power sufficient to power individual electronic elements for a variety of low-cost and high-performance distributed sensor systems for medical, automotive, manufacturing, robotics, and household applications.