Functional MRI (fMRI) can characterize the effects of drugs on brain activity. Here, Duff et al. describe an fMRI-based assessment protocol that incorporates machine-learning methods and data from multiple published studies to identify associations between drug efficacy and drug-related changes in brain activity that could be used to assess new data. The authors present proof-of-concept implementation of the protocol using eight clinical fMRI data sets from studies of six different analgesic drugs, identifying signatures of responses to pain and drug modulations.