The invention is directed to techniques and systems in which external brain monitoring is used to facilitate implantation and configuration of an implantable medical device. The techniques may create an open loop or closed loop system in which brain signals quantify the efficacy of electrical logical stimulation (or drug therapy via an implantable drug pump) at locations outside of the brain. The techniques may be used to improve placement of leads and electrodes during an implantation procedure, and/or to select or adjust stimulation parameters either during the implantation procedure or possibly following implantation of an implantable medical device. The described techniques have applications for the alleviation of pain, but may find other applications where EEG signals can quantify the efficacy of treatment via an implantable medical device.