ABSTRACT Oyster mushrooms are grown commercially worldwide, especially in many developing countries, for their easy cultivation and high biological efficiency. Cap color is an important commercial trait for oyster mushrooms. Little is known about the genetic mechanism of the cap color trait in oyster mushrooms, which limits molecular breeding for the improvement of cap color-type cultivars. In this study, an important candidate gene, pcmfs , for cap color in the oyster mushroom Pleurotus cornucopiae was identified based on the results of QTL (quantitative trait loci) mapping and comparative transcriptome analysis of our previous research. The pcmfs gene belonged to major facilitator superfamily (MFS) and was localized to the cell membrane. Expression pattern analysis and overexpression experiment demonstrated that pcmfs played an important positive role in cap color formation, with high expression levels leading to dark cap color. To our knowledge, this is the first reported gene that may be involved in the melanin transport in edible fungi. The results will enhance our understanding of the genetic basis for cap color formation in oyster mushrooms, ultimately facilitating the targeted molecular breeding of this phenotypic trait. IMPORTANCE Oyster mushrooms are widely cultivated worldwide, particularly in developing countries, owing to their straightforward cultivation requirements and high biological efficiency. Cap color represents a significant commercial trait of oyster mushrooms. Despite its significance, the genetic basis of this trait remains poorly understood, limiting progress in molecular breeding to diversify cap color variants. Bridging this knowledge gap could improve the market appeal and consumer satisfaction of these cultivars by facilitating targeted breeding strategies. In our previous research, a major QTL of cap color in oyster mushroom P. cornucopiae was mapped and DEGs (differentially expressed genes) between the dark strains and white strains were identified. Based on this, the candidate gene for cap color pcmfs was further mined. The pcmfs gene, belonging to the major facilitator superfamily (MFS), is localized to the cell membrane. Expression pattern analysis and overexpression experiments have shown that pcmfs plays a significant role in cap color formation. To our knowledge, this is the first reported gene that may be involved in the melanin transport in edible fungi. The results contribute to elucidate the genetic mechanisms governing cap color formation in mushrooms, advancing targeted molecular breeding for this trait.