The COVID-19 pandemic caused by severe acute respiratory syndrome-coronavirus 2 (SARS-CoV-2) has overwhelmed health systems worldwide and highlighted limitations of diagnostic testing. Several types of diagnostics including RT-PCR-based assays, antigen detection by lateral flow assays and antibody-based assays have been developed and deployed in a short time. However, many of these assays are lacking in sensitivity and/or specificity. Here, we describe an immunoaffinity purification followed by high resolution mass spectrometry-based targeted assay capable of detecting viral antigen in nasopharyngeal swab samples of SARS-CoV-2 infected individuals. Based on our discovery experiments using purified virus, recombinant viral protein and nasopharyngeal swab samples from COVID-19 positive patients, nucleocapsid protein was selected as a target antigen. We then developed anti-nucleocapsid antibody-based immunoprecipitation automated workflow followed by targeted field-asymmetric ion mobility mass spectrometry (FAIMS) - parallel reaction monitoring (PRM) assay using a preformed gradient liquid chromatography platform on an Orbitrap Exploris 480 mass spectrometer. An ensemble machine learning-based model for predicting COVID-19 positivity was created using fragment ion intensities in the PRM data. This resulted in 97.8% sensitivity and 100% specificity with RT-PCR-based molecular testing as the gold standard. Our results demonstrate that direct detection of infectious agents from clinical samples by mass spectrometry-based assays have potential to be deployed as diagnostic assays in clinical laboratories.