According to the World Health Organization (WHO), Brain Tumors (BrT) have a high rate of mortality across the world. The mortality rate, however, decreases with early diagnosis. Brain images, Computed Tomography (CT) scans, Magnetic Resonance Imaging scans (MRIs), segmentation, analysis, and evaluation make up the critical tools and steps used to diagnose brain cancer in its early stages. For physicians, diagnosis can be challenging and time-consuming, especially for those with little expertise. As technology advances, Artificial Intelligence (AI) has been used in various domains as a diagnostic tool and offers promising outcomes. Deep-learning techniques are especially useful and have achieved exquisite results. This study proposes a new Computer-Aided Diagnosis (CAD) system to recognize and distinguish between tumors and non-tumor tissues using a newly developed middleware to integrate two deep-learning technologies to segment brain MRI scans and classify any discovered tumors. The segmentation mechanism is used to determine the shape, area, diameter, and outline of any tumors, while the classification mechanism categorizes the type of cancer as slow-growing or aggressive. The main goal is to diagnose tumors early and to support the work of physicians. The proposed system integrates a Convolutional Neural Network (CNN), . A middleware framework is developed to perform the integration process and allow the system to collect the required data for the classification of tumors. Numerous experiments have been conducted on different five datasets to evaluate the presented system. These experiments reveal that the system achieves 97.98% average accuracy when the segmentation and classification functions were utilized, demonstrating that the proposed system is a powerful and valuable method to diagnose BrT early using MRI images. In addition, the system can be deployed in medical facilities to support and assist physicians to provide an early diagnosis to save patients' lives and avoid the high cost of treatments.