Objectives Metabolic bariatric surgery is a critical intervention for patients living with obesity and related health issues. Accurate classification and prediction of patient outcomes are vital for optimizing treatment strategies. This study presents a novel machine learning approach to classify patients in the context of metabolic bariatric surgery, providing insights into the efficacy of different models and variable types. Methods Various machine learning models, including Gaussian Naive Bayes, Complement Naive Bayes, K-nearest neighbour, Decision Tree, K-nearest neighbour with RandomOverSampler, and K-nearest neighbour with SMOTE, were applied to a dataset of 73 patients. The dataset, comprising psychometric, socioeconomic, and analytical variables, was analyzed to determine the most efficient predictive model. The study also explored the impact of different variable groupings and oversampling techniques. Results Experimental results indicate average accuracy values as high as 66.7% for the best model. Enhanced versions of K-nearest neighbour and Decision Tree, along with variations of K-nearest neighbour such as RandomOverSampler and SMOTE, yielded the best results. Conclusions The study unveils a promising avenue for classifying patients in the realm of metabolic bariatric surgery. The results underscore the importance of selecting appropriate variables and employing diverse approaches to achieve optimal performance. The developed system holds potential as a tool to assist healthcare professionals in decision-making, thereby enhancing metabolic bariatric surgery outcomes. These findings lay the groundwork for future collaboration between hospitals and healthcare entities to improve patient care through the utilization of machine learning algorithms. Moreover, the findings suggest room for improvement, potentially achievable with a larger dataset and careful parameter tuning.