Entry visas are required by all travellers visiting Madagascar. Visas valid for 30 days are free but extra "fees" may be requested at ports of entry (payable in cash in Malagasy Ariary, US dollars or Euros). It is also possible to obtain visas valid for 90 days at Antananarivo airport at a cost of around USD $90.
Please note that it's not possible to extend visas obtained at the airport. Also, make sure you receive an entry stamp in your passport on arrival.
If you prefer to obtain your visa prior to arrival, contact your nearest Madagascar embassy or consulate.