You need an embassy visa for Cocos (Keeling) Islands if you have a Mexican passport
Visa options for Cocos (Keeling) Islands
Visitor visa
To visit Cocos (Keeling) Islands for Business or Tourism, you require a visa. A paper or embassy visa is the only type of visa available for visitors. Typically the visa is a stamp or sticker added to your passport. You must submit your application through the consulate or local visa center. Visit the government website for details.