Accurate rainfall prediction plays a vital role in reducing disaster risks and supporting public preparedness, particularly in Jakarta where dense population and frequent floods cause serious economic and social impacts. In this study, weather data from the Kemayoran Meteorological Station covering 2004–2023 were analyzed to build rainfall prediction models using machine learning. Three classification algorithms were compared: Logistic Regression, Decision Tree, and Random Forest, selected to represent linear, non-linear, and ensemble approaches. Feature selection was applied using Recursive Feature Elimination (RFE) to identify the most relevant predictors. The models were evaluated using 5-fold cross-validation with metrics including Accuracy, Precision, Recall, F1 Score, ROC AUC, and Cohen’s Kappa. The results indicate that Random Forest achieved the best overall performance with Accuracy of 0.7622, Precision around 0.70, Recall up to 0.63, F1 Score about 0.65, ROC AUC ranging from 0.8044 to 0.8171, and Cohen’s Kappa near 0.48. Logistic Regression also performed competitively with Accuracy of 0.7648, ROC AUC of 0.829, and Kappa of 0.49, while Decision Tree showed lower results with Accuracy of 0.6890 and ROC AUC of 0.6636. The RFE process successfully reduced 18 meteorological attributes to 5 influential features, mainly temperature and relative humidity, which were dominant in distinguishing rainfall events. These findings demonstrate that both Random Forest and Logistic Regression outperform Decision Tree, and Random Forest with RFE can be recommended as the most robust model for rainfall prediction in Jakarta.