Clustered binary outcomes are frequently encountered in clinical research (e.g. longitudinal studies). Generalized linear mixed models (GLMMs) typically employed for clustered endpoints have challenges for some scenarios (e.g. high dimensional data). We develop an alternative, data-driven method called Binary Mixed Model (BiMM) tree, which combines decision trees and GLMMs. Since prediction accuracy can often be increased through ensemble methods, we extend BiMM tree methodology within the random forest setting. BiMM forest combines random forest and GLMMs within a unified framework. Simulation studies show that BiMM tree and BiMM forest methodology offer similar or superior accuracy compared to standard classification and regression trees, random forests and GLMMs for clustered binary outcomes. The methods are applied to a real dataset from the Acute Liver Failure Study Group.