Combine coconut milk, evaporated milk, sweetened condensed milk, ground cinnamon, ginger, cloves, nutmeg and cayenne pepper in heatproof bowl fitted over saucepan filled with 1-inch water that is simmering over medium-low heat.
Cook, stirring constantly, for 20 to 25 minutes or until thick and coats back of spoon.
Remove from heat. Strain through fine-meshed sieve and remove. Cool completely.
Stir in rum and lime juice. Cover and chill in refrigerator for at least 6 to 8 hours and up to 3 to 5 days.
Optional: If rimming glass, place agave and coconut in two small dishes. Wet rims of 6 glasses with agave mixture and then dip in coconut. Let stand for 10 minutes.