We propose an atom-cavity chip that combines laser cooling and trapping of neutral atoms with magnetic microtraps and waveguides to deliver a cold atom to the mode of a fibre taper coupled photonic bandgap (PBG) cavity. The feasibility of this device for detecting single atoms is analysed using both a semiclassical treatment and an unconditional master equation approach. Single-atom detection seems achievable in an initial experiment involving the non-deterministic delivery of weakly trapped atoms into the mode of the PBG cavity.