The coronavirus disease 2019 (COVID-19) pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) has been a threat to global public health. Prompt patient identification and quarantine is the most effective way to control its rapid transmission, which can be facilitated by early detection of viral antigens. Here we present a platform to develop and optimize the fibronectin-based affinity-enhanced antibody mimetics (monobodies) for recognizing viral antigens. Specifically, we developed monobodies targeting SARS-CoV-2 nucleocapsid (N) protein. We showed that two monobodies, NN2 and NC2, bind to N protein’s N- and C-terminal domains respectively with a Kd in nM range.The specificity of the recognition was confirmed with co-immunoprecipitation and immunofluorescence assays. Furthermore, we demonstrated that one round of in vitro maturation using mRNA display can improve the binding affinity of monobodies. Machine learning algorithms were integrated with deep sequencing data for selecting candidates that improve the detection sensitivity of N. Using this pair of monobodies, we have developed an enzyme-linked immunosorbent assay (ELISA) for viral detection. We were able to detect recombinant N at 4 pg/ml and detect N in viral culture supernatant, with no cross-reactivity with other CoV. Integrating high-dense mutagenesis, mRNA display, deep sequencing and machine learning, this platform can be applied through iterations to identify and optimize monobodies against emerging viral antigens, potentiating point-of-care detection of communicable diseases in a cost-and time-sensitive manner.Authors Yushen Du, Tian-hao Zhang, Xiangzhi Meng, Yuan Shi, and Menglong Hu contributed equally to this work.