Everything else here failed for me initially (it kept coming up as an MTP device no matter how many times I uninstalled and restarted).
However, by going and enabling USB debugging, it worked. Just do this:
- Uninstall the Nexus 5 driver
- Disconnect from the computer
- Enable developer options, see How to Enable Developer Options on the Nexus 5 & KitKat.
- Enable USB debugging: Go to Settings -> Developer Options -> USB Debugging
- Reconnect
- It will probably fail to install all drivers. Go update the drivers as described in other answers.