Context. Rotational mixing is known to significantly affect the evolution of massive stars; however, we still lack a consensus regarding the various possible modeling approaches and mixing recipes describing this process. The empirical investigation of surface abundances of carbon, nitrogen, and oxygen (CNO) in large samples of O- and B-type stars will be essential for providing meaningful observational constraints on the different available stellar evolution models. Aims. Setting up and testing adequate tools to perform CNO surface abundance determinations for large samples of O-type stars, by means of the fast performance, NLTE, unified model atmosphere code FASTWIND. Methods. We have developed a set of semi-automatic tools for measuring and analyzing the observed equivalent widths of strategic optical C, N, and O lines from different ions. Our analysis strategy is based on a χ2 minimization of weighted differences between observed and synthetic equivalent widths, the latter computed from tailored model grids. We have paid special attention to the (significant) errors introduced by typical uncertainties in stellar parameters. In this pilot study, we describe these tools, and test their performance and reliability using a set of high quality spectra of a sample of 18 presumably single Galactic O-type stars with low projected rotational velocities (v sin i≲100 km s−1), and previously determined stellar parameters. In particular, we have compared the outcome of our analysis with results from existing studies and theoretical stellar evolution models. Results. Most of our results for carbon and nitrogen agree, within the errors, with both theoretical expectations and literature values. While many cooler dwarfs display C and N abundances close to solar, some of the early- and mid-O dwarfs – and most supergiants – show significant enrichment in N and depletion in C. Our results for oxygen in late-O dwarfs are, however, unexpectedly low, possibly indicating deficiencies in the adopted oxygen model atom. For all other objects, no systematic problems in their oxygen content have been identified. Specific stars in our sample show peculiarities in their abundances, and we suggest hypotheses regarding their origin. Conclusions. Our method is (almost) ready to be applied to large samples of late and mid O-type stars – although the oxygen model atom needs to be improved and carefully tested first. For early O-type stars (O4 and hotter), a simultaneous UV analysis seems to be inevitable, due to the scarcity and weakness of optical C and O lines. This will necessarily imply a more complex modeling, additionally accounting for the effects of X-rays from wind-embedded shocks and wind inhomogeneities.