A transparent craniotomy window is required for optical brain imaging
however, traditional surgical preparation requires well-trained surgeons, is time-consuming, and suffers from low success rates. To address this issue, we present an automatic craniotomy platform combining optical coherence tomography (OCT) with an automated drilling machine. The OCT provides 3D skull data to guide a homemade closed-loop high-precision drill for controlled craniotomies, achieving a 100% success rate in creating small, large, and thinned windows. A synthetic transparent window was installed after skull excision. This system enables high-quality OCT angiography, velocimetry, and ultrasound imaging, offering an efficient tool for brain research.