Accumulating evidence has demonstrated that the immune cells have an emerging role in controlling anti-tumor immune responses and tumor progression. The comprehensive role of mast cell in glioma has not been illustrated yet. In this study, 1,991 diffuse glioma samples were collected from The Cancer Genome Atlas (TCGA) and the Chinese Glioma Genome Atlas (CGGA). xCell algorithm was employed to define the mast cell-related genes. Based on mast cell-related genes, gliomas were divided into two clusters with distinct clinical and immunological characteristics. The survival probability of cluster 1 was significantly lower than that of cluster 2 in the TCGA dataset, three CGGA datasets, and the Xiangya cohort. Meanwhile, the hypoxic and metabolic pathways were active in cluster 1, which were beneficial to the proliferation of tumor cells. A potent prognostic model based on mast cell was constructed. Via machine learning, DRG2 was screened out as a characteristic gene, which was demonstrated to predict treatment response and predict survival outcome in the Xiangya cohort. In conclusion, mast cells could be used as a potential effective prognostic factor for gliomas.