We have developed a unique miniature confocal optical scanning microscope as an endoscopic application and successfully obtained a real time image. The confocal microscope can observe the longitudinal direction of a scanning head including the electrostatic 2-D MEMS scanner and an aspherical objective lens. Waterproof packaging of the scanning head is accomplished. The MEMS scanner and the objective lens in the head are assembled precisely and compactly. The MEMS scanner has a gimbal structure and the mirror flatness and Q factor are controlled by a stress-controlled silicon nitride. The scan angle of 12deg., the mirror flatness of 80nm(PV) and the mirror reflectance of over 85% are achieved. The diameter and length of the scanning head are 3.3mm and 8mm, respectively and it can insert into a channel of the endoscope. The lateral resolution of 0.5um, the depth resolution of 2.9um, the field of view of 100*75um and over 20/s of frame rate needed for the in-vivo inspection was achieved.