We present ground-based 3 micron spectra of obscured Asymptotic Giant Branch (AGB) stars in the Magellanic Clouds (MCs). We identify the carbon stars on the basis of the 3.1 micron absorption by HCN and C2H2 molecules. We show evidence for the existence of carbon stars up to the highest AGB luminosities (Mbol=-7 mag, for a distance modulus to the LMC of 18.7 mag). This proves that Hot Bottom Burning (HBB) cannot, in itself, prevent massive AGB stars from becoming carbon star before leaving the AGB. It also sets an upper limit to the distance modulus of the Large Magellanic Cloud of 18.8 mag. The equivalent width of the absorption band decreases with redder (K-L) colour when the dust continuum emission becomes stronger than the photospheric emission. Carbon stars with similar (K-L) appear to have equally strong 3 micron absorption in the MCs and the Milky Way. We discuss the implications for the carbon and nitrogen enrichment of the stellar photosphere of carbon stars.