We recently developed an in vivo compression device that simulates the solid mechanical forces exerted by a growing tumor on the surrounding brain tissue and delineates the physical versus biological effects of a tumor. This device, to our knowledge the first of its kind, can recapitulate the compressive forces on the cerebellar cortex from primary (e.g., glioblastoma) and metastatic (e.g., breast cancer) tumors, as well as on the cerebellum from tumors such as medulloblastoma and ependymoma. We adapted standard transparent cranial windows normally used for intravital imaging studies in mice to include a turnable screw for controlled compression (acute or chronic) and decompression of the cerebral cortex. The device enables longitudinal imaging of the compressed brain tissue over several weeks or months as the screw is progressively extended against the brain tissue to recapitulate tumor growth-induced solid stress. The cranial window can be simply installed on the mouse skull according to previously established methods, and the screw mechanism can be readily manufactured in-house. The total time for construction and implantation of the in vivo compressive cranial window is <1 h (per mouse). This technique can also be used to study a variety of other diseases or disorders that present with abnormal solid masses in the brain, including cysts and benign growths.