In this paper, we present a comprehensive design and implementation for a micro aerial vehicle (MAV) that is able to perform 3D autonomous navigation and obstacle avoidance in cluttered and realistic unknown environments without the aid of GPS and other external sensors or markers. To achieve these autonomous missions, modularized components are developed for the MAV, including visual inertial odometry (VIO), 3D occupancy mapping and motion planning. The proposed system is implemented to run on a small embedded computer in real-time. It is demonstrated to be robust in both simulation and real flight experiments.