Arabica coffee (Coffea arabica) is economically important for many smallholder farmers in the Mount Elgon region of East Uganda, but its production is increasingly threatened by climate change. However, ecosystem services (ES) provided by companion trees in coffee agroforestry systems (AFS) can help farmers adapt to climate change. The objectives of this research were to develop agroforestry species recommendations and tailor these to the farmers’ needs and local context, taking into consideration gender. Local knowledge of agroforestry species and ES preferences was collected through farmer interviews and rankings. Using the Bradley-Terry approach, analysis was done along an altitudinal gradient in order to study different climate change scenarios for coffee suitability. Farmers had different needs in terms of ES and tree species at different altitudes, e.g. at low altitude they need a relatively larger set of ES to sustain their coffee production and livelihood. Local knowledge is found to be gender blind as no differences were observed in the rankings of species and ES by men and women. Ranking species by ES and ranking ES by preference is a useful method to help scientists and extension agents to use local knowledge for the development of recommendations on companion trees in AFS for smallholder farmers.