Diagnosis of pneumonia caused by Mycoplasma pneumoniae in adults is hampered by a lack of rapid and standardized tests for detection. This prospective study was conducted to compare the diagnostic values of an indirect immunofluorescence assay and a 16S rRNA gene PCR for the diagnosis of M. pneumoniae pneumonia in adults. From February 2005 to January 2008, 357 patients (53.8 % males, median age 63 years, range 18–94) admitted for community-acquired pneumonia (CAP) to two hospitals in Santiago, Chile, were enrolled in the study. Thirty-two patients (9.0 %) met the criteria of current or recent M. pneumoniae infection, and laboratory diagnosis was definitive in 26 cases (81.2 %) and presumptive in six cases (18.8 %). Among the 32 M. pneumoniae infections, the PCR assay was positive in 23 (71.9 %) and the serology in 27 (84.4 %) of the cases. IgM was positive in acute-phase serum specimens in 13 cases (40.6 %) of M. pneumoniae infections. Using serology as the gold standard, the sensitivity, specificity, and positive and negative predictive values of the PCR were 66.7, 98.5, 78.3 and 97.3 %, respectively, whereas the global agreement of the methods was 343/357 (96.1 %). The frequency of M. pneumoniae CAP cases declined significantly during the second year of study, suggesting the end of an epidemic period. In conclusion, although good global agreement was found between PCR and serology, the lower sensitivity of the PCR leads us to recommend the use of both procedures in parallel to confirm M. pneumoniae in CAP in adults.