You do need a valid passport to visit Costa Rica. A tourist visa will automatically be issued to you upon entry to the country. No need to visit the consulate!