Surgeon's perception of palpation is limited in a minimally invasive surgery so devices for in situ quantification of soft tissue stiffness are necessary. A PZT-driven miniaturized cantilever served as actuator and sensor simultaneously was developed. By using the sensing cum actuating method, the mechanical impedance functions of soft tissues can be measured. Bioviscoelastic materials silicone rubber and dissected porcine livers under room temperature or in frozen state were utilized to test the performance of the device. The frozen porcine liver was employed to simulate liver cirrhosis. The results showed that the dissipative modulus around the resonant frequency might be utilized to quantify the stiffness of the cancerous and normal liver structure. The application of the device to robot-assisted surgery was discussed.