I don't know exactly what it depends on, if it is exactly the fault of the operating system used or MIUI; I know however that the latter cannot communicate with ADB. And most likely it is just a bug of the version I installed on my Xiaomi Mi2, exactly the WIUI 4.8.29, but still based on MIUI. However, I believe that someone might find it useful, should they read Device not found, in an attempt to communicate with your smartphone via ADB.
MIUI ADB Windows
On Windows, although I used ADB in the past (with CyanogenMod), I couldn't get ADB to work. It was enough though download these Xiaomi drivers. In reality it is a tool, moreover in Chinese, but - with the installation of the software - the drivers will also be installed and the installation procedure of these will be completed as soon as the smartphone is connected to the PC.
So, in this case it is easy to solve, and although the software is in Chinese, the installation is very intuitive. There will be no need to start and use the software.
MIUI ADB Linux (and Mac)
On Ubuntu, as on Windows (but also on Mac from what I read around), trying to link devices via ADB (adb devices) and then trying to start the shell, a message will warn us that no device was found: device not found, or simply the empty list.
In this case, that is on Linux (I believe also on Mac), the drivers are not necessary; instead you need to simply add a string to a file, and to do so, two terminal commands are sufficient
adb kill-server echo "0x2717"> ~ / .android / adb_usb.ini adb devices
Now, with these commands, ADB should see your device! Simple, isn't it? 😉