Based on planar waveguides, refractive index sensors have certain advantages over conventional optical fiber sensors, including better mechanical stability and lower cross-responses to factors such as vibrations. In this study, we report for the first time a microcavity Mach-Zehnder interferometric refractive index sensor fabricated within a planar waveguide. The sensor consists of double-line waveguides made of lithium tantalate crystals written by femtosecond laser and microcavities formed by diamond blade dicing. The refractive index sensitivity of the sensor reaches approximately 1856.1 nm/RIU, with extremely low temperature cross-responses. This work provides a new alternative for developing biosensors based on femtosecond laser-written waveguides. In the future, by selecting appropriate materials and optimizing the structure, the sensing performance of this sensor is expected to be further enhanced.