Ubuntu 14.04 Bluetooth Magic Mouse doesn't pair (No agent available)

Solution 1:

Problem was I didn't have an agent registered. Normally UI should do it. A quick solution is to run:

bluez-simple-agent

Do not background the process with the ampersand (&). The program will output Agent registered. Then, try to pair it again using the Bluetooth settings in system settings.

After you begin adding the mouse, you will be prompted for the PIN on the terminal. The PIN for the Apple Magic Mouse is 0000; type this in and press Enter. Your mouse should successfully pair back in the Bluetooth settings window.

After it has successfully paired, you can close the terminal window and end the bluez-simple-agent process without affecting your mouse's connectivity. Thanks to Szymon Janc.