We investigate the optical detection of single atoms held in a microscopic atom trap close to a surface. Laser light is guided by optical fibers or optical micro-structures via the atom to a photo-detector. Our results suggest that with present-day technology, micro-cavities can be built around the atom with sufficiently high finesse to permit unambiguous detection of a single atom in the trap with 10 $mu$s of integration. We compare resonant and non-resonant detection schemes and we discuss the requirements for detecting an atom without causing it to undergo spontaneous emission.