This paper presents the development of an underactuated compliant gripper using a biocompatible superelastic alloy, namely, nitinol. This gripper has two fingers with five phalanges each and can be used as the end-effector of an endoscopic instrument. Optimization procedures are required to obtain the geometry of the transmission mechanism because of its underactuated nature and its underlying complexity. A driving mechanism further incorporated in the gripper to distribute actuation to both fingers and accomplish the grasping of asymmetrical objects without requiring supplementary inputs is also discussed. Finally, the results of numerical simulations with different materials and different grasped objects are presented and discussed.