How to get pitch, roll and yaw data in degrees from MPU6050

I have a setup in which I have a camera mounted on 2 servos for motion in pitch and yaw. I want these servos to correspond to the movement of my head. For this I have an MPU6050 placed on my head and I want to know if there is a library for doing this easily and if this has been done before. Also if using the MPU6050 is complicated then please suggest a module on which doing this would be easy.

PS- I am a noob.

The MPU6050 will give you only roll and pitch angles using AX, AY, and AZ. You can do a double numerical integration of GZ to get the yaw angle from an initial starting position but the accuracy will quickly degrade and become useless. You will need to find a 9DOF sensor which includes a three axis magnetometer. The accelerometer will give you roll and pitch and the magnetometer will yield yaw relative to the magnetic north pole.

For an initial Arduino project, you have selected something rather complex. You might want to try some of the examples in the IDE and experiment with them first. Look at the Sensors and Servos after a few Basics.

The BNO055 absolute orientation sensor will do what you want, and is fairly easy to use.

Make sure to follow the instructions for calibration.

Clever device with an M0 for on-board crunching.

You can use i2cdev lib, it use dmp that give to you yaw pitch and roll without drift! You can use "MPU6050_DMP6" import.