Force sensing in minimally invasive surgery (MIS) is a chronic problem since it has an intensive magnetic resonance (MR) operation environment, which causes a high influence to traditional electronic force sensors. Optical sensor is a promising choice in this area because it is immune to MR influence. However, the changing temperature introduces a lot of noise signals to them, which is the main obstacle for optical sensing applications in MIS. This paper proposes a miniature temperature-compensated optical force sensor by using Fabry-Perot interference (FPI) principle. It can be integrated into medical tools’ tips and the temperature noise is decreased by using a reference FPI temperature sensor. An injection needle with embedded temperature-compensated FPI force sensor has been fabricated and tested. And the comparison between temperature-force simulation results and the temperature-force experiment results has been carried out.